Skip to content

Instagram Post Scraper

Try for free

Scrape public Instagram posts from usernames, profile URLs, or post URLs. Get captions, hashtags, likes, comments count, media URLs, and timestamps for every post.

📸 Instagram Post Scraper

Public Instagram posts, from a username or a URL, in one dataset.

Built for social teams, agencies, and researchers who need a repeatable pull of public posts: captions, media, engagement, and the people attached to the post. Paste a list, set a cap, and run it. A bad URL is one error row. The rest of the list still finishes.

Watch the video tutorial to see how it works:

✨ Features

  • 👤 Usernames, profile URLs, and post URLs in the same username list. @natgeo and https://www.instagram.com/p/… both work.
  • 🔢 resultsLimit per profile. A single post URL returns that post and ignores the cap.
  • 📌 skipPinnedPosts drops posts pinned to the top of the profile.
  • 📅 onlyPostsNewerThan stops at a UTC date (YYYY-MM-DD or ISO) or a relative window such as 1 day. Pinned posts older than the cutoff are dropped too; skipPinnedPosts also drops recent pinned posts.
  • ⚡ basicData for caption, counts, images, owner, and timestamp.
  • 🔬 detailedData (the default) adds alt text, latest comments, music info, paid partnership, and video play count when Instagram sends them.
  • 🖼️ Carousels come back as childPosts plus an images list. Videos include videoUrl and videoDuration when the file is public.
  • 💾 downloadImages saves every photo of each post (all photo slides of a carousel) in the run's storage and adds download links as downloadedImage and downloadedImages. Instagram's own image links expire after a few days; these links open without an account for 30 days.
  • 🔒 Public only. Private profiles return private_profile and stop. No login and no session cookie.
  • 🚫 Missing stays missing. A hidden like count is likesCount: -1. A real 0 or false is kept. Anything Instagram did not send is left off the item.

🚀 Why teams use this

Fast and light, with no browser needed, so a profile list is something you can put on a schedule.

One failed target does not kill the run. A typo, a private account, or a removed post becomes {inputUrl, error, errorDescription}. Every other username still writes its posts.

The output uses plain field names, so a table, a warehouse load, or a downstream actor can read shortCode, caption, ownerUsername, likesCount, and url without a second mapping step.

The run picks its proxy itself: datacenter exits first, and residential exits as soon as Instagram blocks the datacenter ones. The actor does not ask you to paste a session.

💡 Use cases

  • Export a profile's recent posts with captions, likes, and comment counts.
  • Archive a brand's feed or a campaign's posts.
  • Compare post performance across competitors.

🧪 Example input

{
  "dataDetailLevel": "detailedData",
  "resultsLimit": 20,
  "username": [
    "natgeo",
    "https://www.instagram.com/natgeo/",
    "https://www.instagram.com/p/DLNsnpUTdVS/"
  ]
}

🧾 Sample output

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

{
  "id": "3983118388705688735",
  "type": "Video",
  "shortCode": "DdG4RIxIPyf",
  "caption": "Presented by @Rolex. Welcome to Africa 🌍 Africa Earth’s Wild Home takes you deep into the heart of our wildest continent, bringing you closer to its animals,…",
  "hashtags": [
    "Rolex",
    "PerpetualPlanet"
  ],
  "mentions": [
    "Rolex.",
    "wunmimosaku"
  ],
  "url": "https://www.instagram.com/p/DdG4RIxIPyf/",
  "commentsCount": 578,
  "dimensionsHeight": 1920,
  "dimensionsWidth": 1080,
  "originalHeight": 1920,
  "originalWidth": 1080,
  "displayUrl": "https://instagram.fnak3-1.fna.fbcdn.net/…",
  "images": [
    "https://instagram.fnak3-1.fna.fbcdn.net/…"
  ],
  "videoUrl": "https://instagram.fnak3-1.fna.fbcdn.net/…",
  "audioUrl": "https://instagram.fnak3-1.fna.fbcdn.net/…",
  "likesCount": 79633,
  "timestamp": "2026-09-10T13:00:14.000Z",
  "ownerFullName": "National Geographic",
  "ownerUsername": "natgeo",
  "ownerId": "787132",
  "isPinned": true,
  "productType": "clips",
  "videoDuration": 72.614,
  "sponsors": [
    {
      "username": "rolex",
      "full_name": "ROLEX"
    }
  ]
}

📥 Input

FieldRequiredWhat it does
usernameYesUsernames, profile URLs, or post URLs. Duplicates of the same profile or post are scraped once.
resultsLimitNoMaximum posts per profile. Default 20. Minimum 1. Not applied to a single post URL.
skipPinnedPostsNoDefault false.
onlyPostsNewerThanNoUTC YYYY-MM-DD, full ISO, or a relative value such as 2 weeks.
dataDetailLevelNobasicData or detailedData. Default detailedData.
downloadImagesNoDefault false. Saves each post's photo files in the run's storage with download links.

Hashtag, place, and audio URLs, and numeric /p/{id} or /reel/{id} links, are rejected by the input form before a run starts. Use a username, a profile URL, or the shortcode URL.

📤 Output

Each public post is one dataset item. Fields are written only when the payload contains them.

Always attempted from the post itself: id, type (Image, Video, or Sidecar), shortCode, caption, hashtags, mentions, url, commentsCount, dimensionsHeight, dimensionsWidth, originalHeight, originalWidth, displayUrl, images, videoUrl, likesCount, timestamp, childPosts, ownerUsername, ownerId, ownerFullName, isPinned, productType, videoDuration, affiliate, sponsors, taggedUsers, coauthorProducers, locationName, locationId, pk, isCommentsDisabled, inputUrl.

For a post given by its link, Instagram's post page no longer sends paidPartnership, isPinned and isCommentsDisabled to visitors who are not signed in, so these three fields are usually empty on post-link rows; posts read from a profile still carry them. facebookPage and threadsNetProfile are set only when the author object already includes them. Share links are not an input.

Detailed data can also include alt, firstComment, latestComments, musicInfo, paidPartnership, videoPlayCount, videoViewCount, and igPlayCount. audioUrl is included only when Instagram sends a preview file. Logged-out responses often omit it.

videoPlayCount is the view count Instagram shows on a Reel to visitors who are not logged in. It is filled for up to about the 600 newest Reels of each account. Instagram sends no Facebook play count and no separate view count to logged-out visitors, so fbPlayCount and videoViewCount are usually empty. Numbers that only logged-in viewers or the account owner see, such as Insights, are not available to this scraper. When Instagram sends no view count for some saved Reels, the run's status message says for how many.

With downloadImages on, every post row also gets downloadedImage (the link to the first saved photo) and downloadedImages (one link per saved photo, in slide order). The files are in the run's key-value store, named post-<shortCode>-<slide>.jpg. Video posts and video slides have no photo file: their download fields stay empty, and the cover frame is not saved as a photo. When a photo cannot be downloaded, the row keeps Instagram's link in displayUrl and images, and the run's status message says how many.

A failed target looks like this:

{
  "inputUrl": "https://www.instagram.com/private_example/",
  "error": "private_profile",
  "errorDescription": "This profile is private. Only public profiles are scraped."
}

❓ 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.