# Douyin Comments Scraper API (抖音评论): Every Comment, No Login (`hyperbach/socialdatax-douyin-data-api`) Actor

Douyin comment scraper API, no login: every top-level comment of a Douyin (抖音) video by link, share link, id or keyword, the most-liked included. Text, likes, reply count, time, commenter id and IP region, pictures. Douyin's own translation, optional sentiment. Misses free.

- **URL**: https://apify.com/hyperbach/socialdatax-douyin-data-api.md
- **Developed by:** [Hyperbach](https://apify.com/hyperbach) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.73 / 1,000 comments

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Douyin Comments Scraper API (抖音评论): Every Comment, No Login

**Douyin (抖音) comments as data, logged out.** Give video links, share links, pasted share text or video ids (or search keywords) and get **one row per top-level comment**: the text, the exact time, **likes**, the reply count, pictures, stickers and mentions, the hot, pinned and folded flags, whether the author liked it, and the commenter with **user id, sec_uid, Douyin id and IP region**. **Both of Douyin's comment orders**, the most-liked comments included, Douyin's own translation and an optional sentiment score. Every video also gets a free row with its verdict against Douyin's own count and the video's caption, date and author. No login, no cookie, no proxy.

**From $1.70 per 1,000 rows (`comment`) on the Free plan, $0.85 on Starter; every row and add-on is priced under Pricing below.** A run start is $0.0022. The default input returns about 51 rows for about $0.0872. A value that names nothing is a free row that says why.

![Douyin's desktop video page in a browser: a winter camping video with its title, author and counts, and its comment panel sorted by likes, where the top comment shows its text, date, IP region, likes and reply count. Beside it, the row this Actor returns for that comment, with the likes and sourceList fields highlighted: the most-liked comments come from Douyin's hot list.](https://api.apify.com/v2/key-value-stores/dcLLNGq99686o2A4v/records/hero-socialdatax-douyin-data-api.webp)

### How it compares

- **3 times cheaper than atomus's Douyin 抖音 Search Scraper, with more data:** $0.77 per 1,000 comments, against $2.00; 33 fields per comment, against 8. It is 3 times faster: 50 comments in 5.0 s, against our 14 s.
- **6 times cheaper than socialdatax's 抖音 API, with more data:** $0.77 per 1,000 comments, against $4.99; 33 fields per comment, against 27. It is 3 times faster: 50 comments in 5.2 s, against our 14 s.
- **natanielsantos's Douyin Comments Scraper is faster:** 50 comments in 12 s, against our 14 s. We give more data: 33 fields per comment, against 14. The price is about the same: $0.77 per 1,000 comments, against $0.70.

Measured on 2026-11-23. Each line compares one job, run by both scrapers at the same time. Prices are per 1,000 comments: Apify Actors at the Scale plan's prices.

### Tested head-to-head on 2026-11-23

The job: The 50 most-liked comments of one Douyin video (the input schema's example: video 7648208200076573925, maxCommentsPerVideo 50). Every Actor ran on it the same day from the same harness; every run's cost is at the Scale plan's prices: a rival's charged events at its price for that plan, this Actor's at its list price. Fields counts the filled fields of a typical row. Each rival reads the same Douyin video, the 50 comments of our test video (the input schema's example): atomus's Douyin scraper (the most used seller of the comment row), the socialdatax Douyin data API (the lane's leader by lifetime users) and natanielsantos's Douyin comments scraper (the cheapest per comment). Re-measured monthly.

| Actor | Rows | First row | Run time | Cost | Fields | Failures |
|---|---|---|---|---|---|---|
| **this Actor** | 50 | 13 s | 14 s | $0.038 | 33 | none |
| `atomus/douyin-scraper` | 50 | 5.1 s | 5.0 s | $0.10 | 8 | none |
| `socialdatax/socialdatax-douyin-data-api` | 50 | 5.3 s | 5.2 s | $0.25 | 27 | none |
| `natanielsantos/douyin-comments-scraper` | 50 | 8.6 s | 12 s | $0.035 | 14 | none |

### Why this Douyin comments scraper

- **Every comment, the most-liked ones included.** Douyin's web page lists a video's comments on two lists, and the default one leaves out the most-liked comments: on our test video it lists 5,100 of 5,450 top-level comments, and the 350 it leaves out are the most-liked (71 of the top 100). This Actor reads both lists and opens each missing comment by its id, so 5,450 of 5,450 come back.
- **An honest end on every video.** Each video's free row compares what came back with Douyin's own comment count, which includes the replies: top-level comments + their reply counts reached 7,446 of the 7,463 Douyin counts on our test video, 4,194 of 4,202 on a second and 160 of 163 on a 2023 video. The row says COMPLETE, LIST_END (with both numbers) or TRUNCATED (your cap), and every list's end is read twice.
- **No duplicate charged.** Douyin's web list repeats popular comments on later pages (325 of 5,425 on our test video): each comment id is delivered and charged once a run, across both lists and every input. The lane's leader charged 9 of 50 rows twice on the same video.
- **Both orders.** `likes` is the order of Douyin's app, the most-liked first; `default` is the web page's own order. No other comments Actor offers the choice.
- **Douyin's own translation.** `translateTo` writes each comment in 15 languages with Douyin's built-in translator, with no model and no key of yours.
- **Measured speed.** On Apify (2026-11-23, 512 MB): the 50 most-liked comments of our test video took 14.4 seconds in all on build 0.1.6 (the head-to-head run below); on 5 runs each of build 0.1.5, the first comment came at a median 8.5 seconds and 50 comments came at a median 308 a minute, each opened by its id. The web page's own order (`sortBy` `default`) reads 50 comments a call.

### Who it's for

- **Brand and marketing teams** — what Douyin users say under a product's, a competitor's or a campaign's videos: the comments with their likes, the IP regions, the most-liked first, and a translation into your language.
- **Market and consumer researchers** — Chinese consumer opinion as data: every comment of a video with its exact time, likes and region, with an optional sentiment score.
- **Creators and agencies** — the audience under a creator's videos: who comments, from which region, what gets liked and pinned, and which comments the author liked or wrote.
- **Developers and data teams** — typed rows with one schema for every input, a free row per video with its verdict against Douyin's count, and a run summary to check a pipeline against.

### Quick start

**The 50 most-liked comments of a video**

```json
{
  "videoUrls": [
    "https://www.douyin.com/video/7648208200076573925"
  ],
  "maxCommentsPerVideo": 50
}
```

**Every comment of a video, in the web page's order**

```json
{
  "videoUrls": [
    "https://www.douyin.com/video/7709352599647980800"
  ],
  "sortBy": "default",
  "maxCommentsPerVideo": 0
}
```

**Comments with an English translation and sentiment**

```json
{
  "videoUrls": [
    "https://v.douyin.com/iRNBho6u/"
  ],
  "maxCommentsPerVideo": 100,
  "translateTo": "en",
  "sentimentAnalysis": true
}
```

**Comments under a keyword's videos**

```json
{
  "searchKeywords": [
    "露营"
  ],
  "maxVideosPerSearch": 5,
  "maxCommentsPerVideo": 20
}
```

### Switching from `socialdatax/socialdatax-douyin-data-api`?

Your input works as it is. Each name in the left column is read as this Actor's own field and the run log says so (`read <theirs> as <ours>`); a name marked *not read* is ignored with a note. A value in the other Actor's shape, an object list or its own date form, is read too.

| socialdatax/socialdatax-douyin-data-api | this Actor | what to know |
|---|---|---|
| `operation` | *not read* | Not needed: every run reads comments (`get_video_comments`). `search_videos` reads the comments of the videos found by `keyword`; any other operation is read as a comment job and the run says so. |
| `aweme_id` | `videoUrls` | A video id, read as a video target. |
| `url` | `videoUrls` | A video link, a share link or the pasted share text. |
| `keyword` | `searchKeywords` | Read as a search keyword (the comments of the videos it finds), except with `operation` `get_video_comments`, whose form carries a default keyword. |
| `max_items` | `maxItems` | The most comment rows of the run. |
| `page_token` | `startCursor` | A number is read as the list cursor to start from (a row's `pageCursor`); another tool's token is left out with a note. |
| `auto_paginate` | *not read* | Not needed: the run always walks the list to `maxCommentsPerVideo`. |
| `comment_id` | *not read* | The replies of one comment are not read logged out (Douyin serves them to no logged-out reader). |
| `sort_type` | *not read* | The leader's search sort; the comment order here is `sortBy` (`likes` or `default`). |
| `publish_time_range` | *not read* | A search filter of the leader's; for comments use `postedAfter`. |
| `duration_range` | *not read* | A video search filter of the leader's; not a comment field. |
| `content_type` | *not read* | A video search filter of the leader's; for comments with pictures use `onlyWithPictures`. |
| `follower_count_range` | *not read* | A user search filter of the leader's; not a comment field. |
| `user_type` | *not read* | A user search filter of the leader's; not a comment field. |
| `min_price` | *not read* | A product search filter of the leader's; not a comment field. |
| `max_price` | *not read* | A product search filter of the leader's; not a comment field. |
| `only_live` | *not read* | A product search filter of the leader's; not a comment field. |
| `dispatch_within_24h` | *not read* | A product search filter of the leader's; not a comment field. |
| `shipping_insurance` | *not read* | A product search filter of the leader's; not a comment field. |
| `seven_day_return` | *not read* | A product search filter of the leader's; not a comment field. |
| `selling_point` | *not read* | A product search filter of the leader's; not a comment field. |
| `official_store` | *not read* | A product search filter of the leader's; not a comment field. |
| `product_id` | *not read* | A product of the leader's shop operations; not read (this Actor reads video comments). |
| `sec_user_id` | *not read* | A creator's video list is not served to a logged-out reader on Douyin's web API; give the videos' links or a keyword. |
| `profile_url` | *not read* | A creator's video list is not served to a logged-out reader on Douyin's web API; give the videos' links or a keyword. |

**What differs:**

- This Actor does one job, the comments: the leader's `operation` `get_video_comments` is what every run does. Give the video as `videoUrls` (or the leader's `aweme_id` or `url`, read as it is).
- Replies are not read: Douyin serves a comment's replies to no logged-out reader. Each comment row carries its exact `replyCount`.
- The leader returns one page of comments a call with a `page_token`; this Actor walks the list itself to `maxCommentsPerVideo` (0 = every comment) and each row carries its `pageCursor` (`startCursor` resumes there).
- Column names: `commentId` (the leader's `comment_id`), `text`, `likes`, `replyCount`, `createdAt` / `createTime`, `ipLocation`, the commenter flat (`userId`, `secUid`, `nickname`, `avatar`, `douyinId`), `position` (the leader's `item_index`), `pageHasMore` and `pageCursor` (its page fields).

### Output

One row per top-level comment (and one free row per video and per keyword):

| field | meaning |
|---|---|
| `record_type` | `comment` on a comment row (charged); `video` on a video's free row; `search` on a keyword's free row. |
| `status` | `ok`, or why an input or a video gave no comment: `no_comments` (Douyin lists none), `not_found` (Douyin served nothing for the id: its lists empty and its page HTTP 404, each on two connections; a wrong id, a removed or private post, or a post too new to be served), `no_results` (a keyword Douyin's search finds nothing for), `invalid_input`, `failed`, `not_read`. |
| `input` | The value you gave that this row answers (the video link, the share link or the keyword). |
| `sortBy` | The order the video was read in: `likes` or `default` (an older video with no hot list is read in `default`). |
| `videoId` | The video's (or image post's) id. |
| `videoUrl` | The video's page. |
| `videoCommentCount` | Douyin's own comment count of the video, replies included (the yardstick of the video row's verdict). |
| `commentId` | The comment's id (Douyin's `cid`). |
| `position` | The comment's 1-based place among the video's delivered comments, in the asked order. |
| `text` | The comment's text, as written (Douyin's emotes as `[赞]`-style codes); empty for a sticker alone. |
| `textTranslated` | With `translateTo`: the text in that language, by Douyin's own translator. |
| `translationLanguage` | With `translateTo`: the language asked. |
| `translationStatus` | `served`, `no_text` (nothing to translate), `failed`, `cut` (the run stopped before the answer) or `not_asked`. |
| `commentType` | `text`, `image` (a picture, with or without text) or `sticker`. |
| `pictures` | The comment's pictures (signed links that expire). |
| `sticker` | The comment's sticker (a signed link that expires). |
| `mentions` | The people the comment mentions: `userId`, `secUid`, `nickname`. |
| `hashtags` | The hashtags in the comment. |
| `createdAt` | When the comment was posted (UTC). |
| `createTime` | When the comment was posted, as Unix seconds. |
| `likes` | The comment's likes. |
| `replyCount` | The comment's replies, as Douyin counts them (the replies themselves are not read logged out). |
| `isHot` | Douyin's own hot mark on the web page's comment list (the head of its first page, liked and fresh comments alike); in the likes order read from that same first page, so a comment not on it is false; null when the page was not served. |
| `isPinned` | The video's author pinned the comment. |
| `isFolded` | Douyin folds the comment (shown collapsed). |
| `likedByAuthor` | The video's author liked the comment. |
| `isAuthor` | The video's author wrote the comment (Douyin's 作者 label). |
| `userId` | The commenter's numeric user id. |
| `secUid` | The commenter's `sec_uid` (the id of their profile link). |
| `nickname` | The commenter's name. |
| `douyinId` | The commenter's Douyin id (the chosen one, else the number the app shows). |
| `avatar` | The commenter's avatar. |
| `userUrl` | The commenter's profile. |
| `verification` | The commenter's verification text, where Douyin shows one. |
| `ipLocation` | The commenter's IP region label as Douyin shows it (in Chinese: a province, or a country outside China). |
| `analysis_sentiment` | With `sentimentAnalysis`: the comment's sentiment from -1 (negative) to 1 (positive); null when the model gave no answer or the run stopped before the score (`sentimentStatus` says which). |
| `analysis_confidence` | With `sentimentAnalysis`: how sure the model is, 0 to 1. |
| `sentimentLabel` | With `sentimentAnalysis`: `positive`, `neutral` or `negative`. |
| `sentimentStatus` | `served` (scored: the sentiment fee), `no_text`, `failed`, `cut` (the run stopped before the answer) or `not_asked`. |
| `sourceList` | The list the comment came from: `default` (the web page's list) or `hot` (Douyin's hot list, the record opened by its id). |
| `pageCursor` | The list cursor of the comment's page (`startCursor` resumes there). |
| `pageHasMore` | The list had more comments after this page. |
| `verdict` | On a video or keyword row: COMPLETE, LIST_END, TRUNCATED, LIKES_FLOOR, PARTIAL or DUPLICATE (`note` says why). |
| `rowsDelivered` | On a video or keyword row: the comment rows it delivered. |
| `rootsListed` | On a video row: the distinct top-level comments its lists named. |
| `repliesCounted` | On a video row: the replies those comments count (roots + replies is compared with `videoCommentCount`). |
| `recordsMissing` | On a video row: listed comments whose record did not open on two connections (not delivered, not charged). |
| `videoDescription` | On a video row: the video's caption. |
| `videoCreatedAt` | On a video row: when the video was posted (UTC). |
| `videoDurationS` | On a video row: the video's length in seconds. |
| `videoHashtags` | On a video row: the video's hashtags. |
| `videoAuthorName` | On a video row: the author's name. |
| `videoAuthorUrl` | On a video row: the author's profile. |
| `videoAuthorFollowers` | On a video row: the author's followers. |
| `videoAuthorLikes` | On a video row: the likes of all the author's videos, rounded as Douyin's page writes them (220.3万 = 2,203,000). |
| `videoLikes` | On a video row: the video's own likes, from its page (`detailsStatus`), else from Douyin's share page (`countsStatus`). |
| `videoShares` | On a video row: the video's shares, where Douyin's share page shows them. |
| `videoCollects` | On a video row: the video's saves, where Douyin's share page shows them. |
| `detailsStatus` | On a video row: `served`, `not_found`, `not_served` (an image post: Douyin's page of a post shows no record; its counts come from the share page), `failed`, or null when `videoDetails` was off. |
| `countsStatus` | On a video row: the share page's counts: `served`, `not_served` (Douyin shows none for this video), `failed`, `no_residential`. |
| `keyword` | On a keyword row: the search keyword. |
| `videosFound` | On a keyword row: the videos Douyin's search page gave (the first `maxVideosPerSearch` of them are read). |
| `note` | Why a video or keyword row has its status or verdict, with the figures. |
| `scrapedAt` | When this row was read (UTC). |

Example record:

```json
{
  "record_type": "comment",
  "status": "ok",
  "input": "https://www.douyin.com/video/7648208200076573925",
  "sortBy": "likes",
  "videoId": "7648208200076573925",
  "videoUrl": "https://www.douyin.com/video/7648208200076573925",
  "videoCommentCount": 7463,
  "commentId": "7648506243358982948",
  "position": 3,
  "text": "买这买那的",
  "textTranslated": null,
  "translationLanguage": null,
  "translationStatus": "not_asked",
  "commentType": "image",
  "pictures": [
    "https://p26-sign.douyinpic.com/tos-cn-i-p14lwwcsbr/3e967504db874ff2a0a7c196a3e2474e~tplv-p14lwwcsbr-7.image?x-expires=1795413600&x-signature=example"
  ],
  "sticker": null,
  "mentions": null,
  "hashtags": null,
  "createdAt": "2026-06-07T04:30:32Z",
  "createTime": 1780806632,
  "likes": 3283,
  "replyCount": 104,
  "isHot": false,
  "isPinned": false,
  "isFolded": false,
  "likedByAuthor": false,
  "isAuthor": false,
  "userId": "1000000001",
  "secUid": "MS4wLjABAAAAexample0001",
  "nickname": "用户小鹿",
  "douyinId": "example_0001",
  "avatar": "https://p3-pc.douyinpic.com/aweme/100x100/example-avatar.jpeg",
  "userUrl": "https://www.douyin.com/user/MS4wLjABAAAAexample0001",
  "verification": null,
  "ipLocation": "山西",
  "analysis_sentiment": null,
  "analysis_confidence": null,
  "sentimentLabel": null,
  "sentimentStatus": "not_asked",
  "sourceList": "hot",
  "pageCursor": 0,
  "pageHasMore": true,
  "verdict": null,
  "rowsDelivered": null,
  "rootsListed": null,
  "repliesCounted": null,
  "recordsMissing": null,
  "videoDescription": null,
  "videoCreatedAt": null,
  "videoDurationS": null,
  "videoHashtags": null,
  "videoAuthorName": null,
  "videoAuthorUrl": null,
  "videoAuthorFollowers": null,
  "videoAuthorLikes": null,
  "videoLikes": null,
  "videoShares": null,
  "videoCollects": null,
  "detailsStatus": null,
  "countsStatus": null,
  "keyword": null,
  "videosFound": null,
  "note": null,
  "scrapedAt": "2026-11-23T02:13:32Z"
}
```

### Pricing

**Pay for the comments a run delivers**, plus one run start. No platform usage is billed to you, and the price falls with your Apify plan.

| event | unit | Free | Starter | Scale | Business |
|---|---|---|---|---|---|
| Comment (`comment`) | per 1,000 | $1.70 | $0.85 | $0.725 | $0.725 |
| Sentiment score (`sentiment`) | per 1,000 | $0.50 | $0.425 | $0.35 | $0.25 |
| Run start (`start`) | per run | $0.0022 | $0.0022 | $0.0022 | $0.0022 |

A top-level comment is **$1.70 per 1,000** on the Free plan ($0.0017 a row), $0.85 on Starter. With `sentimentAnalysis`, a comment the model scored adds **$0.50 per 1,000**. Each run that delivers a comment pays the **run start, $0.0022 once**. Douyin's own translation (`translateTo`) adds no fee.

So the example (the 50 most-liked comments of our test video) costs $0.0872 on the Free plan and $0.0447 on Starter; 100 comments of one video (the default cap) $0.1722 and $0.0872; the first comment of 10 videos $0.0192 and $0.0107; 50 comments with the sentiment score $0.1122 and $0.06595; every comment of our test video (5,450 top-level comments in the build's test) $9.2672 and $4.6347. Free: every video's row (its verdict against Douyin's count and the video's own fields), every keyword's row, a video id that names no video, a video with no comment, a share link that leads nowhere, a comment your filters leave out, a comment Douyin lists twice (charged once), a listed comment whose record did not open, and a run that delivered no comment (no run start either). A run that stops early (a timeout, an abort, the charge limit) is charged for the comments it delivered.

Before the first request the log names the prices at your plan and what the run can cost: "at most" under `maxCommentsPerVideo` (over your videos and each keyword's videos) and `maxItems`, plus the run start, and never more than your charge limit; a run with no cap (`maxCommentsPerVideo` 0 and no `maxItems`) reads every comment to Douyin's end and costs about Douyin's own count of the video's top-level comments (each video's row names Douyin's count, replies included). Enterprise plans have their own rates: the Actor's Pricing tab shows the price for your plan.

### Usage patterns

- **What to give** — `videoUrls`: video or image-post links (`douyin.com/video/<id>`, `douyin.com/note/<id>`, a link with `?modal_id=<id>`), app share links (`v.douyin.com/...`) or the whole pasted share text, or bare video ids. `searchKeywords`: search words, each giving the comments of its first `maxVideosPerSearch` videos. A value given twice is read once; a value that names nothing is a free `invalid_input` row that says why.
- **How much and in which order** — `maxCommentsPerVideo` caps the comments of each video (0 = every comment; 100 by default), `maxItems` the comments of the whole run. `sortBy` `likes` (the default) is the order of Douyin's app, the most-liked first; `default` is the web page's own order (newest first in passes). The first page is always asked whole (50) and trimmed to your cap. `startCursor` resumes a list at an earlier row's `pageCursor`.
- **Filters** — `includeKeywords`, `excludeKeywords`, `onlyWithPictures`, `ipLocations` (the region label as Douyin shows it, in Chinese), `minLikes` and `postedAfter` keep the comments you want; a comment left out is free. Douyin filters none of these itself, so a filtered run reads the list and keeps the matches; in the likes order the run stops at the first page under `minLikes`.
- **Add-ons** — `videoDetails` (on by default, free) puts each video's caption, date, duration, hashtags and author on its free row, and the video's own likes, shares and saves where Douyin shows them. `translateTo` writes each comment in one of 15 languages with Douyin's own translator (about 2 s a comment, 6 at a time). `sentimentAnalysis` adds a sentiment score, its confidence and a label to each comment with text.

### Input configuration

| field | type | default | what it does |
|---|---|---|---|
| `videoUrls` | `array` | `[]` | One video a line: a video or image-post link (`douyin.com/video/<id>`, `douyin.com/note/<id>`, a link with `?modal_id=<id>`, `iesdouyin.com/share/video/<id>/`), an app share link (`v.douyin.com/...`) or the copied share text around it, or a bare 19-digit video id. A value that names no video is a free `invalid_input` row. |
| `searchKeywords` | `array` | `[]` | Search words, one a line (Chinese or English). The run reads the comments of the first `maxVideosPerSearch` videos Douyin's search lists now; each keyword gets a free `search` row with the videos it found. |
| `maxVideosPerSearch` | `integer` | `5` | How many videos each keyword gives (Douyin's search shows 8 to 16 videos a load; the run asks up to 3 loads). |
| `sortBy` | `likes` / `default` | `"likes"` | `likes` (default): the order Douyin's own app shows, the most-liked first; every top-level comment of the video, the most-liked ones included. `default`: the web page's own order (newest first in passes; it never shows some of the most-liked comments, so a run with no cap reads those last). Douyin serves no strict newest-first order without a login. |
| `maxCommentsPerVideo` | `integer` | `100` | The most top-level comments a video gives; 0 = every comment the video lists. The video's free row says COMPLETE, LIST_END or TRUNCATED against Douyin's own count. |
| `maxItems` | `integer` | `0` | The most charged comment rows of the whole run; 0 = no cap beyond your charge limit. |
| `startCursor` | `integer` | `0` | Resume a video's list where an earlier run stopped: the `pageCursor` of that run's last row (it applies to every video of the run). 0 = from the start. |
| `videoDetails` | `boolean` | `true` | Each video's free row gets its caption, date, duration, hashtags and author (name, link, followers, total likes) from the video's page, and its own likes, shares and saves where Douyin shows them. Free; turn off for the fastest run. |
| `translateTo` | `none` / `en` / `ja` / `ko` / `es` / `fr` / `de` / `ru` / `pt` / `ar` / `th` / `vi` / `id` / `it` / `tr` / `zh` | `"none"` | Douyin's own translator writes each comment into `textTranslated` (one call a comment, about 2 s each, 6 at a time). `none` (default) skips it. |
| `sentimentAnalysis` | `boolean` | `false` | A sentiment score (-1 to 1), its confidence and a label (positive, neutral, negative) on each comment with text, from a classification model. A paid add-on per scored comment. |
| `includeKeywords` | `array` | `[]` | Keep a comment only when its text holds one of these words (case-insensitive). Douyin filters nothing itself: the run reads the list and keeps the matches; a comment left out is free. |
| `excludeKeywords` | `array` | `[]` | Leave out a comment whose text holds one of these words (case-insensitive). |
| `onlyWithPictures` | `boolean` | `false` | Keep only comments that carry a picture. |
| `ipLocations` | `array` | `[]` | Keep a comment only when its IP region label (`ipLocation`, in Chinese as Douyin shows it, e.g. 北京, 广东, 美国) holds one of these words. |
| `minLikes` | `integer` | `0` | Keep comments with at least this many likes. In the likes order the run stops at the first page under it. |
| `postedAfter` | `string` |  | Only comments from this time on: a date (UTC midnight) as `2026-11-01`, a time as `2026-11-01T12:00:00Z` (UTC when no zone is written), or an age as `7 days`, `2 weeks`, `1 month` (30 days) back from the run's start. The run reads the list and keeps these; a comment left out is free. |
| `feedback` | `string` |  | A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note. |

### Errors

**A run does not fail because of your input.** When an input cannot be used — a date that is not a date, an id in the wrong form, two settings that contradict each other — the run ends **Succeeded**, charges nothing, and says what to change:

- the status message starts with `INPUT REJECTED`;
- the dataset holds one row, `{"error": true, "code": "…", "message": "…"}`, and no results;
- the key-value store record `ERROR` holds the same object.

From code, check `error` on the first row before reading results.

A video id that names no video, a video with no comment, a share link that leads nowhere, a keyword with no result or a value that names nothing is not an error: it gets one free row with its `status` and the reason, and the run goes on with the others. A run that ends **Failed** is a fault on our side, never your input; it charges nothing, and we are alerted.

### FAQ

**Do I need a Douyin account, a cookie or a proxy?**

No. The Actor reads Douyin's web comment list logged out, with a visitor cookie it makes itself, and handles its own connections.

**Why are replies not included?**

Douyin serves a comment's replies to no logged-out reader: every route we tried, a real browser's own call included, answered empty. Each comment row has its exact `replyCount`, and the video's row counts the replies of the comments read.

**What does the video row's verdict mean?**

COMPLETE: every list was read to its end (the end read again on a fresh connection added nothing) and the comments + their reply counts reach Douyin's own count. LIST_END: the lists ended under Douyin's count; `note` gives both numbers. TRUNCATED: your `maxCommentsPerVideo`, `maxItems` or charge limit stopped the video. LIKES_FLOOR: the likes order fell under your `minLikes`. PARTIAL: the run's time limit or an abort stopped it.

**Why do the two orders give different comments for the same cap?**

They are two different lists. `likes` starts with the most-liked comments; `default` is the web page's own list, which is newest first in passes and leaves out many of the most-liked comments (this Actor reads those last when you ask for every comment).

**Are the picture and sticker links permanent?**

No. Douyin signs its image links with an expiry (`x-expires`: 5 to 24 hours after the read on our tests): download the pictures you need the same day.

**Do I need Apify Proxy or my own proxy?**

No. The Actor uses its own connections, at no extra cost to you.

### Integration

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('hyperbach/socialdatax-douyin-data-api').call({"videoUrls": ["https://www.douyin.com/video/7648208200076573925"], "maxCommentsPerVideo": 50});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('hyperbach/socialdatax-douyin-data-api').call(run_input={'videoUrls': ['https://www.douyin.com/video/7648208200076573925'], 'maxCommentsPerVideo': 50})
items = client.dataset(run['defaultDatasetId']).list_items().items
```

#### CLI

```bash
apify call hyperbach/socialdatax-douyin-data-api --input '{"videoUrls": ["https://www.douyin.com/video/7648208200076573925"], "maxCommentsPerVideo": 50}'
```

#### REST

```bash
curl -X POST "https://api.apify.com/v2/acts/hyperbach~socialdatax-douyin-data-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' -d '{"videoUrls": ["https://www.douyin.com/video/7648208200076573925"], "maxCommentsPerVideo": 50}'
```

#### AI agents and MCP

Apify's MCP server offers this Actor as a tool to Claude, Cursor, VS Code and any other MCP client. Connect `https://mcp.apify.com?tools=hyperbach/socialdatax-douyin-data-api` and ask, for example: "Get the comments of this Douyin video with likes, time, reply count and commenter IP region, most liked first". The agent fills the input from the table above and reads the rows from the run's dataset. A field under the name another Actor gives it is read as this Actor's own: `url`, `aweme_id`, `urls`, `startUrls` as `videoUrls`; `keyword`, `keywords`, `searchTerms`, `searchQueries` as `searchKeywords`; `max_items`, `maxResults`, `resultsLimit`, `max_results` as `maxItems`; `maxComments`, `commentsPerVideo`, `max_comments`, `commentLimit` as `maxCommentsPerVideo` (and more). An agent or a person can add `feedback` to any run and say what was needed and not delivered: a missing field, a wrong or empty result, the Actor switched from or to, and why. The run returns the same rows at the same price, and a person reads every note.

#### n8n, Make and Zapier

The Apify node in n8n, the Apify app in Make and the Apify integration in Zapier run this Actor on a schedule or from a trigger and read its dataset. A webhook on the run's end (Integrations on the Actor page) sends the rows on to your own endpoint. Nothing to install on our side.

### Support

**Disagree with a charge?** Write to apify@hyperbach.com with the run ID. We will ask Apify to compensate you, and the charge comes back to your Apify account as platform credit.

**Did it do the job?** A short [review on the Store](https://apify.com/hyperbach/socialdatax-douyin-data-api/reviews), at any rating, helps the next buyer choose.

*This page is generated from the Actor's schemas and a live sample — it cannot describe a field the Actor does not have.*

# Actor input Schema

## `videoUrls` (type: `array`):

One video a line: a video or image-post link (`douyin.com/video/<id>`, `douyin.com/note/<id>`, a link with `?modal_id=<id>`, `iesdouyin.com/share/video/<id>/`), an app share link (`v.douyin.com/...`) or the copied share text around it, or a bare 19-digit video id. A value that names no video is a free `invalid_input` row.

## `searchKeywords` (type: `array`):

Search words, one a line (Chinese or English). The run reads the comments of the first `maxVideosPerSearch` videos Douyin's search lists now; each keyword gets a free `search` row with the videos it found.

## `maxVideosPerSearch` (type: `integer`):

How many videos each keyword gives (Douyin's search shows 8 to 16 videos a load; the run asks up to 3 loads).

## `sortBy` (type: `string`):

`likes` (default): the order Douyin's own app shows, the most-liked first; every top-level comment of the video, the most-liked ones included. `default`: the web page's own order (newest first in passes; it never shows some of the most-liked comments, so a run with no cap reads those last). Douyin serves no strict newest-first order without a login.

## `maxCommentsPerVideo` (type: `integer`):

The most top-level comments a video gives; 0 = every comment the video lists. The video's free row says COMPLETE, LIST_END or TRUNCATED against Douyin's own count.

## `maxItems` (type: `integer`):

The most charged comment rows of the whole run; 0 = no cap beyond your charge limit.

## `startCursor` (type: `integer`):

Resume a video's list where an earlier run stopped: the `pageCursor` of that run's last row (it applies to every video of the run). 0 = from the start.

## `videoDetails` (type: `boolean`):

Each video's free row gets its caption, date, duration, hashtags and author (name, link, followers, total likes) from the video's page, and its own likes, shares and saves where Douyin shows them. Free; turn off for the fastest run.

## `translateTo` (type: `string`):

Douyin's own translator writes each comment into `textTranslated` (one call a comment, about 2 s each, 6 at a time). `none` (default) skips it.

## `sentimentAnalysis` (type: `boolean`):

A sentiment score (-1 to 1), its confidence and a label (positive, neutral, negative) on each comment with text, from a classification model. A paid add-on per scored comment.

## `includeKeywords` (type: `array`):

Keep a comment only when its text holds one of these words (case-insensitive). Douyin filters nothing itself: the run reads the list and keeps the matches; a comment left out is free.

## `excludeKeywords` (type: `array`):

Leave out a comment whose text holds one of these words (case-insensitive).

## `onlyWithPictures` (type: `boolean`):

Keep only comments that carry a picture.

## `ipLocations` (type: `array`):

Keep a comment only when its IP region label (`ipLocation`, in Chinese as Douyin shows it, e.g. 北京, 广东, 美国) holds one of these words.

## `minLikes` (type: `integer`):

Keep comments with at least this many likes. In the likes order the run stops at the first page under it.

## `postedAfter` (type: `string`):

Only comments from this time on: a date (UTC midnight) as `2026-11-01`, a time as `2026-11-01T12:00:00Z` (UTC when no zone is written), or an age as `7 days`, `2 weeks`, `1 month` (30 days) back from the run's start. The run reads the list and keeps these; a comment left out is free.

## `feedback` (type: `string`):

A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.douyin.com/video/7648208200076573925"
  ],
  "searchKeywords": [],
  "maxVideosPerSearch": 5,
  "sortBy": "likes",
  "maxCommentsPerVideo": 50,
  "maxItems": 0,
  "startCursor": 0,
  "videoDetails": true,
  "translateTo": "none",
  "sentimentAnalysis": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "onlyWithPictures": false,
  "ipLocations": [],
  "minLikes": 0
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped records in the default dataset. One row per top-level comment (and one free row per video and per keyword):

## `runSummary` (type: `string`):

How the run went: comments charged, free rows by status, each input's verdict, the add-ons, the source counters (requests by kind, their seconds, exits, rotations, refusals, slow answers, bytes), the proxy chains and the memory watch.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        "https://www.douyin.com/video/7648208200076573925"
    ],
    "maxCommentsPerVideo": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("hyperbach/socialdatax-douyin-data-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "videoUrls": ["https://www.douyin.com/video/7648208200076573925"],
    "maxCommentsPerVideo": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("hyperbach/socialdatax-douyin-data-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    "https://www.douyin.com/video/7648208200076573925"
  ],
  "maxCommentsPerVideo": 50
}' |
apify call hyperbach/socialdatax-douyin-data-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hyperbach/socialdatax-douyin-data-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rwGypp7tfMlPSfOmc/builds/vRxN2sej3MD6PMhGJ/openapi.json
