# Douyin Scraper: China TikTok Trends, Profiles & Comments (`polyglot-data/douyin-scraper`) Actor

Extract Douyin hot-search trends, or use video/profile URLs or IDs for comments and creator profiles. Get heat ranks, likes and follower counts for China social media monitoring. No login.

- **URL**: https://apify.com/polyglot-data/douyin-scraper.md
- **Developed by:** [Polyglot Data](https://apify.com/polyglot-data) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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 Scraper: Trending, Profiles & Comments (China TikTok)

![Douyin Scraper example output](https://api.apify.com/v2/key-value-stores/5noGfeHp3GYPBOMYQ/records/douyin-banner.png?signature=GcktPmNvhcQNKbVRAyH5)

A **Douyin scraper** for the Chinese version of TikTok. Get Douyin's live **trending hot-search list**, public **creator profiles** and **Douyin comments** (text, likes, replies, IP location, date) as clean JSON. No login, no cookies, no browser.

Use it for **China social media monitoring**, trend research, **Douyin comments scraper** workflows, sentiment analysis and influencer discovery. Douyin is a different app from TikTok with its own content, so this **China TikTok** data is not available through TikTok scrapers.

- **Douyin trending**: the hot-search board (about 50 topics) with heat value, rank, label, video count, views and cover. Fast and cheap.
- **Douyin comments**: top-level comments of any public video, newest-first pages, with likes, reply count, commenter name and province (`ipLabel`).
- **Creator profiles**: nickname, Douyin id, bio, followers, following, total likes, video count, IP location, avatar.
- **Links and ids**: `douyin.com/video/...`, `douyin.com/user/...`, `v.douyin.com` short links, or bare ids.
- **Pay per item**: trending topic $0.001, profile $0.003, comment $0.0005 (that is $0.50 per 1,000 comments). Error items are never charged.

### 📦 What data you get

| Mode | Fields |
|---|---|
| `trending` | `rank`, `word`, `hotValue`, `label`, `videoCount`, `viewCount`, `discussVideoCount`, `sentenceId`, `groupId`, `eventTime`, `coverUrl`, `url` |
| `profiles` | `secUid`, `uid`, `douyinId`, `nickname`, `signature`, `followerCount`, `followingCount`, `totalLiked`, `videoCount`, `ipLocation`, `verifyText`, `age`, `avatarUrl`, `url` |
| `comments` | `cid`, `awemeId`, `videoUrl`, `text`, `likeCount`, `replyCount`, `createTime`, `ipLabel`, `userNickname`, `userSecUid`, `userUid`, `likedByAuthor` |

Every item also has `type` and `scrapedAt`. Fields Douyin does not show are `null`.

#### Example comment item

```json
{
  "type": "comment",
  "cid": "7710612909106397952",
  "awemeId": "7710417478555323663",
  "text": "I am looking forward to GTA7 now [smile]",
  "likeCount": 382,
  "replyCount": 41,
  "createTime": "2026-11-20T06:38:28.000Z",
  "ipLabel": "Zhejiang",
  "userNickname": "CVCV"
}
```

### 🚀 How to use

1. Pick a **mode**. `trending` needs nothing else.
2. For `profiles` or `comments`, paste links in **Profile / video URLs**, one per line.
3. Set **Max items** (comments are split evenly between videos) and run.

```json
{ "mode": "comments", "urls": ["https://www.douyin.com/video/7710417478555323663"], "maxItems": 200 }
```

### ⚙️ Limits (honest list)

- **No keyword search**: Douyin refuses search to anonymous visitors, so there is no search mode.
- **No video detail and no "latest videos of a profile" yet**: Douyin protects those two endpoints with a browser-generated visitor signature that this Actor cannot produce without a real browser. `profiles` returns the profile only. These modes will be added if a no-browser way is found.
- **Comments are top-level only** (no reply threads), public data only, as many as Douyin returns for the video.
- Douyin changes its request signature every few months. If runs return `BLOCKED` across the board, the signer needs an update; the Actor is maintained but give it a few days.
- Heat values and labels are Douyin's own. Text is mostly Chinese.
- The Actor is deliberately slow (about 1 to 2 seconds per request) and uses residential proxies on Apify.

### 🔒 Privacy

Reads only public pages and public API responses. No login, no cookies from you. Commenter names are public display names as Douyin shows them; handle personal data according to the law that applies to you.

### ❓ FAQ

**Do I need a Douyin account?** No.

**Can I get the comments of any video?** Public videos with comments open, yes. Closed comments return a `NO_RESULTS` item.

**What does BLOCKED mean?** Douyin refused requests even after the Actor switched to fresh residential IPs. Wait and run again, or lower Max items.

**Where do I find a profile's `sec_uid`?** It is the long `MS4wLj...` part of the profile URL.

### ⚖️ Legal

This actor reads publicly available data. You are responsible for using it in line with applicable laws, including data protection rules, and the terms of the site.

### More actors by Polyglot Data

- [1688.com Product Scraper](https://apify.com/polyglot-data/china-1688-scraper): China wholesale prices, MOQ and suppliers.
- [AliExpress Scraper](https://apify.com/polyglot-data/aliexpress-scraper): AliExpress products and prices.
- [JobStreet & SEEK Jobs Scraper](https://apify.com/polyglot-data/seek-jobs-scraper): jobs from SG, MY, ID, PH, AU, NZ.
- [ATS Jobs Scraper](https://apify.com/polyglot-data/ats-jobs-scraper): jobs from Workday, Greenhouse, Lever, Ashby and more.

# Actor input Schema

## `mode` (type: `string`):

trending: Douyin's live hot-search list (about 50 topics). profiles: public info of creators from their profile URLs. comments: top-level comments of videos from their URLs or ids.

## `urls` (type: `array`):

For profiles: https://www.douyin.com/user/\<sec_uid> links or the sec_uid itself. For comments: https://www.douyin.com/video/<id> links or numeric video ids. v.douyin.com short links work for both. Ignored in trending mode.

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

Stop after saving this many items in total. In comments mode it is split evenly between videos; a video with fewer comments hands its unused share to the next ones. Each saved item is one charged event.

## `maxPagesPerVideo` (type: `integer`):

Safety cap on comment pages (about 20 comments per page) read for each video.

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

Douyin blocks datacenter IPs and limits requests per IP. By default the Actor uses Apify residential proxy and switches IP every 25 requests and whenever Douyin refuses a request.

## Actor input object example

```json
{
  "mode": "trending",
  "maxItems": 50,
  "maxPagesPerVideo": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("polyglot-data/douyin-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 = { "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    } }

# Run the Actor and wait for it to finish
run = client.actor("polyglot-data/douyin-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 '{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call polyglot-data/douyin-scraper --silent --output-dataset

```

## MCP server setup

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