# Douyin Scraper: Videos, Comments, Search & Hot List (`apisamurai/douyin-scraper`) Actor

Douyin Scraper for videos by keyword, the videos of any user, single videos by link, comments and the hot list. Likes, comments, shares, favorites, dates and authors. No login, date and likes filters, pay only for real rows.

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

## Pricing

from $2.00 / 1,000 videos

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: Videos, Comments, Search & Hot List

This Douyin Scraper gets Douyin videos by keyword, the latest videos of any user, single videos by link, the comments under a video, and the live hot list. Every row comes with a title, hashtags, author, date, duration, cover and link, plus likes, comments, shares, favorites and heat index where Douyin shows them. You pay only for real, unique rows, and IDs are always text.

### What you can use it for

- **Trend and topic research:** search a keyword, filter by period, length and type (low-follower hits, high completion rate, high follower growth, high like rate), and see what is taking off.
- **Creator and competitor analysis:** archive a creator's latest videos with dates and counts, and compare accounts.
- **Read the comments** under videos for sentiment analysis, audience feedback or market research, with each commenter's location.
- **Check single videos** by link for full counts: likes, comments, shares and favorites.
- **Watch the hot list** to see what Douyin is talking about right now.
- **Build Chinese-language datasets** of titles, hashtags and comments for AI and NLP work.
- **Monitor on a schedule** with a date filter, and send new rows to Sheets, Slack or a database.

### Fair billing

- Only real rows are charged: videos, comments and hot topics. No demo, mock or placeholder rows, ever. If the data source sends one, it is dropped and counted in the run summary.
- Same price on every Apify plan, free plan included.
- Free Apify plan: 1 live run a day, with one data request, so you can try it. Paid plans have no limit.
- Limits, dates and likes filters are enforced by the Actor itself. Videos outside your dates or filters are skipped and not charged.
- Duplicates are never charged. A video found by two keywords, or by a keyword and a link, is saved once.
- Empty results, missing users or videos, videos with no comments and failed requests cost nothing.
- When you hit your spending limit, the run stops cleanly.

### How to use

