Skip to content

Instagram Scraper

Try for free

Scrape public Instagram profiles, posts, reels, comments, hashtags, and places. Get captions, likes, comments, media URLs, and owner details without logging in.

✨ Instagram Scraper

Turn public Instagram profile, post, reel, and hashtag URLs into a clean dataset. Paste one URL or a long list. The run keeps going.

For social teams and data pipelines that need public posts, profile details, reels, and comments without a logged-in session.

Watch the video tutorial to see how it works:

✨ Features

  • 🔗 URLs first. directUrls is what gets scraped. A search string is used only when the URL list is empty.
  • 👤 Profiles and posts. Profile details, the profile feed, single posts, and hashtag feeds from a public URL.
  • 🎬 Reels. Profile clips and reel URLs, kept when the media is a clip.
  • 💬 Comments. The comments of a post or reel, page after page up to resultsLimit or the post's last comment, newest-first when you ask. A profile, hashtag or place URL reads the comments of its latest posts (commentsPostsLimit, 10 by default).
  • 🏷️ Tagged posts. A profile's tagged tab URL (https://www.instagram.com/<username>/tagged/) returns public posts by other accounts that tag or mention that profile, with each posting account's follower count. They are found through Google search, so this is the part of the Tagged tab that search lists, not the full tab.
  • #️⃣ Hashtag search. search with searchType hashtag finds up to searchLimit matching hashtags and returns the posts tagged with them: up to resultsLimit posts (or reels) per hashtag found. With resultsType details it returns one metadata row per hashtag instead. searchType profile (or its alias user) looks the term up as an exact username. Place search is not available; use place URLs.
  • 🔒 Public only. A private profile is reported as a private_profile failed input and that URL stops. There is no session-cookie input.

🚀 Why teams use this

  • Fast and light: no browser needed.
  • One bad URL does not stop the run: it is skipped, never saved as a row, and listed with the reason in the status message and the OUTPUT record (failedInputs).
  • Up to eight requests are in flight. A 429, a 401, or a checkpoint page rotates the session and retries a thin document once.
  • Empty values stay off the item. A real false or 0 stays. likesCount is -1 when Instagram has hidden like and view counts.

💡 Use cases

  • Collect posts, reels, and comments from public profiles for social listening.
  • Compare creators and brands by follower counts and engagement.
  • Pull posts for a hashtag or place to study a trend or campaign.

🧪 Example input

{
  "directUrls": [
    "https://www.instagram.com/humansofny/"
  ],
  "resultsLimit": 20,
  "resultsType": "posts",
  "searchLimit": 10,
  "searchType": "hashtag"
}

🧾 Sample output

One item from a real run of the example input, shortened. Long text is cut and lists show their first entries.

{
  "id": "3741054891297971261",
  "type": "Video",
  "typename": "XDTMediaDict",
  "shortCode": "DPq5ZpJDZw9",
  "caption": "Dear New York closes on October 19th. It’s been the honor and joy of my life to see this take flight. It’s been a magical six days of community and connectio…",
  "hashtags": [],
  "mentions": [],
  "url": "https://www.instagram.com/p/DPq5ZpJDZw9/",
  "commentsCount": 976,
  "firstComment": "Mobile rn 🔥",
  "latestComments": [
    {
      "id": "18114464492027801",
      "text": "Mobile rn 🔥",
      "typename": "XIGComment",
      "isCovered": false,
      "timestamp": "2026-10-11T15:17:28.000Z",
      "ownerUsername": "officialsnackyartss",
      "ownerIsUnpublished": false,
      "ownerProfilePicUrl": "https://scontent-fra5-1.cdninstagram.com/…",
      "owner": {
        "id": "…",
        "username": "…",
        "is_verified": "…"
      },
      "likesCount": 0
    },
    {
      "id": "18079015328373197",
      "text": "👏🏻",
      "typename": "XIGComment",
      "isCovered": false,
      "timestamp": "2026-10-02T06:28:56.000Z",
      "ownerUsername": "xinglan072",
      "ownerIsUnpublished": false,
      "ownerProfilePicUrl": "https://scontent-fra5-1.cdninstagram.com/…",
      "owner": {
        "id": "…",
        "username": "…",
        "is_verified": "…"
      },
      "likesCount": 0
    }
  ],
  "dimensionsHeight": 1920,
  "dimensionsWidth": 1080,
  "originalHeight": 1920,
  "originalWidth": 1080,
  "displayUrl": "https://scontent-fra5-1.cdninstagram.com/…",
  "images": [
    "https://scontent-fra5-1.cdninstagram.com/…"
  ],
  "videoUrl": "https://scontent-fra5-1.cdninstagram.com/…",
  "alt": "Video by Humans of New York on October 11, 2025.",
  "likesCount": 107882,
  "fbLikeCount": 51,
  "timestamp": "2025-10-11T13:27:07.000Z",
  "childPosts": [],
  "ownerFullName": "Humans of New York",
  "ownerUsername": "humansofny"
}

📥 Input

resultsType is posts, details, comments, or reels. directUrls is the list of public URLs. resultsLimit caps items per URL. onlyPostsNewerThan drops older posts, pinned posts included. skipPinnedPosts also skips pinned profile posts that are inside the date window. Logged out, Instagram sends no pin flag, so a post at the top of the grid that is older than a post below it counts as pinned (isPinned).

