Instagram post comments API
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).
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). Instagram offers no 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 are not available.
- Cost: 1 credit
- 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, 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).
1curl -G "https://api.socialscrape.dev/v1/instagram/post/comments" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "url=https://www.instagram.com/reel/DfF3eqGSKKc/"1import os2import requests34params = {5 "url": "https://www.instagram.com/reel/DfF3eqGSKKc/",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/instagram/post/comments",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/instagram/post/comments");2url.search = new URLSearchParams({3 "url": "https://www.instagram.com/reel/DfF3eqGSKKc/"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Instagram post comments",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/instagram/post/comments",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "url",19 "value": "https://www.instagram.com/reel/DfF3eqGSKKc/"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}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.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_07b46edbabedfce260181380",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "comment",13 "platform": "instagram",14 "id": "18125925943986939",15 "url": "https://www.instagram.com/p/DfF3eqGSKKc/c/18125925943986939/",16 "post_id": "DfF3eqGSKKc",17 "parent_id": null,18 "author": {19 "id": "1000000001",20 "handle": "sample_user",21 "name": "Sample User",22 "url": null,23 "avatar_url": null,24 "verified": false25 },26 "text": "❤️❤️",27 "published_at": "2026-10-30T01:54:24Z",28 "stats": {29 "likes": 0,30 "replies": null,31 "dislikes": null32 },33 "is_pinned": null,34 "is_by_creator": false,35 "extra": null36 },37 {38 "object": "comment",39 "platform": "instagram",40 "id": "17995873727868359",41 "url": "https://www.instagram.com/p/DfF3eqGSKKc/c/17995873727868359/",42 "post_id": "DfF3eqGSKKc",43 "parent_id": null,44 "author": {45 "id": "1000000001",46 "handle": "sample_user",47 "name": "Sample User",48 "url": null,49 "avatar_url": null,50 "verified": false51 },52 "text": "🔥😍🔥",53 "published_at": "2026-10-30T01:13:04Z",54 "stats": {55 "likes": 1,56 "replies": null,57 "dislikes": null58 },59 "is_pinned": null,60 "is_by_creator": false,61 "extra": null62 }63 ],64 "cursor": null,65 "has_more": false,66 "parent": null67 },68 "cursor": null,69 "has_more": false70}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)