1. Open the [Douyin Scraper](https://apify.com/apisamurai/douyin-scraper) page and click **Try for free** (you sign in to your Apify account).
2. Add **Search keywords**, **Users**, **Video links**, or turn on **Add the hot list**.
3. Set **Max videos per keyword or user**, and optionally dates and min likes. Turn on **Also get comments of the videos found** to add comments.
4. Click **Start**. Rows appear in the **Output** tab while the run works.
5. Export the dataset as JSON, CSV or Excel, or check the `SUMMARY` record in the key-value store.

### Input

| Field | What it does |
|---|---|
| Search keywords | Videos matching each keyword, one per line. Chinese keywords work best. |
| Search: posted within / video type / video length | Any time (default), last 3, 7 or 30 days. Any type (default), low-follower hits, high completion rate, high follower growth or high like rate. Any length (default), under 15 s, 15 to 60 s, 1 to 2 min, 2 to 3 min or over 3 min. |
| Users | Profile links such as `https://www.douyin.com/user/MS4wLjABAAAA...`, the bare `sec_user_id` (it starts with `MS4wLjABAAAA`), or `v.douyin.com` short links. Latest videos first. |
| Video links | `douyin.com/video/<id>`, `douyin.com/note/<id>`, `iesdouyin.com/share/video/<id>`, a bare numeric ID, or a `v.douyin.com` short link. |
| Also get comments of the videos found | Off by default. Adds the comments of videos from keywords, users and video links. |
| Add the hot list | Off by default. Adds the current hot list (about 50 topics). |
| Max videos per keyword or user | Default 100, exact. A keyword search gives at most 1,000. |
| Max comments per video | Default 20, exact. |
| Max rows for the whole run | Optional hard cap on all rows. Videos are saved before comments. |
| Posted on or after / on or before | Inclusive, UTC. Relative dates like `7 days` work. Videos only. |
| Min likes | Skip videos below this number. Videos only. |

```json
{
  "searchKeywords": ["美食"],
  "searchPostedWithin": "last7days",
  "searchVideoType": "highLikeRate",
  "users": ["https://www.douyin.com/user/MS4wLjABAAAA..."],
  "includeComments": true,
  "maxVideosPerSource": 20,
  "maxCommentsPerVideo": 20
}
```

### Output

One row per video, comment or hot topic; `type` tells them apart. Field names never change between runs. Real output (3 December 2026, shortened), a video found by keyword search:

```json
{
  "type": "video",
  "id": "7710242533372071202",
  "url": "https://www.douyin.com/video/7710242533372071202",
  "title": "现发团一致好评的冰版冷面！吃过一碗想两碗，根本停不下来~ #贾冰开饭啦 ...",
  "createdAt": "2026-11-20T13:18:59.000Z",
  "durationSeconds": 260,
  "cover": "https://p3-byteindex-sign.byteimg.com/...",
  "hashtags": ["贾冰开饭啦", "跟贾冰学做饭", "冷面"],
  "author": { "id": null, "secUid": null, "name": "贾冰开饭啦", "handle": null, "followers": 7044841 },
  "likes": 9782548,
  "comments": null,
  "shares": null,
  "favorites": null,
  "plays": null,
  "heatIndex": 748142,
  "viralTags": ["high like rate"],
  "sourceType": "search",
  "sourceInput": "美食",
  "scrapedAt": "2026-12-03T10:00:00.000Z"
}
```

The same kind of row from a video link has every count and the author ID and handle: `"id": "7714261868830870810"`, `"title": "手工苕皮涮火锅 简直震撼美味～#好好吃饭 ..."`, `"durationSeconds": 958`, `"likes": 75908`, `"comments": 3016`, `"shares": 59281`, `"favorites": 10211`, `"plays": null`, `"heatIndex": null`, `"viralTags": null`, `"sourceType": "link"`.

A comment row: `{ "type": "comment", "id": "7714726575200158518", "videoId": "7714261868830870810", "url": "https://www.douyin.com/video/7714261868830870810", "text": "她这一顿多少钱", "createdAt": "2026-12-02T15:19:17.000Z", "likes": 0, "replyCount": 1, "author": { "id": "7579115887509881913", "secUid": "MS4wLjABAAAA...", "name": "依辰宝贝" }, "ipLocation": "河南", "sourceInput": "7714261868830870810", "scrapedAt": "..." }`.

A hot topic row: `{ "type": "hot-topic", "rank": 1, "word": "东部战区就东海战备巡航发声", "hotValue": 11486689, "videoCount": 7, "viewCount": 64752078, "label": 3, "url": "https://www.douyin.com/search/...", "scrapedAt": "..." }`. The pinned top slot of the list has no rank (`null`).

Times are ISO 8601 UTC. `sourceType` is `search`, `user` or `link`. Missing values are `null`, never a fake 0. Where each route has data:

- **Video links and user videos** return likes, comments, shares and favorites, the author's ID, handle and name, hashtags and the cover. `plays` and `followers` appear only when Douyin shares them (it often hides them).
- **Keyword search** has title, likes, duration, the author's name and followers, the heat index and the viral tags, but no comment, share, favorite or play counts and no author ID (`null`). Use a video link for full counts.
- **Photo posts** use a `douyin.com/note/<id>` link and have no duration.

Each run also writes a `SUMMARY` record to the key-value store. For every input it lists rows delivered, rows skipped by dates or filters, duplicates, and why it stopped (`limit reached`, `no more results`, `not found or deleted`, `temporary error`, `spending limit`, `free plan limit` or `data source unavailable`).

### Pricing

$2 per 1,000 videos, comments and hot topics; $6.50 per 1,000 videos by link; $0.005 per run start

A video fetched by its link costs more because each link needs a data request of its own. A short `v.douyin.com` link needs one more request to read it.

### Integrations

- **Apify API:** start a run and get the rows in one call with `POST https://api.apify.com/v2/acts/apisamurai~douyin-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>` and the input as JSON in the body.
- **Python and JavaScript clients** (`apify-client`): `client.actor("apisamurai/douyin-scraper").call(run_input={...})`.
- **Zapier, Make and n8n** to send new rows to Google Sheets, Slack, a CRM or a database.
- **MCP for AI agents:** connect the Apify MCP server to Claude, ChatGPT or another MCP client and the agent can run this Actor as a tool.
- **Schedules and webhooks** in Apify Console for daily or hourly runs.

### More China platform scrapers

- [Weibo Scraper](https://apify.com/apisamurai/weibo-scraper): Weibo posts by keyword or user, comments and the live hot search list.
- [Bilibili Scraper](https://apify.com/apisamurai/bilibili-scraper): Bilibili videos by keyword or user, comments and the popular list.
- [Zhihu Scraper](https://apify.com/apisamurai/zhihu-scraper): Zhihu answers and articles by keyword, question or user, comments and the hot list.

### FAQ

**Do I need a Douyin account?**
No. You only need an Apify account. You never enter credentials, cookies or a session.

**Which keywords work best?**
Chinese keywords. English words work but find fewer videos. Narrow a search with the period, video type and video length choices.

**Which links work?**
Public videos and users. Video links: `douyin.com/video/<id>`, `douyin.com/note/<id>`, `iesdouyin.com/share/video/<id>`, a bare numeric ID or a `v.douyin.com` short link (also pasted inside the share text). Users: `douyin.com/user/<sec_user_id>`, the bare `sec_user_id`, or a `v.douyin.com` short link. Search and home page links are skipped with a log line and no charge.

**What time zone are dates in?**
`createdAt` is UTC. Douyin search gives China time (UTC+8), which the Actor converts. "Posted on or after / before" count whole days in UTC.

**How far back does search go?**
One search per keyword returns up to 1,000 videos from about the last 90 days, in one request, so there is no paging. A user's videos are read newest first, 20 a page, and stop once they are older than your start date.

**Why do search rows have fewer counts than videos by link?**
Search results do not include comment, share, favorite or play counts, or the author ID. Those fields are `null` on search rows. Fetch the video by its link for full counts.

**Do filters work on comments?**
No. Dates and min likes apply to videos. Comments are limited by **Max comments per video** and **Max rows for the whole run**.

**Why did I get fewer results than I asked for?**
Open the `SUMMARY` record. It says for each input why it stopped: no more results, rows skipped by dates or filters, duplicates, the spending limit or the free plan limit. A free run is one live run a day with one data request.

**What is not charged?**
Duplicates, rows outside your dates or filters, placeholder rows, empty results, missing users or videos, videos with no comments, rejected links and failed requests.

**Is it legal to scrape Douyin?**
The Actor collects only public data. You are responsible for how you use it: follow the Douyin terms and the laws where you live, and take care with personal data (for example under GDPR or China's PIPL). This is not legal advice.

# Actor input Schema

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

Find videos that match these keywords. One per line. Chinese keywords work best, for example 美食. One search returns up to 1,000 videos from about the last 90 days.

## `searchPostedWithin` (type: `string`):

Only videos posted in this period. If you leave it on any time and set Posted on or after below, the smallest matching period is used.

## `searchVideoType` (type: `string`):

Keep only videos that stand out in one way.

## `searchDuration` (type: `string`):

Only videos of this length.

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

Get the latest videos of these accounts. Profile links like https://www.douyin.com/user/MS4wLjABAAAA..., the bare sec_user_id (it starts with MS4wLjABAAAA), or v.douyin.com short links. One per line.

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

Get these videos with full counts: douyin.com/video/<id> or douyin.com/note/<id> links, iesdouyin.com/share/video/<id> links, bare numeric video IDs, or v.douyin.com short links. One per line.

## `includeComments` (type: `boolean`):

On: for the videos saved from keyword search, users and video links, also save their comments (up to Max comments per video). A video with no comments costs nothing.

## `includeHotList` (type: `boolean`):

On: also save the current Douyin hot search list (about 50 topics).

## `maxVideosPerSource` (type: `integer`):

Maximum videos saved for each keyword and each user. Enforced exactly. Keyword search returns at most 1,000.

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

Maximum comments saved for each video. Enforced exactly.

## `maxTotalItems` (type: `integer`):

Optional hard cap on all rows (videos, comments and hot topics) across the run. Videos are saved before comments. Leave empty for no total cap.

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

Only videos published on or after this day (UTC). Also accepts relative dates such as 7 days. Applies to videos, not comments. Videos outside the range are skipped and not charged. A user's list stops once its videos are older than this day.

## `postedBefore` (type: `string`):

Only videos published on or before this day (UTC, the whole day is included). Videos outside the range are skipped and not charged.

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

Skip videos with fewer likes. Skipped videos are not charged.

## Actor input object example

```json
{
  "searchKeywords": [
    "美食"
  ],
  "searchPostedWithin": "any",
  "searchVideoType": "any",
  "searchDuration": "any",
  "includeComments": false,
  "includeHotList": false,
  "maxVideosPerSource": 20,
  "maxCommentsPerVideo": 20
}
```

# Actor output Schema

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

Video rows from keyword search have title, likes, duration, heat index, viral tags and the author's name and followers (no comment, share, favorite or play counts, and no author ID). Rows from a user or a video link have every count Douyin shows, with plays only when Douyin shares them. Comment rows have text, likes, reply count, author and location. Hot topic rows have rank, word, hot value and link.

## `summary` (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 = {
    "searchKeywords": [
        "美食"
    ],
    "maxVideosPerSource": 20,
    "maxCommentsPerVideo": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("apisamurai/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 = {
    "searchKeywords": ["美食"],
    "maxVideosPerSource": 20,
    "maxCommentsPerVideo": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("apisamurai/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 '{
  "searchKeywords": [
    "美食"
  ],
  "maxVideosPerSource": 20,
  "maxCommentsPerVideo": 20
}' |
apify call apisamurai/douyin-scraper --silent --output-dataset

```

## MCP server setup

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