Skip to main content

Fetch a post's comments

Fetch one page of an Instagram post or reel's comments, newest first — each with its author, text, timestamp, like count, and any preview replies.

GET /v1/instagram/post/{post_id}/comments
What's included

Each request returns one page of comments plus a next_cursor. Page through a post's comments with the returned cursor, one page per request.

Path parameter​

ParameterDescription
post_idThe post shortcode (e.g. DcghxSFtjRB) or a full post URL (/p/…, /reel/…, /tv/…).

Query parameters​

ParameterTypeDefaultDescription
cursorstring—Omit for the first page; pass the next_cursor from a previous response to fetch the next page.

Examples​

First page:

curl -G "$LISTENX_BASE/v1/instagram/post/DcghxSFtjRB/comments" \
-H "X-API-Key: $LISTENX_KEY"

Fetch the next page by passing the previous response's next_cursor:

curl -G "$LISTENX_BASE/v1/instagram/post/DcghxSFtjRB/comments" \
-H "X-API-Key: $LISTENX_KEY" \
--data-urlencode 'cursor=cmt1_eyJjYWNoZWRfY29tbWVudHNfY3Vyc29yIjoiMTgwNjg…'

Keep following next_cursor until has_next_page is false to walk every comment, one page per request.

Response​

{
"post_id": "DcghxSFtjRB",
"shortcode": "DcghxSFtjRB",
"url": "https://www.instagram.com/p/DcghxSFtjRB/",
"comment_count": 238,
"returned": 2,
"has_next_page": true,
"next_cursor": "cmt1_eyJjYWNoZWRfY29tbWVudHNfY3Vyc29yIjoiMTgwNjg…",
"comments": [
{
"id": "18068394785637492",
"text": "This is gorgeous 😍",
"created_at": "2025-06-12T16:02:41+00:00",
"like_count": 54,
"reply_count": 1,
"author": {
"id": "15904929129",
"username": "jane.doe",
"full_name": "Jane Doe",
"is_verified": false,
"profile_pic_url": "https://…"
},
"replies": [
{
"id": "18068394785637493",
"text": "Agreed!",
"created_at": "2025-06-12T16:10:03+00:00",
"like_count": 3,
"reply_count": null,
"author": {
"id": "15904929130",
"username": "another.user",
"full_name": "Another User",
"is_verified": false,
"profile_pic_url": "https://…"
},
"replies": []
}
]
},
{
"id": "18068394785637500",
"text": "Love this 🔥",
"created_at": "2025-06-12T16:05:12+00:00",
"like_count": 7,
"reply_count": 0,
"author": {
"id": "15904929131",
"username": "third.user",
"full_name": "Third User",
"is_verified": true,
"profile_pic_url": "https://…"
},
"replies": []
}
],
"billing": {
"endpoint": "instagram.comments",
"units": 1,
"unit_price": "0.010000",
"amount": "0.010000",
"balance_after": "97.210000",
"request_id": "…"
}
}

Fields​

FieldDescription
post_id / shortcodeShortcode of the post these comments belong to.
urlCanonical post permalink.
comment_countTotal comments on the post (may exceed those returned on this page).
returnedNumber of top-level comments in comments on this page.
has_next_pagetrue if more comment pages remain.
next_cursorOpaque cursor for the next page — pass it back as cursor; null when exhausted.
comments[]Comments with author, text, timestamp, like count, and preview replies.

Comment​

FieldDescription
idComment id.
textComment text.
created_atISO 8601 UTC timestamp.
like_countLikes on the comment, when available.
reply_countNumber of replies to the comment.
authorCommenter details (id, username, full_name, is_verified, profile_pic_url).
replies[]Preview replies returned inline with the comment, when available.

Billing​

Billed per page — one unit per request (each request returns a single page). Paging through every comment costs one unit per page fetched. See Billing.

Errors​

HTTPcodeMeaning
400invalid_post_idNot a valid shortcode/URL.
404post_not_foundPrivate, deleted, nonexistent, or comments disabled.
429upstream_rate_limitedTransient block — retry with backoff.