# Instagram Comments API

The Instagram Comments API returns the comments under a public Instagram post: text, likes and time, in the same response format as every other SocialToAI call. One call costs 2 credits ($0.004 to $0.0067 depending on the pack); failed calls are free. Call it over HTTP or from your AI client over MCP. Last tested 2026-10-17.

- Page: https://socialtoai.com/instagram-comments-api/
- Last updated: 2026-10-17
- Last tested: 2026-10-17

| Request | Price key | Credits |
| --- | --- | --- |
| `POST /v1/comments` | `instagram.comments` | 2 |

## Request

```bash
curl https://api.socialtoai.com/v1/comments \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "id": "DeCPVhERA8e"
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/comments",
    headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"},
    json={
        "platform": "instagram",
        "id": "DeCPVhERA8e",
    },
)
print(response.json())
```

## Parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `platform` | string | Required | — | Always "instagram" on this page. |
| `id` | string | One of these | — | The post's shortcode: the part of its link after /p/ or /reel/ |
| `url` | string | One of these | — | Web link to the post or reel |
| `reply_of` | string | Optional | — | When given, returns the replies under one comment (2 credits). |
| `cursor` | string | Optional | — | Pass page.cursor from the last response to get the next page. |

## Other values of this call

| Selected by | Returns | Price key | Credits | Parameters |
| --- | --- | --- | --- | --- |
| `reply_of` | the replies under one comment | `instagram.comments:replies` | 2 | `id`, `reply_of` |

## Where the values come from

