SocialToAIStart freeConsole

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.

POSThttps://socialtoai.app/v1/comments

Request

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

NameTypeWhereRequiredWhat it is
platformstringbodyYesThe platform to read. One of the platforms this action is offered on.
limitintegerbodyNoOf search, trending, comments and user_posts: how many items you want. Pages are fetched one after another in the one call until there are that many or no more, each page charged as a call; pages not needed cost 0.
max_cost_creditsintegerbodyNoThe most this call may cost. Over it, the call is refused for free and the answer carries the quote.
Idempotency-KeystringheaderNo1 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.

PlatformPrice keyCreditsRequiredOptionalPer page
TikToktiktok.comments2one of id, url–50
Instagraminstagram.comments2one of id, url–15
Xx.comments2id–60
Redditreddit.comments2one of id, urlsort200
YouTubeyoutube.comments2one of id, urlsort20
Facebookfacebook.comments2id–10
Xiaohongshuxiaohongshu.comments12one of id, urlsort20
Douyindouyin.comments2one of id, url–20
Weiboweibo.comments2one of id, url–20
WeChat Articleswechat.comments12url–100
Bilibilibilibili.comments2idsort20
Zhihuzhihu.comments2id–20
Kuaishoukuaishou.comments2one of id, url–40
WeChat Channelswechat_channels.comments12id–30

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

PlatformPrice keyCreditsSelected by
TikToktiktok.comments:replies2reply_of
Instagraminstagram.comments:replies2reply_of
YouTubeyoutube.comments:replies2reply_of
Xiaohongshuxiaohongshu.comments:replies12reply_of
Douyindouyin.comments:replies2reply_of
Weiboweibo.comments:replies2reply_of
WeChat Articleswechat.comments:replies12reply_of
Bilibilibilibili.comments:replies2reply_of
Zhihuzhihu.comments:replies2reply_of
Kuaishoukuaishou.comments:replies2reply_of
WeChat Channelswechat_channels.comments:replies9reply_of

Parameters

NameTypeWhat it isTaken by
idstringVideo ID, a string of digitsTikTok, Instagram, X, Reddit, YouTube, Facebook, Xiaohongshu, Douyin, Weibo, Bilibili, Zhihu, Kuaishou and WeChat Channels
urlstringLink to the video, pasted as it is: the https://www.tiktok.com/@handle/video/… web link, the www.tiktok.com/t/… or vm.tiktok.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads toTikTok, Instagram, Reddit, YouTube, Xiaohongshu, Douyin, Weibo, WeChat Articles and Kuaishou
reply_ofstringComment ID, a string of digitsTikTok, Instagram, YouTube, Xiaohongshu, Douyin, Weibo, WeChat Articles, Bilibili, Zhihu, Kuaishou and WeChat Channels
sortstringReddit's default order (best), newest first, or top score first Values vary by platform: best, latest, popularReddit, YouTube, Xiaohongshu and Bilibili

Example

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

curl https://socialtoai.app/v1/comments \  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \  -H "Idempotency-Key: $(uuidgen)" \  -H "Content-Type: application/json" \  -d '{    "platform": "tiktok",    "id": "7665840565958872333"  }'
import osimport uuidimport requestsresponse = requests.post(    "https://socialtoai.app/v1/comments",    headers={        "Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}",        # A new key for each request; the same one again retries it without paying twice.        "Idempotency-Key": str(uuid.uuid4()),    },    json={        "platform": "tiktok",        "id": "7665840565958872333",    },)print(response.json())
Response200 OK2 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": [],      "extra": {},      "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 (≈ $0.0067). Balance: 98 credits (≈ $0.33)."  },  "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: