GETInsights4–12 credits

Comment sentiment

GET https://api.instagramapi.dev/v1/insights/post/comments

Pages a post's comments and runs AI sentiment + theme analysis: positive/neutral/negative split, recurring themes with examples, an estimated spam percentage, representative positive/negative comments, and a summary. Pass `comments` (1–200, default 60). Cost: 4–12 credits depending on how many comments are analyzed.

Build this with an AI agent

Paste this prompt into Claude, Codex, or any coding agent.

Parameters

NameTypeRequiredDescription
poststringyesAn Instagram post/reel. Accepts a media id, a shortcode (`C1a2b3c4d5e`), or a full post/reel URL. We resolve it automatically.
commentsnumbernoComments to analyze (1–200). Defaults to 60.

Example request

curl "https://api.instagramapi.dev/v1/insights/post/comments?post=https%3A%2F%2Fwww.instagram.com%2Fp%2FC1a2b3c4d5e%2F&comments=60" \
  -H "Authorization: Bearer $INSTAGRAMAPI_KEY"

Try it

Live request · uses 4 credits

Example responses

Switch tabs to see the body shape for success and each error status.

{
  "data": {
    "post": "https://www.instagram.com/p/DZK3iOsRlWX/",
    "comments_analyzed": 60,
    "sentiment": {
      "positive_pct": 78,
      "neutral_pct": 15,
      "negative_pct": 7
    },
    "overall": "positive",
    "themes": [
      {
        "theme": "product love",
        "mentions": 31,
        "example": "Need these 🔥"
      }
    ],
    "spam_pct": 5,
    "top_positive": [
      "Legendary 🔥"
    ],
    "top_negative": [
      "Too expensive"
    ],
    "summary": "Overwhelmingly positive reception centered on the product design."
  },
  "meta": {
    "endpoint": "insights/post/comments",
    "request_id": "req_3f8a1c9e",
    "credits_charged": 4,
    "credits_remaining": 4987,
    "ms": 412
  }
}

Response fields

Fields returned under data on a 200 response. Every response also includes a meta object with billing info.

FieldTypeDescription
poststringThe post URL whose comments were analyzed.
comments_analyzednumberHow many comments were analyzed.
sentimentobjectPositive / neutral / negative split, as percentages.
sentiment.positive_pctnumberPercentage of comments that are positive.
sentiment.neutral_pctnumberPercentage of comments that are neutral.
sentiment.negative_pctnumberPercentage of comments that are negative.
overallstringOverall sentiment label.
themesarray<object>Recurring themes found across the comments.
themes[].themestringA recurring theme.
themes[].mentionsnumberHow many comments mentioned this theme.
themes[].examplestringAn example comment illustrating the theme.
spam_pctnumberEstimated percentage of comments that are spam.
top_positivearray<string>Representative positive comments.
top_negativearray<string>Representative negative comments.
summarystringOne-line summary of the comment reception.