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.
https://api.socialtoai.com/v1/commentsRequest
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 | tiktok.comments | 2 | one of id, url | – | 50 |
instagram.comments | 2 | one of id, url | – | 15 | |
| X | x.comments | 2 | id | – | 60 |
reddit.comments | 2 | one of id, url | sort | 200 | |
| YouTube | youtube.comments | 2 | one of id, url | sort | 20 |
facebook.comments | 2 | id | – | 10 | |
| Xiaohongshu | xiaohongshu.comments | 12 | one of id, url | – | 20 |
| Douyin | douyin.comments | 2 | id | – | 20 |
weibo.comments | 2 | id | – | 20 | |
| WeChat Articles | wechat.comments | 12 | url | – | 20 |
| Bilibili | bilibili.comments | 2 | id | – | 20 |
| Zhihu | zhihu.comments | 2 | id | – | 20 |
| Kuaishou | kuaishou.comments | 2 | id | – | 40 |
| WeChat Channels | 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.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 https://api.socialtoai.com/v1/comments \ -H "Authorization: Bearer $SOCIALTOAI_KEY" \ -H "Content-Type: application/json" \ -d '{ "platform": "tiktok", "id": "7665840565958872333" }'import osimport requestsresponse = requests.post( "https://api.socialtoai.com/v1/comments", headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"}, json={ "platform": "tiktok", "id": "7665840565958872333", },)print(response.json()){ "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 with comment 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.
Last updated: