# Douyin Comments Scraper (`maximedupre/douyin-comments-scraper`) Actor

Collect public comments and replies from the Douyin post links you add. Each row has the comment text, post ID, comment time, and like and reply counts. No Douyin login is needed, and you can set a total limit for each run.

- **URL**: https://apify.com/maximedupre/douyin-comments-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Videos, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 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

### 💬 Collect public Douyin comments and replies from the posts you choose

This Actor helps researchers, marketers, and developers collect comments from public Douyin posts. Each comment comes back with its text, post ID, comment time, and like and reply counts. You do not need a Douyin account or login, and you do not need to copy comments by hand.

**Use it to**

- Collect public comments from a post with **[Douyin Comments Scraper](https://apify.com/maximedupre/douyin-comments-scraper/examples/douyin-comments-scraper)**.
- Find the comments that got the most replies with **[Douyin Most Replied Comments](https://apify.com/maximedupre/douyin-comments-scraper/examples/douyin-most-replied-comments)**.
- Gather the top comments on a post with **[Douyin Top Comments](https://apify.com/maximedupre/douyin-comments-scraper/examples/douyin-top-comments)**.
- See the newest comments on a post with **[Douyin Latest Comments](https://apify.com/maximedupre/douyin-comments-scraper/examples/douyin-latest-comments)**.
- Read the replies under each comment with **[Douyin Comment Replies Scraper](https://apify.com/maximedupre/douyin-comments-scraper/examples/douyin-comment-replies-scraper)**.
- Review the comments that Douyin marks as hot, along with their like and reply counts.
- See where commenters are from when Douyin shows a region for them.

#### 📋 What each comment row includes

Each row is one public comment or reply. It includes the post ID, so you can match every comment to the post it belongs to. Replies also include the ID of the comment they answer. Commenter names and regions appear when Douyin shows them.

#### ▶️ Run it on your Douyin posts

**Quick start**

1. Open this Actor in Apify Console.
2. Paste one or more Douyin post links or video IDs. The form starts with a sample video link, so replace it with your own post.
3. Turn on reply comments or set limits if you need them.
4. Start the run, then open the dataset to see the rows.

You can also start runs and read results through the Apify API.

#### ⚙️ Input

Fill in the form in Apify Console, or send the same fields as JSON through the API.

**Input fields**

| Field | Type | What it does |
| --- | --- | --- |
| `postUrls` | list of text | The Douyin post links or video IDs to collect comments from. Add one full link for each public video or image post. For a video, you can also add its numeric ID, such as `7577614489533680959`. Numeric IDs are read as videos, so use the full link for image posts. |
| `includeReplies` | true or false | Adds public replies as separate comment rows. Replies are charged at the same rate as top-level comments. The default is `false`. |
| `commentOrder` | text | Sets the order for each post. Choose `source`, `likes` (most likes first), `newest`, `oldest`, or `replies` (most replies first). The default is `source`. |
| `maxComments` | whole number | Stops the run after this many comment rows in total. Requested replies count too. The form starts at 50. Leave it empty to return all available results until the source is exhausted. |
| `maxCommentsPerPost` | whole number | Stops after this many comment rows from each post. Requested replies count too. Leave it empty to return all available results for each post until the source is exhausted. |
| `maxRepliesPerComment` | whole number | Keeps at most this many public replies under each comment when `includeReplies` is on. Leave it empty to return all available results for each comment until the source is exhausted. |

Douyin also limits what visitors who are not logged in can see. On image posts, they see fewer comments. The list stops at a login prompt, even when the limit fields are empty. They also see up to about three replies under each comment.

**Example input**

```json
{
  "postUrls": [
    "https://www.douyin.com/video/7686432847778982833"
  ],
  "includeReplies": false,
  "commentOrder": "source",
  "maxComments": 50
}
```

#### 🧾 Output

Each result is one row in the dataset. Replies use the same fields as top-level comments. A reply's `parentCommentId` shows the comment it answers. Top-level comments do not have this field.

**Output fields**

| Field | Type | What it does |
| --- | --- | --- |
| `commentId` | text | The source ID that identifies the comment. |
| `text` | text | The text written in the comment. |
| `postId` | text | The ID of the Douyin post the comment belongs to. |
| `parentCommentId` | text | For a reply, the source ID of the comment it answers. |
| `createdAt` | text (date and time) | The time Douyin says the comment was posted. |
| `likeCount` | whole number | The number of likes Douyin shows for the comment. |
| `replyCount` | whole number | The number of replies Douyin shows for the comment. |
| `isHot` | true or false | Whether Douyin marks the comment as hot. |
| `isPinned` | true or false | Whether the post author has pinned the comment. |
| `commenter.userId` | text | The source ID of the commenter. |
| `commenter.displayName` | text | The name Douyin shows for the commenter. |
| `commenter.avatarUrl` | text (link) | A link to the commenter's public profile image. |
| `commenter.profileUrl` | text (link) | A link to the commenter's public Douyin profile. |
| `commenter.region` | text | The region Douyin shows for the commenter. |
| `post.caption` | text | The text Douyin shows with the post. |
| `post.publishedAt` | text (date and time) | The time Douyin says the post was published. |
| `post.creator.userId` | text | The source ID of the post creator. |
| `post.creator.displayName` | text | The name Douyin shows for the post creator. |
| `post.engagement.likeCount` | whole number | The number of likes Douyin shows for the post. |
| `post.engagement.commentCount` | whole number | The number of comments Douyin shows for the post. |
| `post.engagement.shareCount` | whole number | The number of shares Douyin shows for the post. |
| `post.engagement.saveCount` | whole number | The number of saves Douyin shows for the post. |
| `media` | list of text | Links to public images attached to the comment. Only some comments have it. |

**Example row**

A real row from a recent successful run, shown in full.

```json
{
  "commentId": "7687804581959009065",
  "text": "唯独音乐没有亏待我们90后",
  "postId": "7686432847778982833",
  "post": {
    "caption": "当你在2026年再次听到这首歌（第5集）#ladygaga #pokerface #高中生",
    "creator": {
      "userId": "85020314682",
      "displayName": "拉小提琴的王主任🎻"
    },
    "publishedAt": "2026-09-17T09:40:14.000Z",
    "engagement": {
      "likeCount": 8136378,
      "commentCount": 71192,
      "shareCount": 1477276,
      "saveCount": 521170
    }
  },
  "createdAt": "2026-09-21T02:14:21.000Z",
  "likeCount": 1144,
  "replyCount": 9,
  "isHot": true,
  "isPinned": false,
  "commenter": {
    "userId": "96924266142",
    "displayName": "豆虾包",
    "avatarUrl": "https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_e4eefffef2c6b2c791d0e3a65cb851c5.jpeg?from=2064092626",
    "profileUrl": "https://m.douyin.com/share/user/MS4wLjABAAAAnmfRgd3zEJwYm8IgTDQdgQveuM32uSU5yKhUynTY4lE?scene_from=douyin_h5_search",
    "region": "四川"
  }
}
```

#### 💳 Pricing

**How you are charged**

You are charged for each successfully collected comment. Public replies use the same rate when you include them. Your price per comment depends on your Apify plan, and the Store page shows the current price.

#### 🔌 Integrations

Results are saved to an Apify dataset. You can view them in Apify Console, or read them with the Apify API from your own tools.

**Video**

https://www.youtube.com/watch?v=bNACk1_S_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Do I need a Douyin login or account?

No. You do not need to give the Actor a Douyin account or login. Douyin still limits what visitors who are not logged in can see. On image posts, they see fewer comments, and the list can stop at a login prompt.

##### Can I get replies too?

Yes. Turn on **Include reply comments** to add public replies as separate rows. Each reply includes `parentCommentId`, the ID of the comment it answers. Use **Max replies per comment** to limit how many replies you get under each comment.

##### Why did a run return fewer comments than I expected?

The Actor can only collect the public comments that Douyin returns. On image posts, visitors who are not logged in see fewer comments, and the list stops at a login prompt. Your own limits can also stop a run early.

##### Can I limit how many comments I get?

Yes. **Max comments** stops a run after a set number of comment rows. **Max comments per post** sets a limit for each post. Leave either field empty to return all available results until the source is exhausted.

##### Can it search Douyin for posts?

No. It works from the post links or video IDs you give it. To find posts by keyword first, use **Douyin Search Scraper**, which is listed under Related Actors.

##### Do I need to write code?

No. You can run the Actor from the Apify Console form. Developers can also start runs and read the dataset with the Apify API.

### 📝 Changelog

**v0.0** (16-10-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~douyin-comments-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- **[Douyin Search Scraper](https://apify.com/maximedupre/douyin-search-scraper)**: Find public Douyin posts by keyword or hashtag, then add their links here to collect comments.
- **[Douyin Analytics Scraper](https://apify.com/maximedupre/douyin-analytics-scraper)**: Check current public Douyin hot-search topics for social listening.
- **[Instagram Reels Comments Scraper](https://apify.com/maximedupre/instagram-reels-comments-scraper)**: Collect top-level comments from public Instagram Reels for the same kind of audience feedback.
- **[Threads Replies Scraper](https://apify.com/maximedupre/scrape-threads-replies)**: Collect public replies from Threads posts to see how people respond.
- **[Reddit Comments Search Scraper](https://apify.com/maximedupre/reddit-comments-search-scraper)**: Search public Reddit comments for brand mentions and customer feedback.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `postUrls` (type: `array`):

Add one full link for each publicly visible Douyin video or image post. For a video, you can also add its numeric ID instead, such as 7577614489533680959. Numeric IDs are read as videos, so use the full link for an image post. The form starts with one sample video link. Replace it with your own post.

## `includeReplies` (type: `boolean`):

Add public replies as separate comment rows. They are charged at the same rate as top-level comments.

## `commentOrder` (type: `string`):

Choose the order for each post. Likes and replies put the highest counts first.

## `maxComments` (type: `integer`):

Optional stop after this many comment rows across the run. Requested replies also count. Leave it empty to return all available results until the source is exhausted. On image posts, visitors who are not logged in see fewer comments. The list stops at a login prompt, even when empty. The form starts at 50, but a run that leaves this field out has no limit.

## `maxCommentsPerPost` (type: `integer`):

Optional stop after this many comment rows from each post. Requested replies count. Leave it empty to return all available results for each post until the source is exhausted. On image posts, visitors who are not logged in see fewer comments. The list stops at a login prompt, even when empty.

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

Keep at most this many public replies under each comment. This applies when Include reply comments is on. Leave it empty to return all available results for each comment until the source is exhausted. Visitors who are not logged in see up to about three replies, even when empty.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.douyin.com/video/7686432847778982833"
  ],
  "includeReplies": false,
  "commentOrder": "source",
  "maxComments": 50
}
```

# Actor output Schema

## `comments` (type: `string`):

Open the collected comments as dataset rows.

# 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 = {
    "postUrls": [
        "https://www.douyin.com/video/7686432847778982833"
    ],
    "maxComments": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/douyin-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 = {
    "postUrls": ["https://www.douyin.com/video/7686432847778982833"],
    "maxComments": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/douyin-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 '{
  "postUrls": [
    "https://www.douyin.com/video/7686432847778982833"
  ],
  "maxComments": 50
}' |
apify call maximedupre/douyin-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maximedupre/douyin-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/spTxHefjLpChCZlZ3/builds/zfljxadykC7wr1uVk/openapi.json
