Instagram post comments
Beta GET /v1/instagram/post/comments
GET /v1/instagram/post/comments
The first page of a post's comments (about 14, in Instagram's own order), with each comment's likes; reply counts are null (Instagram sends them empty to logged-out visitors). Instagram offers no logged-out way to the next page, so has_more is always false and the total is in the post's stats.comments. include_replies is accepted and ignored: replies need a login.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
url | URL | one of | Post or reel URL (/p/..., /reel/..., /tv/...). Accepted hosts: instagram.com, instagr.am. |
id | string | one of | Shortcode or numeric media id. Also accepted as shortcode, media_id. |
include_replies | boolean | no | Accepted for compatibility; replies are not available logged out, so it changes nothing. Default false. |
Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/instagram/post/comments" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "url=https://www.instagram.com/reel/DfF3eqGSKKc/"import os
import requests
params = {
"url": "https://www.instagram.com/reel/DfF3eqGSKKc/",
}
res = requests.get(
"https://api.socialscrape.io/v1/instagram/post/comments",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/instagram/post/comments");
url.search = new URLSearchParams({
"url": "https://www.instagram.com/reel/DfF3eqGSKKc/"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Instagram post comments",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/instagram/post/comments",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.instagram.com/reel/DfF3eqGSKKc/"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened, other people's names and handles are replaced. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_07b46edbabedfce260181380",
"data": {
"object": "list",
"items": [
{
"object": "comment",
"platform": "instagram",
"id": "18125925943986939",
"url": "https://www.instagram.com/p/DfF3eqGSKKc/c/18125925943986939/",
"post_id": "DfF3eqGSKKc",
"parent_id": null,
"author": {
"id": "1000000001",
"handle": "sample_user",
"name": "Sample User",
"url": null,
"avatar_url": null,
"verified": false
},
"text": "❤️❤️",
"published_at": "2026-10-30T01:54:24Z",
"stats": {
"likes": 0,
"replies": null,
"dislikes": null
},
"is_pinned": null,
"is_by_creator": false,
"extra": null
},
{
"object": "comment",
"platform": "instagram",
"id": "17995873727868359",
"url": "https://www.instagram.com/p/DfF3eqGSKKc/c/17995873727868359/",
"post_id": "DfF3eqGSKKc",
"parent_id": null,
"author": {
"id": "1000000001",
"handle": "sample_user",
"name": "Sample User",
"url": null,
"avatar_url": null,
"verified": false
},
"text": "🔥😍🔥",
"published_at": "2026-10-30T01:13:04Z",
"stats": {
"likes": 1,
"replies": null,
"dislikes": null
},
"is_pinned": null,
"is_by_creator": false,
"extra": null
}
],
"cursor": null,
"has_more": false,
"parent": null
},
"cursor": null,
"has_more": false
}Response#
A list of Comment objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Also served at#
These paths answer the same request, so code written for other APIs keeps working: /v2/instagram/post/comments. See Switching from ScrapeCreators.
Related endpoints#
- Instagram profile (
GET /v1/instagram/profile) - Instagram profile by user id (
GET /v1/instagram/basic-profile) - Instagram profile post count (
GET /v1/instagram/profile/post-count) - Instagram profile posts (
GET /v1/instagram/profile/posts) - Instagram profile reels (
GET /v1/instagram/profile/reels) - Instagram post or reel details (
GET /v1/instagram/post) - Instagram reel transcript (
GET /v1/instagram/post/transcript) - Instagram popular topic (
GET /v1/instagram/search/popular)