- `id`: The post's shortcode: the part of its link after /p/ or /reel/ (e.g. `DeCPVhERA8e`)
  Returned as `ref` by: [hashtag_posts](https://socialtoai.com/instagram-hashtag-posts-api.md), [user_posts](https://socialtoai.com/instagram-user-posts-api.md); or send their `url`.

## Response fields

| Field | Type | Meaning | Given |
| --- | --- | --- | --- |
| `items[].url` | string | A link to the comment, where the platform has one. | always null: Instagram does not give it |
| `items[].text` | string | The comment itself. | yes |
| `items[].published_at` | string | When it was posted, ISO 8601 in UTC. | yes |
| `items[].author.label` | string | An anonymous label, stable within one response. Whoever wrote it is never named. | yes |
| `items[].metrics.likes` | integer | Likes. | yes |
| `items[].reply_count` | integer | How many replies it has. | always null: Instagram does not give it |
| `items[].content_id` | string | The item the comment is under. | always null: Instagram does not give it |
| `items[].parent_id` | string | The comment it replies to directly; null for a top-level comment. | yes |
| `items[].root_id` | string | The top-level comment its thread hangs under. | yes |

Every item also has platform, id, ref, approx and type; the response around the items is the same on every call. [Response format](https://socialtoai.com/docs/api/response.md)

## Sample response

Sample data: names, links and text are replaced by placeholders; the numbers are as recorded.

```json
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-10-12T18:57:37.000Z",
  "action": "comments",
  "platform": "instagram",
  "status": "ok",
  "items": [
    {
      "platform": "instagram",
      "id": "…",
      "ref": "…",
      "approx": [],
      "type": "comment",
      "url": null,
      "text": "…",
      "published_at": "2026-10-12T18:11:33.000Z",
      "author": {
        "label": "anonymous_1"
      },
      "metrics": {
        "likes": 0
      },
      "reply_count": null,
      "content_id": null,
      "parent_id": null,
      "root_id": null
    }
  ],
  "unavailable": ["url", "reply_count", "content_id"],
  "page": {
    "has_more": true,
    "cursor": "cur_…",
    "cursor_expires_at": "2026-10-12T19:27:37.000Z"
  },
  "warnings": [],
  "applied_params": {
    "id": "DeCPVhERA8e"
  },
  "cost_credits": 2,
  "billing": {
    "cost_credits": 2,
    "balance_credits": 98,
    "today_spend_credits": 2,
    "daily_limit_credits": null,
    "daily_remaining_credits": null,
    "display": "This call: 2 credits. Balance: 98 credits."
  },
  "replayed": false
}
```

## Paging and failures

- One call returns a page of up to 15 items. When page.has_more is true, send page.cursor back as cursor for the next page; each page costs 2 credits and a cursor works for 30 minutes.
- A call that runs and finds nothing is a successful call: status is "empty", items is empty, and it costs 2 credits.
- 1 call per second per key, 5 after a purchase; going over is not charged. [Rate limits](https://socialtoai.com/docs/credits-and-billing.md#rate-limits)
- A failed call costs 0 credits and is never retried on its own. [Error codes](https://socialtoai.com/docs/api/errors.md)

## Ask your AI

- Read the comments under this Instagram post: DeCPVhERA8e → `comments {"platform":"instagram","id":"DeCPVhERA8e"}`, 2 credits
- Get a page of the newest Instagram posts under a hashtag, by its name, about 33 a page: nasa, then for the first 3: read the comments under this Instagram post. → `call {"op":"instagram.hashtag_posts","id":"nasa"}`, `comments {"platform":"instagram","id":"<ref>"}` × 3, 8 credits

## Tools that use it

- [Brand buzz](https://socialtoai.com/tools/brand-buzz.md): How people feel about it on each platform, what comes up most, and the posts behind it
- [Comment analysis](https://socialtoai.com/tools/comment-insights.md): The topics in their comments and how big each is, plus questions, buying intent and complaints
- [Account watch](https://socialtoai.com/tools/account-watch.md): What each one posted lately, and which posts beat its usual numbers
- [Creator profile](https://socialtoai.com/tools/creator-card.md): Their accounts on other platforms, the numbers on each, and how sure the match is

## The same call on other platforms

| Platform | Price key | Credits | Page |
| --- | --- | --- | --- |
| TikTok | `tiktok.comments` | 2 | https://socialtoai.com/tiktok-comments-api.md |
| X | `x.comments` | 2 | https://socialtoai.com/x-comments-api.md |
| Reddit | `reddit.comments` | 2 | https://socialtoai.com/reddit-comments-api.md |
| YouTube | `youtube.comments` | 2 | https://socialtoai.com/youtube-comments-api.md |
| Facebook | `facebook.comments` | 2 | https://socialtoai.com/facebook-comments-api.md |
| Xiaohongshu | `xiaohongshu.comments` | 12 | https://socialtoai.com/xiaohongshu-comments-api.md |
| Douyin | `douyin.comments` | 2 | https://socialtoai.com/douyin-comments-api.md |
| Weibo | `weibo.comments` | 2 | https://socialtoai.com/weibo-comments-api.md |
| WeChat Articles | `wechat.comments` | 12 | https://socialtoai.com/wechat-comments-api.md |
| Bilibili | `bilibili.comments` | 2 | https://socialtoai.com/bilibili-comments-api.md |
| Zhihu | `zhihu.comments` | 2 | https://socialtoai.com/zhihu-comments-api.md |
| Kuaishou | `kuaishou.comments` | 2 | https://socialtoai.com/kuaishou-comments-api.md |
| WeChat Channels | `wechat_channels.comments` | 12 | https://socialtoai.com/wechat-channels-comments-api.md |

## More on Instagram

| Interface | What it does | Price key | Credits | Page |
| --- | --- | --- | --- | --- |
| `search` | Find accounts by keyword: name. | `instagram.search:user` | 3 | https://socialtoai.com/instagram-search-api.md |
| `detail` | One post by ID or link: text, author, likes, comment count, views and publish time. | `instagram.detail` | 2 | https://socialtoai.com/instagram-detail-api.md |
| `user_profile` | One account: name, bio, followers and following. | `instagram.user_profile` | 2 | https://socialtoai.com/instagram-user-profile-api.md |
| `user_posts` | The recent posts of one account. | `instagram.user_posts` | 2 | https://socialtoai.com/instagram-user-posts-api.md |
| `hashtag_posts` | Get a page of the newest Instagram posts under a hashtag, by its name, about 33 a page. | `instagram.hashtag_posts` | 2 | https://socialtoai.com/instagram-hashtag-posts-api.md |

## FAQ

**Do I need a Instagram account or Instagram's own API access?**

No. You only need a SocialToAI key. The call returns content and account information publicly visible on Instagram; you never sign in to Instagram or apply for anything there.

**Can I get the replies under one comment?**

Yes: send reply_of in the request. That call costs 2 credits.
