LurkAPI
Docs · User posts

User posts

A page of public posts with captions, media and engagement counts.

1 credit per callFresh within 3 minutesMCP tool: instagram_user_posts
GEThttps://api.lurkapi.com/v2/instagram/user/posts

Example response

When to use this

Use it to follow what an account posts: captions, media, and like and comment counts. Pass a username or profile URL, and first for how many posts you want. Instagram sends at most 12 a page, so a larger first still returns 12.

Posts come in Instagram's timeline order, which can include pinned posts. A private account's posts aren't available. Cached pages cost the same as fresh ones.

Pagination. Pass end_cursor back as after, unchanged, for the next page. has_next_page is false on the last page.

Example request

Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.

Language

Parameters

Add them to the URL after a ?, as in ?username=nike&first=12. Join several with &.

ParameterDescription
username
stringoptional
Instagram username, with or without @ (e.g. nike), or a profile URL. Required unless you pass url.
Example
nike
url
stringoptional
An instagram.com profile URL, e.g. https://www.instagram.com/nike/. Required unless you pass username.
first
integeroptional
How many items to ask for, 1–50 (default 12). Instagram may return fewer.
Default
12
Example
12
after
stringoptional
The end_cursor from the previous page, unchanged. Leave it out for the first page.

Example response

A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….

Show the example response (5 KB)
{
  "success": true,
  "credits_remaining": 99,
  "credits_charged": 1,
  "posts": [
    {
      "pk": "4016750272540708224",
      "media_type": 2,
      "display_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-15/870221906_186781…",
      "images": [
        {
          "url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-15/870221906_186781…",
          "width": 720,
          "height": 1280
        }
      ],
      "videos": [
        {
          "url": "https://scontent-iad6-1.cdninstagram.com/o1/v/t2/f2/m86/AQOJD1Qvyeal5HmO…",
          "width": null,
          "height": null
        }
      ],
      "usertags": [
        {
          "user": {
            "pk": "23678829",
            "username": "nikefootball",
            "full_name": "Nike Football",
            "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/703222723_186067…",
            "is_verified": true
          },
          "position": null
        },
        {
          "user": {
            "pk": "197531066",
            "username": "alexiaputellas",
            "full_name": "Alexia Putellas",
            "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/670523551_185794…",
            "is_verified": true
          },
          "position": null
        },
        {
          "user": {
            "pk": "1530183979",
            "username": "nikelondon",
            "full_name": "Nike London",
            "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/527500131_185250…",
            "is_verified": true
          },
          "position": null
        }
      ],
      "code": "De-XRdaPg2A",
      "url": "https://www.instagram.com/p/De-XRdaPg2A/",
      "product_type": "clips",
      "caption": "Queen for a third time, @alexiaputellas.",
      "taken_at": 1793054065,
      "like_count": 43338,
      "comment_count": 283,
      "play_count": null,
      "view_count": null,
      "accessibility_caption": "Video by Nike on October 26, 2026. May be an image of sculpture, sword and text.",
      "user": {
        "pk": "13460080",
        "username": "nike",
        "full_name": "Nike",
        "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/551608484_185671…",
        "is_verified": true
      },
      "coauthor_producers": [
        {
          "pk": "1530183979",
          "username": "nikelondon",
          "full_name": "Nike London",
          "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/527500131_185250…",
          "is_verified": true
        },
        {
          "pk": "23678829",
          "username": "nikefootball",
          "full_name": "Nike Football",
          "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/703222723_186067…",
          "is_verified": true
        }
      ],
      "is_paid_partnership": null,
      "location": null,
      "carousel_media": []
    },
    {
      "pk": "4014317612986615579",
      "media_type": 2,
      "display_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-15/860365408_186581…",
      "images": [
        {
          "url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-15/860365408_186581…",
          "width": 720,
          "height": 1280
        }
      ],
      "videos": [
        {
          "url": "https://scontent-iad6-1.cdninstagram.com/o1/v/t2/f2/m86/AQOb3RDMLI2U1n3u…",
          "width": null,
          "height": null
        }
      ],
      "usertags": [
        {
          "user": {
            "pk": "13460080",
            "username": "nike",
            "full_name": "Nike",
            "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/551608484_185671…",
            "is_verified": true
          },
          "position": null
        }
      ],
      "code": "De1uJmpqUcb",
      "url": "https://www.instagram.com/p/De1uJmpqUcb/",
      "product_type": "clips",
      "caption": "The jacket does work, at least that much is clear.\n\nNike Tech SF3 is a w…",
      "taken_at": 1792764042,
      "like_count": 13288,
      "comment_count": 134,
      "play_count": null,
      "view_count": null,
      "accessibility_caption": "Video by Nike Sportswear on October 23, 2026. May be an image of standin…",
      "user": {
        "pk": "529358548",
        "username": "nsw",
        "full_name": "Nike Sportswear",
        "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/761251455_186276…",
        "is_verified": true
      },
      "coauthor_producers": [
        {
          "pk": "13460080",
          "username": "nike",
          "full_name": "Nike",
          "profile_pic_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/551608484_185671…",
          "is_verified": true
        }
      ],
      "is_paid_partnership": null,
      "location": null,
      "carousel_media": []
    }
  ],
  "end_cursor": "AQHTEV_lmxEgvDx9KSTwJLuDOC9g4LE54gqAlNEIMUzUqJCifYF_oohGt-2R8Cgm4vbj-TbH6CkEl8HInUWfwUqHwg",
  "has_next_page": true
}

