# Douyin Video Comments Scraper (`automation-lab/douyin-video-comments-scraper`) Actor

Scrape Douyin (抖音) video comments and reply threads from video links, share links or IDs: comment and parent IDs, text, images, likes, reply counts, IP region and author IDs. No login.

- **URL**: https://apify.com/automation-lab/douyin-video-comments-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.37 / 1,000 comment extracteds

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 Video Comments Scraper

Collect public comments and reply threads from Douyin (抖音) videos. Paste video links, `v.douyin.com` short links, share text from the app, or plain video IDs, and get one row per comment or reply: comment ID, parent comment ID, text, attached images, posting time, likes, reply count, IP region (IP属地) and the commenter's user IDs and nickname. No Douyin account, cookies or login needed.

### What does Douyin Video Comments Scraper do?

For each video you give it, the Actor reads the comment list Douyin shows to a logged-out web visitor, in Douyin's own order (pinned and popular comments first). When you set **Max replies per comment**, it also opens each comment's reply thread and saves every reply as its own row, linked to its parent comment and to the reply it answers.

- 💬 Top-level comments with text, images, likes, reply count, posting time and IP region
- 🧵 Reply threads as linked rows: `parentCommentId` and `replyToCommentId` rebuild the conversation
- 👤 Commenter user ID, `sec_uid`, Douyin ID (抖音号), nickname, avatar and profile URL
- 🔗 Video IDs and `sec_uid` values that join directly with our Douyin search and creator Actors
- 🔓 No login: an anonymous browser session signs Douyin's own web requests

### Who is it for?

