GETInsights4–12 credits
Comment sentiment
GET https://api.instagramapi.dev/v1/insights/post/commentsPages 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
| Name | Type | Required | Description |
|---|---|---|---|
| post | string | yes | An Instagram post/reel. Accepts a media id, a shortcode (`C1a2b3c4d5e`), or a full post/reel URL. We resolve it automatically. |
| comments | number | no | Comments 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 creditsExample 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.
| Field | Type | Description |
|---|---|---|
| post | string | The post URL whose comments were analyzed. |
| comments_analyzed | number | How many comments were analyzed. |
| sentiment | object | Positive / neutral / negative split, as percentages. |
| sentiment.positive_pct | number | Percentage of comments that are positive. |
| sentiment.neutral_pct | number | Percentage of comments that are neutral. |
| sentiment.negative_pct | number | Percentage of comments that are negative. |
| overall | string | Overall sentiment label. |
| themes | array<object> | Recurring themes found across the comments. |
| themes[].theme | string | A recurring theme. |
| themes[].mentions | number | How many comments mentioned this theme. |
| themes[].example | string | An example comment illustrating the theme. |
| spam_pct | number | Estimated percentage of comments that are spam. |
| top_positive | array<string> | Representative positive comments. |
| top_negative | array<string> | Representative negative comments. |
| summary | string | One-line summary of the comment reception. |