# Douyin Scraper API - Videos, Comments, Profiles, Hot Search (`reportable_broth/douyin-scraper`) Actor

Douyin (抖音, the Chinese TikTok) scraper API: user profiles and user videos with stats and video URLs for download, deep comments and hot search, no login. Keyword video search with your own cookie. Stops safely at Douyin's check. Monitor mode. $1.99 per 1,000.

- **URL**: https://apify.com/reportable\_broth/douyin-scraper.md
- **Developed by:** [Quiet Harvest](https://apify.com/reportable_broth) (community)
- **Categories:** Social media, Videos, Marketing
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 item (your own login or no login)s

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/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 Scraper (抖音)

A Douyin scraper for the Chinese TikTok: profiles and their videos, video details, comments, the hot search list (热榜) and keyword search. Everything except search works without login.

$1.99 per 1,000 items.

### What does Douyin Scraper do?

- **Profiles.** Followers, following, likes received, video count, bio, IP region, plus the newest videos.
- **Videos.** Caption, hashtags, publish time, likes, comments, shares, collects, plays, video URL, photo-post images, music.
- **Comments.** Deep, no login.
- **Hot search.** About 50 trending topics with heat values.
- **Search.** By relevance, most liked or latest, with a time filter. Needs your own cookie.

### What can I use it for?

- Track a creator's new videos and follower count over time.
- Pull thousands of comments under one video to see how people reacted.
- Save the Douyin hot list every hour to see what's trending in China.
- Find the most-liked videos on a keyword from the past week.
- Compare how competing brands' videos perform.

### How do I use it?

1. Open the actor on Apify and click Try for free. A free Apify account is enough to start.
2. Paste profile links, video links, or turn on `hotSearch`. None of these need a login.
3. For keyword search or more than ~20 videos per profile, add your cookie (steps below).
4. Click Start.
5. When it finishes, open the Output tab and download JSON, CSV or Excel. Or read the dataset through the API.

#### Getting your cookie

Only for search, and for more than ~20 videos per profile.

1. Log in at www.douyin.com in Chrome, press F12.
2. Open Network, reload, click any `douyin.com` request.
3. Copy the whole Cookie request header into `cookie`. It must contain `sessionid`.

Apify stores it encrypted and it's only sent to Douyin. Profiles, video details, comments and hot search never use it.

### Examples

A profile's newest videos plus the hot list, no login:

```json
{
  "users": ["https://www.douyin.com/user/MS4wLjABAAAAqXcP_062GDD5oYUAXn5l9im7InL1j5zBlGFxmqyVkDs"],
  "maxVideosPerUser": 20,
  "hotSearch": true,
  "onlyNew": true
}
```

All comments on one video, no login:

```json
{ "videoUrls": ["https://www.douyin.com/video/7412345678901234567"], "maxCommentsPerVideoUrl": 2000 }
```

Most-liked videos on a keyword from the past week, with your cookie:

```json
{ "searchKeywords": ["露营", "咖啡"], "sort": "most_liked", "publishTime": "week", "cookie": "sessionid=...; ..." }
```

### Input

| Field | Default | |
|---|---|---|
| `users` | | douyin.com/user/... or v.douyin.com links |
| `maxVideosPerUser` | `20` | ~20 without login. More uses your cookie |
| `videoUrls` | `[]` | Video URL, short link or ID |
| `maxCommentsPerVideoUrl` | `100` | |
| `maxCommentsPerFoundVideo` | `0` | Comments for user/search videos. 0 = off |
| `hotSearch` | `false` | |
| `searchKeywords` | `[]` | Needs a cookie |
| `maxVideosPerKeyword` | `30` | Max 50 |
| `sort` | `general` | `general`, `most_liked`, `latest` |
| `publishTime` | `any` | `any`, `day`, `week`, `half_year` |
| `accountMode` | `own` | `own` = your cookie (no cookie = search skipped), `none` = no login |
| `cookie` | | See above |
| `onlyNew` | `false` | Skip items returned in earlier runs |
| `requestGapSecs` | 2 s with cookie, 1 s without | |

### What data do I get?

Rows have a `type`: `video`, `comment`, `user` or `hotSearch`.

```json
{
  "type": "video",
  "url": "https://www.douyin.com/video/7412345678901234567",
  "text": "...",
  "createdAt": "2026-09-18T07:38:24+00:00",
  "likes": 18200, "comments": 640, "shares": 310, "collects": 2100,
  "hashtags": ["露营"],
  "region": "浙江",
  "videoUrl": "https://...",
  "author": { "name": "...", "followers": 520000, "url": "https://www.douyin.com/user/..." }
}
```

Also: `id`, `plays`, `durationSec`, `cover`, `images`, `isImagePost`, `music`, `isAd`. Comments have `text`, `likes`, `replies`, `region`, `user`.

Text comes back as posted, mostly Simplified Chinese. Nothing is translated.

### Limits

- Douyin's web search gives at most about 50 videos per keyword. Use a few related keywords if you need more.
- Search is guarded by a slider check. In my tests it depended on how many search pages an account loaded in a short time, not speed: about 65 pages on a fresh account, about 45 more after a check, and it cleared on its own after about 5 minutes. As soon as Douyin asks for the check, the run stops using your login and tells you why. The rest of the run still finishes. Wait 5 minutes or do the slider on douyin.com, then run again.
- One IP per run, switched once if Douyin rate-limits.
- `videoUrl` and image links point to Douyin's CDN and can stop working after a while. Download the files soon after the run if you need them. The `url` field is the permanent link.

### How much does it cost?

$1.99 per 1,000 items: profiles, videos, comments, hot search topics, search results. There's no separate compute charge. If a run stops early you only pay for what was delivered. With `onlyNew` on, only new items.

Some real numbers:

- A profile and its 20 newest videos: 21 × $0.00199 = $0.04.
- 2,000 comments on one video, plus the video: 2,001 items = $3.98.
- 50 search results with 20 comments each: 50 + 1,000 = 1,050 items = $2.09.

Apify's free plan gives you $5 of credit a month. That's about 2,500 items here.

### FAQ

**Why do I need a cookie?**
Only for keyword search and for more than the latest ~20 videos on a profile. Douyin doesn't show those to logged-out visitors. Everything else runs without one.

**Is my account safe?**
Your cookie is only used for search and deep profile pages, with 2 s between requests and one IP for the run. When Douyin shows its slider check, the run stops using your login right away. I can't promise Douyin will never restrict an account, so use a secondary one if you can.

**Why did I get so few results?**
Search tops out at about 50 videos per keyword, and profiles give ~20 videos without a cookie. If search returned nothing, check the run log: it says when there was no cookie or when Douyin asked for the slider check. With `onlyNew` on, items from earlier runs are skipped on purpose.

**Can I schedule it?**
Yes. Save your input as a Task, add a Schedule, and turn on `onlyNew` so each run only returns new videos and comments.

### Other scrapers I made

- [Weibo Scraper](https://apify.com/reportable_broth/weibo-scraper), [RedNote / Xiaohongshu](https://apify.com/reportable_broth/rednote-xiaohongshu-scraper), [Bilibili](https://apify.com/reportable_broth/bilibili-scraper)
- [Threads Scraper & Monitor](https://apify.com/reportable_broth/threads-scraper-monitor), [YouTube Monitor](https://apify.com/reportable_broth/youtube-scraper-monitor)

Found a bug or need a field? Open an issue on the Issues tab.

### 中文说明

抓抖音用户资料和作品、视频数据、评论、热榜和关键词搜索。除了搜索，其他都不用登录；搜索要填自己的抖音 cookie（步骤见上）。每 1,000 条 $1.99。

***

Only collects public data. Request signing uses an open-source a\_bogus implementation (Apache 2.0, see NOTICE). You're responsible for how you use the data.

# Actor input Schema

## `users` (type: `array`):

douyin.com/user/\<sec\_uid> or v.douyin.com short links. Works without login.

## `includeProfile` (type: `boolean`):

Followers, following, likes received, video count, bio, IP location.

## `maxVideosPerUser` (type: `integer`):

Newest first. Without login Douyin returns the latest ~20; more than 20 uses the login.

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

douyin.com/video/<id>, v.douyin.com short links, or the video ID. Returns the video and its comments. Works without login.

## `maxCommentsPerVideoUrl` (type: `integer`):

Comments work without login and go deep.

## `maxCommentsPerFoundVideo` (type: `integer`):

Also fetch this many comments for every video found. 0 = off.

## `hotSearch` (type: `boolean`):

Douyin's ~50 trending topics with heat values. Works without login.

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

Video search. Needs your own Douyin cookie (see the cookie field).

## `maxVideosPerKeyword` (type: `integer`):

Douyin's web search returns at most about 50 videos per keyword. For more, add related keywords.

## `sort` (type: `string`):

Search order.

## `publishTime` (type: `string`):

Search filter.

## `accountMode` (type: `string`):

Only search and user videos beyond the latest 20 need a login. Everything else runs without login. Using our accounts (no setup): coming soon.

## `cookie` (type: `string`):

Log in at www.douyin.com and copy the Cookie request header (see README). Must contain sessionid. Stored encrypted; only sent to Douyin.

## `onlyNew` (type: `boolean`):

Schedule the Actor; each run returns only videos and comments earlier runs haven't returned.

## `monitorStoreName` (type: `string`):

Runs with the same inputs share memory automatically.

## `requestGapSecs` (type: `number`):

Default 2 s with a cookie, 1 s without. Slower is safer for your account.

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

One IP is kept for the run; it changes once if Douyin rate-limits.

## Actor input object example

```json
{
  "users": [
    "https://www.douyin.com/user/MS4wLjABAAAAqXcP_062GDD5oYUAXn5l9im7InL1j5zBlGFxmqyVkDs"
  ],
  "includeProfile": true,
  "maxVideosPerUser": 20,
  "videoUrls": [],
  "maxCommentsPerVideoUrl": 100,
  "maxCommentsPerFoundVideo": 0,
  "hotSearch": false,
  "searchKeywords": [],
  "maxVideosPerKeyword": 30,
  "sort": "general",
  "publishTime": "any",
  "accountMode": "own",
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "users": [
        "https://www.douyin.com/user/MS4wLjABAAAAqXcP_062GDD5oYUAXn5l9im7InL1j5zBlGFxmqyVkDs"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("reportable_broth/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 = {
    "users": ["https://www.douyin.com/user/MS4wLjABAAAAqXcP_062GDD5oYUAXn5l9im7InL1j5zBlGFxmqyVkDs"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("reportable_broth/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 '{
  "users": [
    "https://www.douyin.com/user/MS4wLjABAAAAqXcP_062GDD5oYUAXn5l9im7InL1j5zBlGFxmqyVkDs"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call reportable_broth/douyin-scraper --silent --output-dataset

```

## MCP server setup

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