Ssocialgraph.dev
API reference / Instagram API / Post comments by shortcode

Instagram comments API: get a post's comments by shortcode

Comments on a post or reel, looked up by its shortcode.

2 credits per successful call Errors are never charged No login or OAuth needed

About the Post comments by shortcode endpoint

The Instagram comments API returns the comments on a public post from its shortcode, the code in the post URL, with each comment's text, date, like count and the commenter's ID and username. It turns a post link into structured comment data you can analyse for sentiment, questions, mentions and engaged followers.

What you can build with it

  • Sentiment analysis of reactions to a product launch or campaign post
  • Community management: find questions and complaints in comments
  • Giveaway and contest tools that read entries from post comments

Request

GET https://socialgraph.dev/api/v1/instagram/comments-by-shortcode

Send your API key as Authorization: Bearer YOUR_API_KEY. Parameters go in the query string.

Parameters

NameTypeDescription
shortcode
required
string Post or reel shortcode from its URL, e.g. Dd6tzlSs75M.

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

StatusMeaningCharged?
401Missing, invalid or revoked API keyNo
402Not enough credits (insufficient_credits)No
404The account or post doesn't existNo
422Missing or invalid parametersNo
502 / 503The data source is temporarily unavailableNo

All error codes →

Post comments by shortcode API: frequently asked questions

How do I get Instagram comments from a post URL?

Take the shortcode from the URL (the part after /p/ or /reel/) and pass it as the shortcode parameter.

Does the API return replies to comments?

It returns the post's comment threads as Instagram exposes them publicly, including the commenter details and like counts.

Can I get comments by media ID instead?

Yes, the Post comments by media ID endpoint takes the numeric media ID and returns the same data.

Why do comment requests take longer than other calls?

Comments are fetched live and can take 20–40 seconds for busy posts. Set your client timeout to at least 60 seconds.

How much does the Post comments by shortcode 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 shortcode 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.

Try it live: Post comments by shortcode GET

🔒 Preset demo input. Live demos use Instagram's own account, @instagram. Sign up free to use your own.

Start with 100 free credits

Create an account in seconds. No card, no subscription. Credits never expire.

Create free account →