Instagram data API

Instagram Comments API

Fetch the public comments of any Instagram post or reel by shortcode or URL. Each comment includes its text, author, like count, reply count and timestamp, and you page through long threads with a cursor.

Request

GET /v1/media/{shortcode}/comments · 2 credits per successful call

cURL
curl "https://api.igramapi.com/v1/media/Cx1AbCdEfGh/comments?limit=24" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK · application/json
{
  "shortcode": "Cx1AbCdEfGh",
  "media_id": "3012345678901234567",
  "total_comments": 112,
  "items": [
    {
      "id": "18012345678901234",
      "text": "This is stunning, where was it taken?",
      "created_at": 1761901200,
      "like_count": 12,
      "reply_count": 2,
      "parent_comment_id": null,
      "author": {
        "id": "9876543210",
        "username": "traveler_amy",
        "full_name": "Amy",
        "profile_picture_url": "https://scontent.cdninstagram.com/v/example/amy.jpg",
        "is_verified": false
      },
      "gif_url": null
    }
  ],
  "page": {
    "has_next_page": true,
    "end_cursor": "QVFDX2V4YW1wbGVjdXJzb3I"
  },
  "cached": false
}

All values above are made-up examples. Media links are temporary Instagram CDN addresses.

Parameters

NameInDescription
shortcoderequired path Post shortcode or URL.
cursor query `page.end_cursor` from the previous page.
limit query Comments per page, 1 to 50 (default 24).

Response fields

FieldTypeDescription
total_commentsinteger | nullComment count reported by the post.
items[].id / text / created_atstring / string / integerThe comment.
items[].like_count / reply_countintegerEngagement on the comment.
items[].authorobjectid, username, full_name, profile_picture_url, is_verified.
items[].gif_urlstring | nullGIF attached to the comment.
pageobjectPagination.

Public comments, no login

Works on any public post or reel. The poster does not need to connect your app.

Full author details

Username, name, picture and verification of each commenter, plus the comment's own like count.

Threads

reply_count and parent_comment_id let you rebuild reply threads.

Page size you choose

Ask for 1 to 50 comments per call and paginate with a cursor.

Why the official API cannot do this

Instagram's Graph API returns comments only for media owned by accounts that authorize your app. Reading the comments under someone else's public post is not possible with it, which is exactly what social listening, giveaway tools and sentiment analysis need.

The Comments API reads what any visitor can see on a public post and returns it as structured data.

Working with large comment threads

Request 50 comments per page and follow page.end_cursor until has_next_page is false. For very popular posts Instagram limits how deep the comment list can be read, so extremely long threads may not be fully retrievable.

Use total_comments to compare what you collected against the count Instagram reports.

Frequently asked questions

Can I get the replies to a comment?

Replies appear with `parent_comment_id` set, and `reply_count` shows how many a comment has.

How many comments can I fetch?

As many as Instagram exposes for the post, 50 per call. Instagram caps how deep very large threads can be read.

Does it cost more than other endpoints?

It uses 2 credits per page because each page is a heavier request.

Can I use comment data for giveaways?

Yes, but you are responsible for complying with Instagram's promotion rules and with privacy law when you store commenter data.

Errors cost nothing. Any response with a status of 400 or above is refunded, and every error has the same shape. See error handling and credits and rate limits.

Try the Comments API free

Create a key and make your first request in minutes. 100 free credits every month.