LurkAPI
Docs · Post comments

Post comments

A page of public comments with authors, timestamps and likes.

1 credit per callFresh within 2 minutesMCP tool: instagram_post_comments
GEThttps://api.lurkapi.com/v2/instagram/post/comments

Example responseView as markdown

When to use this

Pass a post URL or shortcode. Comments are in Instagram's public order, which can differ from chronological order. Pass end_cursor as after for the next page. This endpoint returns comments rather than fetching all replies; a missing reply count stays null.

Parameters

All parameters go in the query string.

ParameterDescription
code
stringoptional
The post's shortcode, e.g. Ddl5eH-u4le. Required unless url is given.
url
stringoptional
An instagram.com/p/, /reel/ or /tv/ URL, or the shortcode. Required unless code is given.
Example
https://www.instagram.com/p/aye83DjauH/
first
integeroptional
Requested page size, 1–50; default 12. Instagram may return fewer items.
Default
12
Example
15
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 (2 KB)
{
  "success": true,
  "credits_remaining": 99,
  "credits_charged": 1,
  "comments": [
    {
      "pk": "17846920963063874",
      "text": "haha 😄 This is cute",
      "created_at": 1387393108,
      "comment_like_count": 0,
      "child_comment_count": null,
      "parent_comment_id": null,
      "user": {
        "pk": "23316075",
        "username": "danielakarinraffl",
        "full_name": null,
        "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.2885-19/483245904_1085995…",
        "is_verified": false
      }
    },
    {
      "pk": "17846527357063874",
      "text": "Eww",
      "created_at": 1382738486,
      "comment_like_count": 0,
      "child_comment_count": null,
      "parent_comment_id": null,
      "user": {
        "pk": "608886146",
        "username": "xiezc1",
        "full_name": null,
        "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/462656901_8380958…",
        "is_verified": false
      }
    }
  ],
  "end_cursor": "{\"is_server_cursor_inverse\":true,\"server_cursor\":\"AQHTHWl1x-fIQ1oM8-Cxb-…",
  "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 18 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).
commentsobject[]The comments Instagram returned for this page.
comments[].pkstringComment id, represented as a string.
comments[].textstringComment text, preserving line breaks.
comments[].created_atnumbernullablePublished at, Unix seconds; null when not shown or returned. A null count is not zero.
comments[].comment_like_countnumbernullableNumber of likes on the comment; null when not shown or returned. A null count is not zero.
comments[].child_comment_countnumbernullableReply count; frequently omitted in the public view; null when not shown or returned. A null count is not zero.
comments[].parent_comment_idstringnullableParent comment id; null for top-level comments or when unavailable; null when not returned.
comments[].userobjectComment author.
comments[].user.pkstringThe account's numeric Instagram id, represented as a string.
comments[].user.usernamestringInstagram username, without @.
comments[].user.full_namestringnullableDisplay name; null when not returned.
comments[].user.profile_pic_urlstringnullableProfile image URL; CDN links can expire; null when not returned.
comments[].user.is_verifiedbooleannullableWhether Instagram shows a verified badge; null when not returned.
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 2 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_post_comments tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's instagram_post_comments with url "https://www.instagram.com/p/aye83DjauH/", first "15" and summarize what you find.

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

Tool arguments
{
  "url": "https://www.instagram.com/p/aye83DjauH/",
  "first": "15"
}

Tool results skip nulls and empty lists to save tokens.