- **Brand and product teams** tracking what Chinese consumers say under their own, competitors' and influencers' videos.
- **Market researchers** running sentiment, topic or regional analysis (the IP region field shows the commenter's province).
- **Agencies and KOL managers** checking audience reactions, fake-looking engagement and creator replies after a campaign.
- **Academics and data journalists** studying public discussion on Douyin.
- **Developers** feeding Douyin comments into dashboards, LLM summaries or moderation pipelines on a schedule.

### Why use this Douyin comments scraper?

- **Replies are first-class rows.** Each reply carries its parent comment ID and the ID of the reply it answers, so threads can be rebuilt or filtered without parsing nested JSON.
- **IDs that join.** `videoId` and `authorSecUid` match the fields in [Douyin Search Scraper](https://apify.com/automation-lab/douyin-search-scraper) and [Douyin Creator Profiles Scraper](https://apify.com/automation-lab/douyin-creator-profiles), so you can go from a keyword to videos to comments to commenter profiles.
- **Accepts what people actually paste.** Full links, `jingxuan?modal_id=` links, `v.douyin.com` short links, share text copied from the app ("7.92 复制打开抖音…") and bare IDs.
- **Pay only for rows you get.** A small start fee per run plus a price per comment or reply row. Invalid input costs nothing.

### What data can you extract from Douyin comments?

| Field | Description |
|---|---|
| `type` | `comment` (top level) or `reply` |
| `commentId` | Douyin comment ID |
| `parentCommentId` | For replies: the top-level comment of the thread |
| `replyToCommentId` | For replies: the comment or reply it answers |
| `replyToUserId`, `replyToNickname` | For replies to a reply: who is being answered |
| `videoId`, `videoUrl` | The Douyin video the comment belongs to |
| `text` | Comment text (emoji codes like `[捂脸]` kept) |
| `images` | Image URLs attached to the comment |
| `createdAt`, `createTime` | Posting time (ISO 8601 and Unix seconds) |
| `likeCount` | Likes when scraped |
| `replyCount` | Replies under a top-level comment (0 for replies) |
| `ipRegion` | IP region Douyin shows, such as 广东 or 美国 |
| `isPinned`, `isHot`, `likedByCreator`, `label` | Pinned, hot, liked by the video author, Douyin label (作者 …) |
| `authorId`, `authorSecUid`, `authorUniqueId` | Commenter numeric ID, sec_uid and Douyin ID |
| `authorNickname`, `authorAvatarUrl`, `authorProfileUrl` | Commenter name, avatar and profile link |
| `videoCommentCount` | Total comments Douyin reports for the video |
| `inputUrl`, `scrapedAt` | Your input line and collection time |

### How much does it cost to scrape Douyin comments?

The Actor uses pay-per-event pricing: a one-time start fee of **$0.005 per run** plus a price per saved comment or reply row. Apify platform usage is included.

| Plan | Price per comment or reply | 1,000 rows |
|---|---|---|
| Free | $0.00171 | $1.71 |
| Bronze | $0.00171 | $1.71 |
| Silver | $0.001539 | $1.54 |
| Gold | $0.001368 | $1.37 |
| Platinum | $0.001368 | $1.37 |
| Diamond | $0.001368 | $1.37 |

Examples on the Bronze plan (start fee included):

- 100 comments from one video: about **$0.18**
- 20 videos × 100 comments + up to 10 replies each (~4,000 rows): about **$6.85**
- 1 video, all public comments (~700 rows): about **$1.20**

Apify's free plan includes $5 of monthly credit, enough for about 2,900 rows. Set **Maximum cost per run** in the run options to cap spending; the Actor stops cleanly at that limit and keeps every row already saved.

### How to scrape Douyin comments

1. Open the Actor in Apify Console and click **Try for free**.
2. Paste one or more Douyin video links, short links or IDs into **Douyin videos**, one per line.
3. Set **Max comments per video** (0 = all public comments).
4. Set **Max replies per comment** if you want reply threads (0 = none).
5. Click **Start**. Rows appear in the dataset as each video is read.
6. Download as JSON, CSV, Excel, or read them through the API.

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `videoUrls` | array of strings | required | Douyin video links, `modal_id` links, `v.douyin.com` short links, pasted share text or 19-digit video IDs. Duplicates are read once; lines that are not Douyin videos are skipped with a warning. |
| `maxCommentsPerVideo` | integer | 100 | Top-level comments per video, in Douyin's order. `0` = all public comments (see limits below). |
| `maxRepliesPerComment` | integer | 0 | Replies per top-level comment. `0` skips replies. Each reply is one saved row. |
| `proxyConfiguration` | object | none | Optional. By default the Actor connects directly and switches to Apify datacenter proxies when Douyin rejects a session. |

Example input:

```json
{
    "videoUrls": [
        "https://www.douyin.com/video/7703469869513937883",
        "7702789226814831014"
    ],
    "maxCommentsPerVideo": 200,
    "maxRepliesPerComment": 20
}
```

### Output example

A top-level comment:

```json
{
    "type": "comment",
    "commentId": "7703471901003334449",
    "parentCommentId": null,
    "replyToCommentId": null,
    "replyToUserId": null,
    "replyToNickname": null,
    "videoId": "7703469869513937883",
    "videoUrl": "https://www.douyin.com/video/7703469869513937883",
    "text": "我听六哥的话，今天上涨卖了科技，低位吸了短剧，吃了十七个点…",
    "images": [],
    "createdAt": "2026-11-02T07:25:22.000Z",
    "createTime": 1793604322,
    "likeCount": 512,
    "replyCount": 54,
    "ipRegion": "江苏",
    "isPinned": false,
    "isHot": true,
    "likedByCreator": false,
    "label": null,
    "authorId": "66954281973",
    "authorSecUid": "MS4wLjABAAAAIisb-lWt0sGZhVqpGjjQbZZSGs-ZAAhQIyOcpgVYBt4",
    "authorUniqueId": "V17305160789",
    "authorNickname": "活宝女钓手张莹",
    "authorAvatarUrl": "https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/…jpeg",
    "authorProfileUrl": "https://www.douyin.com/user/MS4wLjABAAAAIisb-lWt0sGZhVqpGjjQbZZSGs-ZAAhQIyOcpgVYBt4",
    "videoCommentCount": 1550,
    "inputUrl": "https://www.douyin.com/video/7703469869513937883",
    "scrapedAt": "2026-11-13T07:26:30.663Z"
}
```

A reply in that thread answering another reply:

```json
{
    "type": "reply",
    "commentId": "7703479630116963121",
    "parentCommentId": "7703471901003334449",
    "replyToCommentId": "7703478112747111178",
    "replyToUserId": "166742551966286",
    "replyToNickname": "甜甜粥",
    "text": "麦果我28的本，但我感觉量能不足而且快翻倍了就卖了…",
    "likeCount": 60,
    "replyCount": 0,
    "ipRegion": "江苏"
}
```

### Tips and limitations

- **Guest comment window.** Douyin shows logged-out visitors roughly the first 900 positions of a video's comment list, which is usually 700 to 900 unique top-level comments. On very popular videos `0` (all) therefore stops there; `videoCommentCount` shows Douyin's full total, which also counts replies.
- **Order.** Comments come in Douyin's default order (pinned and popular first). Newest-first sorting is not available to logged-out visitors.
- **Overlapping pages.** Douyin repeats some comments across pages; the Actor removes duplicates within each video, so you are never charged twice for the same comment in a run.
- **Replies are flat.** Douyin keeps one level of threads; a reply to a reply has the same `parentCommentId` and names the answered reply in `replyToCommentId`.
- **Image links expire.** Comment image URLs are signed by Douyin and stop working after some days; download them soon if you need them.
- **Deleted, private or region-locked videos** return no rows; the run continues with the other videos.
- **Failures.** If Douyin rejects a session, the Actor retries and moves to a fresh anonymous session, then to Apify datacenter proxies. A video that still fails is reported in the log and the run status; rows already saved are kept.

### Integrations and scheduled monitoring

- **Scheduled sentiment tracking:** save an Apify task with your brand and competitor videos and schedule it daily; compare `likeCount` and new `commentId` values between runs.
- **Google Sheets / Excel:** export the dataset or connect the Apify Google Sheets integration for a live comment log.
- **Webhooks, Make, Zapier, n8n:** send new rows to Slack or your CRM when a run finishes.
- **LLM analysis:** pass `text`, `ipRegion` and `likeCount` to a model to summarise complaints, questions and purchase intent.
- **Pipeline with our Douyin Actors:** find videos with Douyin Search Scraper, collect comments here, then enrich commenters with Douyin Creator Profiles Scraper using `authorSecUid`.

### How to use the API

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~douyin-video-comments-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls":["https://www.douyin.com/video/7703469869513937883"],"maxCommentsPerVideo":100,"maxRepliesPerComment":10}'
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('automation-lab/douyin-video-comments-scraper').call({
    videoUrls: ['https://www.douyin.com/video/7703469869513937883'],
    maxCommentsPerVideo: 100,
    maxRepliesPerComment: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const row of items) console.log(row.type, row.ipRegion, row.text);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automation-lab/douyin-video-comments-scraper").call(run_input={
    "videoUrls": ["https://www.douyin.com/video/7703469869513937883"],
    "maxCommentsPerVideo": 100,
    "maxRepliesPerComment": 10,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["type"], row["ipRegion"], row["text"])
```

### Use with AI agents via MCP

Douyin Video Comments Scraper is available as a tool for AI assistants through the [Apify MCP server](https://mcp.apify.com).

Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/douyin-video-comments-scraper"
```

Claude Desktop, Cursor or VS Code (JSON configuration):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/douyin-video-comments-scraper"
    }
  }
}
```

Selecting this Actor also adds the run and dataset helper tools (`get-actor-run`, `get-dataset-items` and similar); check `tools/list` for exact names. A large comment job can take longer than one `call-actor` wait, so keep the returned run ID and poll that same run with `get-actor-run` (for example 2, 4, 8, then every 10 seconds up to a deadline you choose) instead of starting it again. When it succeeds, read results with `get-dataset-items` using the dataset ID, a `limit` (for example 20 rows per page) and only the `fields` you need, such as `type,text,likeCount,ipRegion`. Stop at a total budget you set and report the continuation offset if results are partial.

Example prompts:

- "Get the top 200 comments on this Douyin video and summarise the main complaints."
- "Collect comments and replies from these five competitor videos and group them by province."
- "Which commenters on https://www.douyin.com/video/7703469869513937883 got replies from the creator?"

### Data handling and diagnostics

The Actor reads public comments only and keeps the anonymous Douyin session in memory for the run. Failed operations send sanitized diagnostic input, exceptions and Actor/build/run IDs to our private GlitchTip service for repair; secret fields and URL queries are removed and reports are kept for 30 days. Apify stores your dataset, input and logs under your account's retention settings; delete them in Console when no longer needed.

### Is it legal to scrape Douyin comments?

The Actor reads only comments that anyone can see on Douyin's website without logging in. It does not collect private messages, contact details or account data. Comments are personal data of their authors: follow Douyin's terms and the privacy and data-protection laws that apply to you (such as China's PIPL and the EU GDPR), collect only what your purpose needs, and do not use the data to harass or profile individuals. If you are unsure, ask a lawyer.

### FAQ

**Do I need a Douyin account or cookies?**
No. The Actor uses an anonymous web session, so there is nothing to log in to or renew.

**Why did I get fewer comments than the video's comment count?**
`videoCommentCount` counts replies too, and Douyin shows logged-out visitors about the first 900 list positions. Set **Max replies per comment** to collect replies; very large comment sections cannot be read past Douyin's guest window.

**A video returned no rows. Why?**
The video may be deleted, private, region-locked, have comments turned off, or the link may point to a profile rather than a video. Check that the link opens a video in a browser, and see the run log for a per-video line.

**The run says a video failed. What should I do?**
Douyin occasionally rejects anonymous sessions. Run again for that video; if it keeps failing, set the proxy option to Apify datacenter or residential proxies.

**Are short links and app share text supported?**
Yes. Paste the whole share text; the Actor finds the `v.douyin.com` link inside it and resolves it to the video ID.

### Related scrapers

- [Douyin Search Scraper](https://apify.com/automation-lab/douyin-search-scraper): find videos by keyword, then feed their IDs here.
- [Douyin Creator Profiles Scraper](https://apify.com/automation-lab/douyin-creator-profiles): followers and profile data for commenters via `authorSecUid`.
- [Douyin Transcripts Scraper](https://apify.com/automation-lab/douyin-transcripts-scraper): what is said in the video itself.
- [Douyin Account Search and Creator Discovery](https://apify.com/automation-lab/douyin-user-discovery-search): find creators and brand accounts by keyword.
- [Douyin Hot Search Trends Scraper](https://apify.com/automation-lab/douyin-hot-search-trends): what is trending on Douyin right now.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/douyin-video-comments-scraper/changelog.md

# Actor input Schema

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

Douyin videos to collect comments from. Accepts video links (https://www.douyin.com/video/7703469869513937883), links with modal_id, v.douyin.com short links, pasted share text from the app, or bare video IDs. One per line.

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

How many top-level comments to collect from each video, in Douyin's own order (pinned and most popular first). 0 means all public comments.

## `maxRepliesPerComment` (type: `integer`):

How many replies to collect under each top-level comment. Each reply is its own row linked to its parent comment. 0 skips replies; set it high (for example 1000) to collect whole threads.

## `proxyConfiguration` (type: `object`):

Optional. By default the Actor connects directly and switches to Apify datacenter proxies on its own when Douyin rejects a session. Set a proxy only if you need a specific route.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.douyin.com/video/7703469869513937883"
  ],
  "maxCommentsPerVideo": 20,
  "maxRepliesPerComment": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

All collected comment and reply rows with author, text, likes and IP region.

# 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/7703469869513937883"
    ],
    "maxCommentsPerVideo": 20,
    "maxRepliesPerComment": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/douyin-video-comments-scraper").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/7703469869513937883"],
    "maxCommentsPerVideo": 20,
    "maxRepliesPerComment": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/douyin-video-comments-scraper").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/7703469869513937883"
  ],
  "maxCommentsPerVideo": 20,
  "maxRepliesPerComment": 10
}' |
apify call automation-lab/douyin-video-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/douyin-video-comments-scraper"
        }
    }
}
```

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/uSiwKWR6m14JCDifh/builds/4sGY03TpHpUAxpqmX/openapi.json
