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 responseView as markdown

When to use this

Pass a username or profile URL. Up to 50 posts can be requested; Instagram may return fewer. Preserve end_cursor exactly and pass it as after to continue. Private posts are unavailable. Cached pages cost the same as fresh pages.

Parameters

All parameters go in the query string.

ParameterDescription
username
stringoptional
Instagram username, with or without @, or a profile URL. Required unless url is given.
Example
nike
url
stringoptional
An instagram.com profile URL. Required unless username is given.
first
integeroptional
Requested page size, 1–50; default 12. Instagram may return fewer items.
Default
12
Example
12
after
stringoptional
Pass end_cursor from the previous page unchanged; omit for the first page.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (5 KB)
{
  "success": true,
  "credits_remaining": 99,
  "credits_charged": 1,
  "posts": [
    {
      "pk": "3991849403537918302",
      "media_type": 2,
      "display_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/809201733_186664…",
      "images": [
        {
          "url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/809201733_186664…",
          "width": 1080,
          "height": 1920
        }
      ],
      "videos": [
        {
          "url": "https://scontent-iad6-1.cdninstagram.com/o1/v/t2/f2/m86/AQNTYMwiQ36mUhGO…",
          "width": 720,
          "height": 1280
        }
      ],
      "code": "Ddl5eH-u4le",
      "url": "https://www.instagram.com/p/Ddl5eH-u4le/",
      "product_type": "clips",
      "caption": "*Just a normal day for @caitlinclark22.\n\nWake up. Eat cereal. Lace up th…",
      "taken_at": 1790085604,
      "like_count": 67594,
      "comment_count": 1062,
      "play_count": null,
      "view_count": null,
      "accessibility_caption": null,
      "user": {
        "pk": "13460080",
        "username": "nike",
        "full_name": "Nike",
        "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/551608484_185671…",
        "is_verified": true
      },
      "coauthor_producers": [
        {
          "pk": "306787899",
          "username": "nikebasketball",
          "full_name": "Nike Basketball",
          "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.2885-19/476165648_5629502…",
          "is_verified": true
        }
      ],
      "is_paid_partnership": false,
      "location": null,
      "carousel_media": []
    },
    {
      "pk": "3989102691637366197",
      "media_type": 8,
      "display_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/796460834_186652…",
      "images": [
        {
          "url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/796460834_186652…",
          "width": 1080,
          "height": 1350
        }
      ],
      "videos": [],
      "code": "DdcI8NLmY21",
      "url": "https://www.instagram.com/p/DdcI8NLmY21/",
      "product_type": "carousel_container",
      "caption": "Nike Atelier for Sha’Carri Richardson reflects the beauty of London afte…",
      "taken_at": 1789758119,
      "like_count": 61729,
      "comment_count": 1308,
      "play_count": null,
      "view_count": null,
      "accessibility_caption": null,
      "user": {
        "pk": "13460080",
        "username": "nike",
        "full_name": "Nike",
        "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/551608484_185671…",
        "is_verified": true
      },
      "coauthor_producers": [
        {
          "pk": "342441068",
          "username": "itsshacarri",
          "full_name": "Sha’Carri Richardson",
          "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/710700885_185944…",
          "is_verified": true
        },
        {
          "pk": "286654768",
          "username": "nikerunning",
          "full_name": "Nike Running",
          "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/586863358_185610…",
          "is_verified": true
        }
      ],
      "is_paid_partnership": false,
      "location": null,
      "carousel_media": [
        {
          "pk": "3989101150044733870",
          "media_type": 1,
          "display_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/796460834_186652…",
          "images": [
            {
              "url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-15/796460834_186652…",
              "width": 1080,
              "height": 1350
            }
          ],
          "videos": []
        },
        {
          "pk": "3989101151336647994",
          "media_type": 1,
          "display_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/812755144_186652…",
          "images": [
            {
              "url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/812755144_186652…",
              "width": 1080,
              "height": 1350
            }
          ],
          "videos": []
        }
      ]
    }
  ],
  "end_cursor": "AQHTJo-0f314Mv-BY-dDG3AI2BEyG7vK1jJa1VMBjCp426TIUTLO6UAla2xoA7FYmfyk0FjflaCNbai4iXVSsc-guw",
  "has_next_page": true
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 55 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, represented as a string.
posts[].media_typenumberInstagram media type: 1 photo, 2 video, 8 carousel.
posts[].display_urlstringnullablePreview 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[].widthnumbernullableImage width in pixels; null when not shown or returned. A null count is not zero.
posts[].images[].heightnumbernullableImage height in pixels; null when not shown or returned. A null count is not 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[].widthnumbernullableVideo width in pixels; null when not shown or returned. A null count is not zero.
posts[].videos[].heightnumbernullableVideo height in pixels; null when not shown or returned. A null count is not zero.
posts[].codestringThe post's case-sensitive shortcode.
posts[].urlstringCanonical Instagram post URL.
posts[].product_typestringnullableInstagram product type, e.g. clips for a reel or feed for a feed post; null when not returned.
posts[].captionstringnullablePost caption as plain text, preserving line breaks; an empty string is an explicitly empty caption; null when not returned.
posts[].taken_atnumbernullablePublished at, Unix seconds; null when not shown or returned. A null count is not zero.
posts[].like_countnumbernullableLike count; null when not shown or returned. A null count is not zero.
posts[].comment_countnumbernullableComment count; null when not shown or returned. A null count is not zero.
posts[].play_countnumbernullablePlay count; usually omitted on logged-out post and timeline queries; null when not shown or returned. A null count is not zero.
posts[].view_countnumbernullableView count; usually omitted on logged-out post and timeline queries; null when not shown or returned. A null count is not zero.
posts[].accessibility_captionstringnullableInstagram's accessibility description; null when not returned.
posts[].userobjectPost author.
posts[].user.pkstringThe account's numeric Instagram id, represented as a string.
posts[].user.usernamestringInstagram username, without @.
posts[].user.full_namestringnullableDisplay name; null when not returned.
posts[].user.profile_pic_urlstringnullableProfile image URL; CDN links can expire; null when not returned.
posts[].user.is_verifiedbooleannullableWhether Instagram shows a verified badge; null when not returned.
posts[].coauthor_producersobject[]Coauthors returned by Instagram; empty when none are returned.
posts[].coauthor_producers[].pkstringThe account's numeric Instagram id, represented as a string.
posts[].coauthor_producers[].usernamestringInstagram username, without @.
posts[].coauthor_producers[].full_namestringnullableDisplay name; null when not returned.
posts[].coauthor_producers[].profile_pic_urlstringnullableProfile image URL; CDN links can expire; null when not returned.
posts[].coauthor_producers[].is_verifiedbooleannullableWhether Instagram shows a verified badge; null when not returned.
posts[].is_paid_partnershipbooleannullableWhether Instagram marks the post as a paid partnership; null when not returned.
posts[].locationobjectnullableTagged location; null when none is returned.
posts[].location.pkstringnullableNumeric location id; null when not returned.
posts[].location.namestringnullableLocation name; null when not returned.
posts[].carousel_mediaobject[]Carousel items in order; empty for single-media posts.
posts[].carousel_media[].pkstringNumeric media id, represented as a string.
posts[].carousel_media[].media_typenumberInstagram media type: 1 photo, 2 video, 8 carousel.
posts[].carousel_media[].display_urlstringnullablePreview 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[].widthnumbernullableImage width in pixels; null when not shown or returned. A null count is not zero.
posts[].carousel_media[].images[].heightnumbernullableImage height in pixels; null when not shown or returned. A null count is not 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[].widthnumbernullableVideo width in pixels; null when not shown or returned. A null count is not zero.
posts[].carousel_media[].videos[].heightnumbernullableVideo height in pixels; null when not shown or returned. A null count is not zero.
end_cursorstringnullableOpaque pagination cursor; pass it as after for the next page; null when not returned.
has_next_pagebooleanWhether Instagram reports another page. A false value ends pagination.

Pagination

Pass a cursor from a previous response as after to load more (see When to use this). Each call costs 1 credit.

Caching and freshness

Responses are cached for up to 3 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
403not_publicThe platform confirmed this account or content isn't available to logged-out visitors. Use a publicly visible target. Charged when the platform was checked.
404not_foundThe endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer. Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the instagram_user_posts tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's instagram_user_posts with username "nike", first "12" and 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"
}

Tool results skip nulls and empty lists to save tokens.