Instagram comments by media ID: comment list API
Comments on a post or reel, looked up by its numeric media ID.
About the Post comments by media ID endpoint
Instagram gives every post a permanent numeric media ID in addition to its shortcode. This endpoint returns a post's comments from that media ID, with each comment's text, date, like count and commenter details. Use it when your data already carries media IDs, for example from the posts or latest posts endpoints, so you can go from a post list straight to its comments.
What you can build with it
- Pipelines that list an account's posts, then fetch comments for each by media ID
- Comment monitoring on stored posts without keeping shortcodes
- Engagement analysis across many posts of an account
Request
https://socialgraph.dev/api/v1/instagram/comments-by-media-id
Send your API key as Authorization: Bearer YOUR_API_KEY.
Parameters go in the query string.
Parameters
| Name | Type | Description |
|---|---|---|
media_idrequired |
string | Numeric media ID, e.g. 3997709076073266764. |
Code examples
Example response
{
"count": 136,
"comments": [
{
"comment": "@apple DISSATISFACTION",
"media_id": "3997709076073266764",
"commenter": {
"id": "2458375770",
"avatar": "https://scontent.cdninstagram.com/v/t51.82787-19/572390069_….jpg",
"username": "s0n_of_almighty"
},
"comment_id": "18109921640590139",
"comment_date": "2026-10-13T08:09:43Z"
},
{
"comment": "@steve_jobs_unofficial",
"media_id": "3997709076073266764",
"commenter": {
"id": "2458375770",
"avatar": "https://scontent.cdninstagram.com/v/t51.82787-19/572390069_….jpg",
"username": "s0n_of_almighty"
},
"comment_id": "18093089027179296",
"comment_date": "2026-10-13T08:09:08Z"
},
"… 136 comments in total"
],
"media_id": "3997709076073266764",
"short_code": "Dd6tzlSs75M"
}Errors
| Status | Meaning | Charged? |
|---|---|---|
| 401 | Missing, invalid or revoked API key | No |
| 402 | Not enough credits (insufficient_credits) | No |
| 404 | The account or post doesn't exist | No |
| 422 | Missing or invalid parameters | No |
| 502 / 503 | The data source is temporarily unavailable | No |
Post comments by media ID API: frequently asked questions
Where do I get an Instagram media ID?
Post responses from the Latest posts, Recent posts and Post details endpoints include each post's id, which is the media ID.
Is a media ID the same as a shortcode?
No. The shortcode is the short code in the post URL; the media ID is a long number. Both identify the same post, and both comment endpoints return the same data.
How many comments are returned?
The post's public comment threads as Instagram exposes them, with text, dates, like counts and commenter usernames.
Are comments on private accounts available?
No. Only comments on public posts can be returned.
How much does the Post comments by media ID endpoint cost?
2 credits per successful call (0.004 USD at 500 credits per dollar). Errors, "not found" responses and invalid input are never charged, and credits never expire.
Can I try the Post comments by media ID API without signing up?
Yes. The live demo on this page runs a real request with a fixed sample input, free and without an account. Creating a free account gives you 100 credits to test every endpoint with your own inputs.
🔒 Preset demo input. Live demos use Instagram's own account, @instagram. Sign up free to use your own.