# comments

POST /v1/comments is the comments action: comments under a post. It is offered on 14 platforms (TikTok, Instagram, X, Reddit, YouTube, Facebook and 8 more), and the platform is a parameter of the request. One call costs 2 to 12 credits, depending on the platform; a call that fails costs nothing.

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

- POST: `https://api.socialtoai.com/v1/comments`

## Request

A JSON body. These are the same for every action; the rest depends on the platform, below.

| Name | Type | Where | Required | What it is |
| --- | --- | --- | --- | --- |
| `platform` | string | body | Yes | The platform to read. One of the platforms this action is offered on. |
| `max_cost_credits` | integer | body | No | The most this call may cost. Over it, the call is refused for free and the answer carries the quote. |
| `Idempotency-Key` | string | header | No | 1 to 255 visible ASCII characters. The same key with the same parameters returns the first result again and is not charged twice. |

## Platforms and credits

Each platform takes its own parameters. Its own page has the full parameter and field tables and a request you can change.

| Platform | Price key | Credits | Required | Optional | Per page |
| --- | --- | --- | --- | --- | --- |
| [TikTok](https://socialtoai.com/tiktok-comments-api.md) | `tiktok.comments` | 2 | one of `id`, `url` | – | 50 |
| [Instagram](https://socialtoai.com/instagram-comments-api.md) | `instagram.comments` | 2 | one of `id`, `url` | – | 15 |
| [X](https://socialtoai.com/x-comments-api.md) | `x.comments` | 2 | `id` | – | 60 |
| [Reddit](https://socialtoai.com/reddit-comments-api.md) | `reddit.comments` | 2 | one of `id`, `url` | `sort` | 200 |
| [YouTube](https://socialtoai.com/youtube-comments-api.md) | `youtube.comments` | 2 | one of `id`, `url` | `sort` | 20 |
| [Facebook](https://socialtoai.com/facebook-comments-api.md) | `facebook.comments` | 2 | `id` | – | 10 |
| [Xiaohongshu](https://socialtoai.com/xiaohongshu-comments-api.md) | `xiaohongshu.comments` | 12 | one of `id`, `url` | – | 20 |
| [Douyin](https://socialtoai.com/douyin-comments-api.md) | `douyin.comments` | 2 | `id` | – | 20 |
| [Weibo](https://socialtoai.com/weibo-comments-api.md) | `weibo.comments` | 2 | `id` | – | 20 |
| [WeChat Articles](https://socialtoai.com/wechat-comments-api.md) | `wechat.comments` | 12 | `url` | – | 20 |
| [Bilibili](https://socialtoai.com/bilibili-comments-api.md) | `bilibili.comments` | 2 | `id` | – | 20 |
| [Zhihu](https://socialtoai.com/zhihu-comments-api.md) | `zhihu.comments` | 2 | `id` | – | 20 |
| [Kuaishou](https://socialtoai.com/kuaishou-comments-api.md) | `kuaishou.comments` | 2 | `id` | – | 40 |
| [WeChat Channels](https://socialtoai.com/wechat-channels-comments-api.md) | `wechat_channels.comments` | 12 | `id` | – | 30 |

Some platforms have another form of this action, selected by a parameter and priced on its own:

| Platform | Price key | Credits | Selected by |
| --- | --- | --- | --- |
| TikTok | `tiktok.comments:replies` | 2 | `reply_of` |
| Instagram | `instagram.comments:replies` | 2 | `reply_of` |
| YouTube | `youtube.comments:replies` | 2 | `reply_of` |
| Xiaohongshu | `xiaohongshu.comments:replies` | 12 | `reply_of` |
| Douyin | `douyin.comments:replies` | 2 | `reply_of` |
| Bilibili | `bilibili.comments:replies` | 2 | `reply_of` |
| Zhihu | `zhihu.comments:replies` | 2 | `reply_of` |
| Kuaishou | `kuaishou.comments:replies` | 2 | `reply_of` |

## Parameters

| Name | Type | What it is | Taken by |
| --- | --- | --- | --- |
| `id` | string | Video ID, a string of digits | TikTok, Instagram, X, Reddit, YouTube, Facebook, Xiaohongshu, Douyin, Weibo, Bilibili, Zhihu, Kuaishou and WeChat Channels |
| `url` | string | Web link to the video | TikTok, Instagram, Reddit, YouTube, Xiaohongshu and WeChat Articles |
| `reply_of` | string | Comment ID, a string of digits | TikTok, Instagram, YouTube, Xiaohongshu, Douyin, Bilibili, Zhihu and Kuaishou |
| `sort` | string | Reddit's default order (best), newest first, or top score first Values vary by platform: `best`, `latest`, `popular` | Reddit and YouTube |

## Example

TikTok: The comments under one video: text, likes, reply count and time.

**cURL**

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

**Python**

```
import os
import requests

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

**Response** (200 OK, 2 credits)

```
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-10-12T18:45:47.000Z",
  "action": "comments",
  "platform": "tiktok",
  "status": "ok",
  "items": [
    {
      "platform": "tiktok",
      "id": "…",
      "ref": "…",
      "approx": [],
      "type": "comment",
      "url": null,
      "text": "…",
      "published_at": "2026-10-08T14:20:19.000Z",
      "author": {
        "label": "anonymous_1"
      },
      "metrics": {
        "likes": 1430
      },
      "reply_count": 37,
      "content_id": "…",
      "parent_id": null,
      "root_id": null
    }
  ],
  "unavailable": ["url"],
  "page": {
    "has_more": true,
    "cursor": "cur_…",
    "cursor_expires_at": "2026-10-12T19:15:47.000Z"
  },
  "warnings": [],
  "applied_params": {
    "id": "7665840565958872333"
  },
  "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
}
```

_Sample data: names, links and text are replaced by placeholders._

## What comes back

The [envelope](https://socialtoai.com/docs/api/response.md) with [`comment`](https://socialtoai.com/docs/api/response.md) items. One call returns one page of up to 50 items; each page is its own call. A cursor works for up to 30 minutes.

A failed call costs 0 credits and says why: see [Errors](https://socialtoai.com/docs/api/errors.md).
