Real-time API Coming soon

Instagram API

Real-time Instagram API for public data, with no Instagram login: profiles, posts, reels, comments and the top posts of a hashtag or keyword, as JSON.

Every endpoint answers with one page. A list endpoint also returns next_cursor: pass it back as cursor to get the next page, until next_cursor is null. A cursor stands for its target, so a later page needs the cursor alone.

Every answer has the same envelope:

A call is charged only when it returns data (a profile, a post, or a page with at least one item). Errors, empty pages and accounts or posts that are missing or private are free.

Getting started

Base URL: https://socialscrapers--instagram-api.apify.actor

Authentication: Your Apify API token, as Authorization: Bearer <token>.

curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://socialscrapers--instagram-api.apify.actor/v1/profile?username=natgeo"

It is launching on the Apify Store. Meanwhile, our scrapers there cover the same data.

Profiles

GET /v1/profile

Profile with its first page of posts

A public profile: followers, following and exact posts count, bio and bio links, verified badge, account type, profile pictures, and its 12 latest posts (pinned posts first, as on the profile) with likes, comments, reel plays, captions and media. next_cursor continues the posts on /v1/posts.

Parameters

ParameterInRequiredDescription
usernamequeryyesA username (natgeo), @natgeo, or a profile link (https://www.instagram.com/natgeo/).

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/profile?username=natgeo

Responses

  • 200 The profile.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 404 No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.
Example response
{
  "ok": true,
  "data": {
    "id": "787132",
    "username": "natgeo",
    "url": "https://www.instagram.com/natgeo/",
    "fullName": "National Geographic",
    "biography": "Step into wonder and find your inner explorer with National Geographic",
    "externalUrl": "http://visitstore.bio/natgeo",
    "externalUrls": [
      {
        "title": null,
        "url": "http://visitstore.bio/natgeo"
      }
    ],
    "followersCount": 268114015,
    "followsCount": 195,
    "postsCount": 32171,
    "highlightReelCount": 1,
    "hasReels": true,
    "verified": true,
    "isBusinessAccount": true,
    "accountType": "business",
    "profilePicUrl": "https://scontent.cdninstagram.com/v/t51.82787-19/natgeo_150.jpg",
    "profilePicUrlHD": "https://scontent.cdninstagram.com/v/t51.82787-19/natgeo_1080.jpg",
    "fbid": "17841400573960012",
    "pronouns": [],
    "latestPosts": [
      {
        "id": "4024784204432119856",
        "type": "Video",
        "productType": "clips",
        "shortCode": "Dfa5-jix5gw",
        "url": "https://www.instagram.com/p/Dfa5-jix5gw/",
        "caption": "From harsh conditions to rival predators, these wolves face danger at every turn.",
        "hashtags": [
          "WolvesUpClose"
        ],
        "mentions": [
          "bertiegregory"
        ],
        "likesCount": 132982,
        "commentsCount": 538,
        "videoPlayCount": 2285354,
        "videoDuration": 42.603,
        "timestamp": "2026-11-07T15:00:02.000Z",
        "displayUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/Dfa5-jix5gw.jpg",
        "images": [],
        "videoUrl": "https://scontent.cdninstagram.com/o1/v/t2/f2/m86/Dfa5-jix5gw.mp4",
        "dimensionsHeight": 1920,
        "dimensionsWidth": 1080,
        "alt": null,
        "childPosts": [],
        "ownerId": "787132",
        "ownerUsername": "natgeo",
        "ownerFullName": "National Geographic",
        "taggedUsers": [
          {
            "id": "1284886006",
            "username": "bertiegregory",
            "fullName": "Bertie Gregory",
            "isVerified": true
          }
        ],
        "coauthorProducers": [],
        "isPaidPartnership": false,
        "isCommentsDisabled": false,
        "isPinned": true
      }
    ],
    "scrapedAt": "2026-11-15T03:49:14.921Z"
  },
  "next_cursor": "eyJ2IjoxLCJrIjoicG9zdHMiLCJ1IjoibmF0Z2VvIiwicGsiOiI3ODcxMzIi..."
}

GET /v1/posts

One page of a profile's posts

A profile's posts and reels, newest first (pinned posts first on the first page), 12 per page, each with likes, comments, reel plays, caption, hashtags, mentions, date, media URLs, tagged accounts and collaborators. Give username for the first page, then cursor for the next ones.

Parameters

ParameterInRequiredDescription
usernamequerynoA username (natgeo), @natgeo, or a profile link. Required for the first page; later pages need only cursor.
cursorquerynoThe next_cursor of the previous page, exactly as returned. Leave it out for the first page.

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/posts?username=nasa

Responses

  • 200 One page of posts.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 404 No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.
Example response
{
  "ok": true,
  "data": {
    "username": "nasa",
    "items": [
      {
        "id": "4024676116912147114",
        "type": "Image",
        "productType": "feed",
        "shortCode": "DfahZrMjAqq",
        "url": "https://www.instagram.com/p/DfahZrMjAqq/",
        "caption": "Galaxy in bloom",
        "hashtags": [
          "NASA",
          "Galaxy",
          "Flower"
        ],
        "mentions": [],
        "likesCount": 244637,
        "commentsCount": 810,
        "videoPlayCount": null,
        "videoDuration": null,
        "timestamp": "2026-11-06T21:00:08.000Z",
        "displayUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/DfahZrMjAqq.jpg",
        "images": [],
        "videoUrl": null,
        "dimensionsHeight": 1440,
        "dimensionsWidth": 1440,
        "alt": null,
        "childPosts": [],
        "ownerId": "528817151",
        "ownerUsername": "nasa",
        "ownerFullName": "NASA",
        "taggedUsers": [],
        "coauthorProducers": [],
        "isPaidPartnership": false,
        "isCommentsDisabled": false,
        "isPinned": false
      }
    ]
  },
  "next_cursor": "eyJ2IjoxLCJrIjoicG9zdHMiLCJ1IjoibmFzYSIsInBrIjoiNTI4ODE3MTUxIi..."
}

GET /v1/reels

One page of a profile's reels

A profile's reels, newest first, with play counts, duration, video URL, likes, comments and caption. Each page reads 24 of the profile's posts and returns the reels among them, so a page can hold fewer than 24 reels (even none) while next_cursor says more follow. A profile that has never posted a reel answers with an empty page at once.

Parameters

ParameterInRequiredDescription
usernamequerynoA username (natgeo), @natgeo, or a profile link. Required for the first page; later pages need only cursor.
cursorquerynoThe next_cursor of the previous page, exactly as returned. Leave it out for the first page.

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/reels?username=nasa

Responses

  • 200 One page of reels.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 404 No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.

Posts

GET /v1/post

A post or reel with its details

One public post or reel: caption, likes, comments count, date, media URLs and carousel items, tagged accounts, collaborators, location, paid-partnership flag, and for a reel its play count, duration and sound.

Parameters

ParameterInRequiredDescription
urlqueryyesA post or reel link (https://www.instagram.com/p/DfahZrMjAqq/), its short code (DfahZrMjAqq) or its numeric id.

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/post?url=https://www.instagram.com/p/DfahZrMjAqq/

Responses

  • 200 The post.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 404 No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.
Example response
{
  "ok": true,
  "data": {
    "id": "4024676116912147114",
    "type": "Image",
    "productType": "feed",
    "shortCode": "DfahZrMjAqq",
    "url": "https://www.instagram.com/p/DfahZrMjAqq/",
    "caption": "Galaxy in bloom",
    "hashtags": [
      "NASA",
      "Galaxy",
      "Flower"
    ],
    "mentions": [],
    "likesCount": 244637,
    "commentsCount": 810,
    "videoPlayCount": null,
    "videoDuration": null,
    "timestamp": "2026-11-06T21:00:08.000Z",
    "displayUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/DfahZrMjAqq.jpg",
    "images": [],
    "videoUrl": null,
    "dimensionsHeight": 1440,
    "dimensionsWidth": 1440,
    "alt": null,
    "childPosts": [],
    "ownerId": "528817151",
    "ownerUsername": "nasa",
    "ownerFullName": "NASA",
    "taggedUsers": [],
    "coauthorProducers": [],
    "isPaidPartnership": false,
    "isCommentsDisabled": false,
    "locationName": null,
    "locationId": null,
    "sponsors": [],
    "musicInfo": null,
    "scrapedAt": "2026-11-15T03:49:34.894Z"
  },
  "next_cursor": null
}

GET /v1/comments

One page of a post's comments

A post's or reel's comments, newest first, about two dozen per page: text, date, likes, reply count and the commenter's username, id, verified badge and picture. Give url for the first page, then cursor.

Parameters

ParameterInRequiredDescription
urlquerynoA post or reel link, short code or numeric id. Required for the first page; later pages need only cursor.
cursorquerynoThe next_cursor of the previous page, exactly as returned. Leave it out for the first page.

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/comments?url=https://www.instagram.com/p/DfahZrMjAqq/

Responses

  • 200 One page of comments.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 404 No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.
Example response
{
  "ok": true,
  "data": {
    "shortCode": "DfahZrMjAqq",
    "postId": "4024676116912147114",
    "commentsCount": 810,
    "commentsDisabled": false,
    "items": [
      {
        "id": "18109962871946737",
        "text": "Beautiful!",
        "timestamp": "2026-11-07T08:21:13.000Z",
        "likesCount": 3,
        "repliesCount": 0,
        "ownerId": "1234567890",
        "ownerUsername": "sample.account",
        "ownerIsVerified": false,
        "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/sample-avatar.jpg"
      }
    ]
  },
  "next_cursor": "eyJ2IjoxLCJrIjoiY29tbWVudHMiLCJzIjoiRGZhaFpyTWpBcXEi..."
}

Hashtags

GET /v1/hashtag

One page of the top posts for a hashtag or keyword

The top posts Instagram shows for a hashtag or keyword, in its order (position), up to 50 per page, with caption, hashtags, reel plays, media URLs and the creator; the first page also lists related searches. Instagram shows 50 to 100 top posts per search in all.

Parameters

ParameterInRequiredDescription
tagquerynoA hashtag (sourdough or #sourdough), a keyword (running shoes) or a hashtag link. Required for the first page; later pages need only cursor.
cursorquerynoThe next_cursor of the previous page, exactly as returned. Leave it out for the first page.

Example request

GET https://socialscrapers--instagram-api.apify.actor/v1/hashtag?tag=sourdough

Responses

  • 200 One page of top posts.
  • 400 A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
  • 429 Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
  • 500 Something went wrong on our side (internal_error). Not charged.
  • 502 Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.
Example response
{
  "ok": true,
  "data": {
    "tag": "sourdough",
    "relatedTags": [
      "sourdough danish recipe",
      "hot honey sourdough"
    ],
    "items": [
      {
        "searchTerm": "sourdough",
        "position": 1,
        "id": "3858533513377077358",
        "type": "Video",
        "productType": null,
        "shortCode": "DWMQ8l6x9hu",
        "url": "https://www.instagram.com/p/DWMQ8l6x9hu/",
        "caption": "Sourdough bread recipe for beginners",
        "hashtags": [
          "sourdough",
          "sourdoughbaking"
        ],
        "mentions": [],
        "likesCount": null,
        "commentsCount": null,
        "videoPlayCount": 2802745,
        "videoDuration": null,
        "timestamp": "2026-03-22T15:24:20.558Z",
        "displayUrl": "https://scontent.cdninstagram.com/v/t51.71878-15/DWMQ8l6x9hu.jpg",
        "images": [],
        "videoUrl": "https://scontent.cdninstagram.com/o1/v/t2/f2/m86/DWMQ8l6x9hu.mp4",
        "dimensionsHeight": null,
        "dimensionsWidth": null,
        "alt": null,
        "childPosts": [],
        "ownerId": "79751840297",
        "ownerUsername": "sample.creator",
        "ownerFullName": null,
        "taggedUsers": [],
        "coauthorProducers": [],
        "isPaidPartnership": false,
        "isCommentsDisabled": false,
        "ownerIsVerified": true,
        "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/sample-avatar.jpg",
        "locationName": null,
        "locationId": null,
        "sponsors": [],
        "musicInfo": null
      }
    ]
  },
  "next_cursor": "eyJ2IjoxLCJrIjoiaGFzaHRhZyIsInQiOiJzb3VyZG91Z2gi..."
}

Service

GET /

Service info

What this API serves. Never charged.

Parameters

No parameters.

Example request

GET https://socialscrapers--instagram-api.apify.actor/

Responses

  • 200 The endpoints.

Errors

StatusMeaning
400A parameter is missing or cannot be read (invalid_request), or the cursor is not one this API returned for this endpoint and target (invalid_cursor). Not charged.
404No such profile, post or reel, or one a logged-out visitor may not see (not_found), or a private profile (private). Not charged.
429Too many calls at once right now (over_capacity). Retry after the Retry-After seconds. Not charged.
500Something went wrong on our side (internal_error). Not charged.
502Instagram did not answer after several tries (instagram_refused) or within the call's time limit of about 45 s (upstream_timeout). Retry. Not charged.