Hashtag URLs can be https://www.instagram.com/explore/tags/<tag>/ or Instagram's search link for a tag, https://www.instagram.com/explore/search/keyword/?q=%23<tag>. A search link for words (?q=<words>) opens only for logged-in accounts, so it returns the top posts Instagram shows logged out for those words, and the status message says so. Logged out, a hashtag feed is Instagram's top posts for the tag, not its newest posts, so with onlyPostsNewerThan the run reads further pages for recent posts and stops after 5 pages in a row without one; when nothing is left, the status message says how many posts were older than the filter. Instagram shows some hashtags only to logged-in visitors, whatever their size: their tag page sends logged-out visitors to the login page. For such a hashtag the scraper finds its public posts through Google search and reads each one from Instagram, keeping only posts whose caption has the hashtag; these rows come in search order rather than Instagram's, and the status message names the hashtags read this way. When search finds no such post, the hashtag is listed under failed inputs with its post count; a hashtag that does not exist is listed as not found.

A profile's tagged tab (https://www.instagram.com/<username>/tagged/) opens on Instagram only for logged-in visitors. In posts mode the scraper finds public posts that name the profile through Google search (the @username in captions, then the username as a word) and reads each one from Instagram. It keeps a post only when it is by another account and its photo tags or its caption name the profile. Each row is the live public post, with taggedAccount (the profile), taggedAs (photo tag, caption mention, or both), ownerUsername, ownerFullName, ownerFollowersCount (read from the posting account's public profile), likesCount, commentsCount, timestamp, and url. Rows come in search order, so resultsLimit and onlyPostsNewerThan apply to what search finds. Posts that search engines have not indexed, and posts by private accounts, cannot be found this way, so the rows are part of the Tagged tab, not all of it; the status message says so. Each of the three searches reads results pages until search has no more, or until 3 pages in a row have no matching post, or until resultsLimit rows are saved. When nothing is found, the run saves nothing, and the status message says so. In other modes a tagged tab URL is read as the hashtag #<username>.

In comments mode, a post or reel URL returns that post's comments. A profile, hashtag, place or audio URL returns the comments of its latest commentsPostsLimit posts (10 by default, after onlyPostsNewerThan and skipPinnedPosts), and resultsLimit then applies to each post: 10 posts × 20 comments is up to 200 rows for one profile URL. When the posts read have no comments, the run saves nothing and the status message says so, for example that the 10 latest posts of a profile have no comments, so you can raise commentsPostsLimit to read older posts. Comments are saved page by page as they are read, so results show up while the run goes on, and the status message shows how many are saved so far.

search, searchType (hashtag, profile, place, or user), and searchLimit run only when directUrls is empty. Comma-separate several terms. Logged out, Instagram offers one search index, hashtags, so:

  • hashtag finds up to searchLimit public hashtags matching each term, then reads each one exactly like its hashtag URL (https://www.instagram.com/explore/tags/<tag>/): posts returns up to resultsLimit posts per hashtag found, reels up to resultsLimit reels per hashtag, comments the comments of each hashtag's latest commentsPostsLimit posts, and details one metadata row per hashtag (name, postsCount, url, id, searchTerm, searchSource). Post and reel rows have the hashtag page as inputUrl. A hashtag that saves nothing is a failed input with its reason, for example a hashtag that does not exist.
  • profile (and its alias user) looks each term up as an exact username (natgeo or @natgeo) and returns that one profile. A term that is not a username, or a username with no public profile, is a failed input. Instagram serves name search to logged-in accounts only.
  • place is not available: Instagram serves place search to logged-in accounts only, so the run fails at once with that reason. Put place URLs (https://www.instagram.com/explore/locations/<id>/<name>/) in directUrls instead.

addParentData attaches a small parent object. isNewestComments asks for newest-first comments. addProfileStatistics adds the profile counters the page returned. proxyConfiguration is the Scrapely Proxy input. Left without a group, the run starts on datacenter exits and switches to residential exits on the first block or rate limit.

includeNestedComments is on the form. Nested replies have come back empty, so do not plan a pipeline on them.

📤 Output

Posts and reels include, when Instagram sent them: id, type, shortCode, url, caption, ownerUsername, likesCount, commentsCount, timestamp, productType, inputUrl, and displayUrl. Posts from a hashtag search are the same rows a hashtag URL returns. Hashtag details (a hashtag URL or a hashtag search with resultsType details) include name, postsCount, url, id, and searchSource. Profile details include username, fullName, biography, followersCount, followsCount, postsCount, verified, private, profilePicUrl, and url.

Comments include id, text, ownerUsername, likesCount, repliesCount, timestamp, commentUrl, postUrl, and inputUrl.

searchSource is instagram on profile search rows and on hashtag search details rows. Failed inputs (a private profile, a URL that does not fit the selected resultsType, a blocked request) are not saved as rows. They are listed in the run's status message and in the OUTPUT key-value record as failedInputs: [{input, reason}]; the reason is an error code plus a short description, never the response body. When nothing was saved and at least one input failed, the run ends as failed with that reason in the status message. A public profile with no posts is not a failed input: in posts mode it saves nothing, and the status message says that the profile has no posts.

carouselMediaCount, hasUpcomingEvent, and audioUrl are not filled. Guest business email and nested replies have stayed empty, so they are not part of this output contract. Instagram shows stories only to logged-in visitors, so with resultsType stories each profile URL fails at once with that reason. Instagram does not show share counts to logged-out visitors, so posts have no share count.

❓ FAQ

Can I schedule it or use the API? Yes. Save your input as a task and schedule it, or start runs and read the results through the Scrape.ly API, CLI, or from AI agents through the Scrape.ly MCP server.

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.