Douyin Comment Analysis: Search Videos, Pull Comments and Replies by API

Find high-comment videos by keyword, read details, pull top-level comments and threaded replies, linked by reply_to_id. Four steps, about $0.010.

To see how Douyin users talk about a product category, run four steps per round: douyin/search finds videos by keyword, douyin/video reads video details, douyin/comments pulls top-level comments, and douyin/comment_replies pulls the replies under one comment. At catalog price, search is $0.008333 and the other three are $0.000556 each, about $0.010 a round.

The walkthrough uses live calls from November 29, 2026, with the Chinese word for sunscreen as the keyword, sent exactly as written.

StepEndpointCatalog price
1douyin/search$0.008333
2douyin/video$0.000556
3douyin/comments$0.000556 per 20 comments
4douyin/comment_replies$0.000556 per 20 replies

Results are sorted by relevance by default, 10 per page. Set sort to newest or most_liked instead, and use publish_time to limit the posting window.

Step 1: curl
curl -X POST https://api.everyinfra.com/api/v1/social \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"douyin","action":"search","params":{"keyword":"防晒霜"}}'

Request body:

Request body
{
  "platform": "douyin",
  "action": "search",
  "params": {
    "keyword": "防晒霜"
  }
}

Take the first result with a comment_count of at least 50 and keep its url for the next three steps.

Response excerpt: first qualifying video
{
  "id": "7654539454732939121",
  "url": "https://www.douyin.com/video/7654539454732939121",
  "text": "实打实花了50w的防晒检测数据来了!!!马上暑假,这条视频一定能帮到你!!#防晒 #户外防晒 #全民买手请回答",
  "like_count": 22662,
  "comment_count": 1776,
  "collect_count": 10858,
  "posted_at": "2026-06-23T10:42:29+00:00",
  "duration_sec": 649
}

Step 2: Read the video details

Use the video url to get likes, comments, shares, saves and duration, and confirm the comments are worth reading.

Request body
{
  "platform": "douyin",
  "action": "video",
  "params": {
    "url": "https://www.douyin.com/video/7654539454732939121"
  }
}

Step 3 reuses the same url.

Response excerpt
{
  "id": "7654539454732939121",
  "like_count": 22662,
  "comment_count": 1776,
  "share_count": 3701,
  "collect_count": 10858,
  "posted_at": "2026-06-23T10:42:29+00:00",
  "duration_sec": 649
}

Step 3: Pull top-level comments

Request body
{
  "platform": "douyin",
  "action": "comments",
  "params": {
    "url": "https://www.douyin.com/video/7654539454732939121"
  }
}

Step 4 needs a comment_id: pick a top-level comment whose reply_count is above 0 and take its id; the video url stays the same. The excerpt below is the first comment returned, and its reply_count is 0. Step 4 uses a later comment that has replies, id 7711996488398652209.

Response excerpt: first comment
{
  "id": "7713516052249232165",
  "text": "有人用过新碧小粉帽嘛?我觉得很好用,不跟粉底打架,至于说熏眼睛,我没感觉到诶,可能是我好像属于不怎么流汗那种[眼含热泪]",
  "like_count": 0,
  "reply_count": 0,
  "ip_location": "江西",
  "posted_at": "2026-11-29T09:01:49+00:00",
  "author_name": "<昵称>",
  "is_hot": false
}

Comments bill by count: every 20 comments is one call, with up to 50 per page. To page forward, pass next_page_token back as page_token and keep the other parameters unchanged.

Step 4: Pull the replies under one comment

Request body
{
  "platform": "douyin",
  "action": "comment_replies",
  "params": {
    "url": "https://www.douyin.com/video/7654539454732939121",
    "comment_id": "7711996488398652209"
  }
}

Each reply's reply_to_id points back to the id of the top-level comment from step 3. Use it to join the two tables.

Response excerpt
{
  "id": "7711996763490960165",
  "text": "这个防晒能力怎么样呀?打算去青甘大环线的适合用",
  "like_count": 0,
  "posted_at": "2026-11-25T06:46:13+00:00",
  "author_name": "<昵称>",
  "reply_to_id": "7711996488398652209"
}

Only call this step for comments with reply_count above 0. Every 20 replies is one call, and a call that returns no replies is not charged.

What to do with the data

  • Keep top-level comments and replies in one table; rows with an empty reply_to_id are top-level. Deduplicate by id before running word frequency or sentiment.
  • ip_location and posted_at give you regional and time distributions. is_hot marks comments the platform flags as hot, which are worth reading on their own.
  • Page tokens are valid for 24 hours and only with the same parameters. For a rerun the next day, start from page 1 and write only new comments by id.

FAQ

How much does it cost to analyze the comments on one Douyin video?

Search is $0.008333 per call. Video details, comments and replies are $0.000556 each. Comments count one call per 20 rows, so 200 top-level comments is 10 calls, about $0.0056.

Am I charged if the video is gone or has no replies?

No. A deleted or hidden video returns an empty result with empty_reason set to post_unavailable, and a reply call that returns nothing is free. Failed requests and invalid parameters are not charged either.

Do I need a Douyin account?

No. One API key is enough. There is no QR login or cookie to maintain, and no scraper or proxy to run yourself.

Can an agent in Claude read Douyin comments directly?

Yes. Add https://api.everyinfra.com/mcp to Claude's remote MCP settings with an Authorization: Bearer header and your API key. The agent calls douyin/comments and douyin/comment_replies through everyinfra_call_api, with the same parameters as the request bodies above.

Why do some comments return no replies?

comment_replies only has results for top-level comments that actually have replies. Filter for reply_count above 0 in step 3 before you call step 4.

Reference UC-03

Google Analytics needs consent. Privacy