Response fields

Every field in a successful response, and what it means. A name with [] belongs to each item of a list: posts[].pk is the pk of every item in posts. null means there's no value.

Show all 75 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
postsobject[]Posts in Instagram's timeline order, which can include pinned posts.
posts[].pkstringNumeric media id, as a string.
posts[].media_typenumberInstagram media type: 1 photo, 2 video, 8 carousel.
posts[].display_urlstringcan be nullPreview image URL; CDN links can expire; null when not returned.
posts[].imagesobject[]Available image sizes; empty when none are returned.
posts[].images[].urlstringDirect image URL; CDN links can expire.
posts[].images[].widthnumbercan be nullImage width in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].images[].heightnumbercan be nullImage height in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].videosobject[]Available MP4 versions; empty for photos or when video URLs are unavailable.
posts[].videos[].urlstringDirect MP4 URL; CDN links can expire.
posts[].videos[].widthnumbercan be nullVideo width in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].videos[].heightnumbercan be nullVideo height in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].usertagsobject[]can be nullAccounts tagged in this media, in Instagram's order; null when Instagram returns no tag list. On a carousel it lists every slide's tags; each carousel item has its own.
posts[].usertags[].userobjectThe tagged account.
posts[].usertags[].user.pkstringThe account's numeric Instagram id, as a string.
posts[].usertags[].user.usernamestringInstagram username, without @.
posts[].usertags[].user.full_namestringcan be nullDisplay name; null when not returned.
posts[].usertags[].user.profile_pic_urlstringcan be nullProfile image URL; CDN links can expire; null when not returned.
posts[].usertags[].user.is_verifiedbooleancan be nullWhether Instagram shows a verified badge; null when not returned.
posts[].usertags[].positionobjectcan be nullWhere the tag sits on the image; null when Instagram gives none (video tags come as 0, 0).
posts[].usertags[].position.xnumberDistance from the left edge, as a fraction of the width (0 to 1).
posts[].usertags[].position.ynumberDistance from the top edge, as a fraction of the height (0 to 1).
posts[].codestringThe post's case-sensitive shortcode.
posts[].urlstringCanonical Instagram post URL.
posts[].product_typestringcan be nullInstagram product type, e.g. clips for a reel or feed for a feed post; null when not returned.
posts[].captionstringcan be nullPost caption as plain text, preserving line breaks; null when the post has no caption.
posts[].taken_atnumbercan be nullWhen it was posted, as Unix seconds; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].like_countnumbercan be nullLike count; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].comment_countnumbercan be nullComment count; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].play_countnumbercan be nullPlay count. Instagram usually leaves it out for logged-out visitors; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].view_countnumbercan be nullView count. Instagram usually leaves it out for logged-out visitors; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].accessibility_captionstringcan be nullInstagram's accessibility description; null when not returned.
posts[].userobjectPost author.
posts[].user.pkstringThe account's numeric Instagram id, as a string.
posts[].user.usernamestringInstagram username, without @.
posts[].user.full_namestringcan be nullDisplay name; null when not returned.
posts[].user.profile_pic_urlstringcan be nullProfile image URL; CDN links can expire; null when not returned.
posts[].user.is_verifiedbooleancan be nullWhether Instagram shows a verified badge; null when not returned.
posts[].coauthor_producersobject[]The post's co-authors; empty when there are none.
posts[].coauthor_producers[].pkstringThe account's numeric Instagram id, as a string.
posts[].coauthor_producers[].usernamestringInstagram username, without @.
posts[].coauthor_producers[].full_namestringcan be nullDisplay name; null when not returned.
posts[].coauthor_producers[].profile_pic_urlstringcan be nullProfile image URL; CDN links can expire; null when not returned.
posts[].coauthor_producers[].is_verifiedbooleancan be nullWhether Instagram shows a verified badge; null when not returned.
posts[].is_paid_partnershipbooleancan be nullWhether Instagram marks the post as a paid partnership; null when not returned.
posts[].locationobjectcan be nullTagged location; null when none is returned.
posts[].location.pkstringcan be nullNumeric location id; null when not returned.
posts[].location.namestringcan be nullLocation name; null when not returned.
posts[].carousel_mediaobject[]Carousel items in order; empty for single-media posts.
posts[].carousel_media[].pkstringNumeric media id, as a string.
posts[].carousel_media[].media_typenumberInstagram media type: 1 photo, 2 video, 8 carousel.
posts[].carousel_media[].display_urlstringcan be nullPreview image URL; CDN links can expire; null when not returned.
posts[].carousel_media[].imagesobject[]Available image sizes; empty when none are returned.
posts[].carousel_media[].images[].urlstringDirect image URL; CDN links can expire.
posts[].carousel_media[].images[].widthnumbercan be nullImage width in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].carousel_media[].images[].heightnumbercan be nullImage height in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].carousel_media[].videosobject[]Available MP4 versions; empty for photos or when video URLs are unavailable.
posts[].carousel_media[].videos[].urlstringDirect MP4 URL; CDN links can expire.
posts[].carousel_media[].videos[].widthnumbercan be nullVideo width in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].carousel_media[].videos[].heightnumbercan be nullVideo height in pixels; null when Instagram doesn't show it. Null doesn't mean zero.
posts[].carousel_media[].usertagsobject[]can be nullAccounts tagged in this media, in Instagram's order; null when Instagram returns no tag list. On a carousel it lists every slide's tags; each carousel item has its own.
posts[].carousel_media[].usertags[].userobjectThe tagged account.
posts[].carousel_media[].usertags[].user.pkstringThe account's numeric Instagram id, as a string.
posts[].carousel_media[].usertags[].user.usernamestringInstagram username, without @.
posts[].carousel_media[].usertags[].user.full_namestringcan be nullDisplay name; null when not returned.
posts[].carousel_media[].usertags[].user.profile_pic_urlstringcan be nullProfile image URL; CDN links can expire; null when not returned.
posts[].carousel_media[].usertags[].user.is_verifiedbooleancan be nullWhether Instagram shows a verified badge; null when not returned.
posts[].carousel_media[].usertags[].positionobjectcan be nullWhere the tag sits on the image; null when Instagram gives none (video tags come as 0, 0).
posts[].carousel_media[].usertags[].position.xnumberDistance from the left edge, as a fraction of the width (0 to 1).
posts[].carousel_media[].usertags[].position.ynumberDistance from the top edge, as a fraction of the height (0 to 1).
end_cursorstringcan be nullPass it as after for the next page; null when not returned.
has_next_pagebooleanWhether there's another page. False on the last page.

Pagination

Results come in pages. To load more, pass the cursor from the previous response as after (When to use this says which field holds it). Each call costs 1 credit.

Cost and freshness

Each call costs 1 credit. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.

Answers are cached for up to 3 minutes. A repeat call within that time can return the same data, and costs the same.

Errors

A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.

StatusCodeMeaning
401missing_api_keyNo API key was sent. Put it in the x-api-key header.
401invalid_api_keyThis key doesn't exist or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack, or wait for tomorrow's free top-up.
402over_max_creditsThis call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged.
403account_suspendedThis account is suspended. Email support@lurkapi.com. Not charged.
403not_publicThe platform shows this account or post only to people who are logged in. Try a public one. Charged, since the platform was checked.
404not_foundWhat you asked for (a post, an ad, a subreddit) doesn't exist, or there's no endpoint at that path. Charged if the platform was checked.
405method_not_allowedEndpoints only take GET, with parameters in the URL.
429rate_limitedToo many calls in a short time. Wait as many seconds as the retry-after header says, then retry.
500internal_errorSomething broke on our side. Retry. Not charged.
502upstream_errorThe platform didn't send a usable answer. Retry. Not charged.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds. Not charged.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry. Not charged.

Use it in Claude

Connect LurkAPI to Claude and ask in plain English. This endpoint is the instagram_user_posts tool. For example:

Ask Claude
Use LurkAPI's instagram_user_posts tool with username "nike", first "12", then summarize what you find.

Claude calls instagram_user_posts with arguments like these, and each call costs 1 credit:

Tool arguments
{"username": "nike","first": "12"}

To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.

From the blog

All posts