# Douyin Scraper: Videos, Comments, Play Counts, Trends 抖音 (`dataxapi/douyin-scraper`) Actor

Search Douyin (抖音) videos by keyword, list an account's videos, export comments, read play counts and pull the Douyin index (巨量算数) for keywords. Paste links or share text as they are. Pay only for results returned.

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

## Pricing

from $3.50 / 1,000 video from searches

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: Videos, Comments, Play Counts, Trends 抖音

Search Douyin (抖音, the Chinese TikTok) videos by keyword, list what an account posted, export the comments under a video, read a video's play count and pull the Douyin index (巨量算数) for keywords, day by day. Paste links, share text or IDs as you have them. No login, no cookie, no QR code.

**You pay only for results you get.** An input that does not exist, a search that finds nothing and a call that fails cost you nothing. Nothing is charged twice in a run.

| You give | You get | Price |
|---|---|---|
| Search keywords | One video found by a keyword: caption, author with follower count, likes, comments, shares, saves, length, cover, link. | $3.50 per 1,000 |
| Profile links or sec_uid | One video an account posted: caption, likes, comments, shares, saves, length, time posted. | $1.00 per 1,000 |
| Video links or IDs to export comments from | One comment on a video: text, commenter, likes, reply count, time posted, IP location. | $1.00 per 1,000 |
| Video links or IDs to read play counts of | One video's plays and likes as of now. | $2.00 per 1,000 |
| Keywords | One keyword's daily search index and composite index over the chosen dates, with period averages. | $6.00 per 1,000 |
| Tick "Play count of each video found" | One video's plays and likes as of now. | $2.00 per 1,000 |

One result as it comes back, from a recorded Douyin video search call (IDs, names, text and links masked as "…"):

```json
{
  "kind": "video",
  "input": "露营",
  "id": "…",
  "url": "https://example.com/…",
  "type": "video",
  "title": null,
  "text": "…",
  "lang": "zh",
  "published_at": "2026-09-11T01:32:11.000Z",
  "author": {
    "id": "…",
    "username": "…",
    "name": "…",
    "avatar_url": "https://example.com/…",
    "followers": 2525
  },
  "metrics": {
    "likes": 96505,
    "comments": 2219,
    "shares": 60467,
    "favorites": 7038
  },
  "images": null,
  "hashtags": [
    "…",
    "…"
  ],
  "fetched_at": "2026-10-12T19:01:55.000Z"
}
```

### What it is for

- Trend and topic research: which videos rank for a keyword, and how a keyword's index moves day by day.
- Creator and competitor tracking: an account's videos with likes, comments, shares and play counts.
- Comment analysis: export comments for sentiment, questions and product feedback.
- Campaign reporting: play counts of a list of videos, as of now.

### Why this Actor

- **Paste what you have.** Browser links, the share text the app copies, short links and IDs all work; you do not have to dig an ID out of a link.
- **Several jobs in one run.** Fill any of the sections below; each row says which input it came from.
- **No charge for nothing.** Not found, private, deleted, an empty search or a failed call: no row and no charge. The same item met twice in a run is charged once.
- **Your spending limit holds.** Set a maximum cost per run and the run stops before it, saying so in the log and in `OUTPUT`.
- **Same field names everywhere.** `text`, `author`, `metrics`, `published_at` (ISO 8601, UTC) mean the same in all our Actors for Chinese platforms, so one pipeline reads them all.
- **Small and fast.** Runs in 256 MB; results arrive page by page as they are fetched.

### How to use

1. Fill one or more sections of the input: keywords, links or IDs, one per line.
2. Set how many results you want per entry.
3. Click **Start**. Results appear in the **Output** tab as they come; export them as JSON, CSV, Excel or HTML, or read them through the Apify API.

### Input examples

**Search videos**

```json
{
  "searchQueries": [
    "露营"
  ],
  "maxVideosPerQuery": 20
}
```

**Account videos**

```json
{
  "profileUrls": [
    "MS4wLjABAAAAZ0aPDJzFhBrs0q3wVsp2a9WWrBuAUMsVyygoaO0bCw8"
  ],
  "maxVideosPerProfile": 20
}
```

**Comments**

```json
{
  "commentVideoUrls": [
    "7694940173372575014"
  ],
  "maxCommentsPerVideo": 100
}
```

**Play counts**

```json
{
  "playCountVideoUrls": [
    "7694940173372575014"
  ]
}
```

**Keyword trends from the Douyin index**

```json
{
  "trendKeywords": [
    "咖啡"
  ],
  "trendSince": "2026-09-01",
  "trendUntil": "2026-09-30"
}
```

Add `"playCounts": true` to any of the above that lists `searchQueries` or `profileUrls`: Search and account lists do not carry play counts. Tick this to also read each video's current plays. Each play count is one more charged result.

### Output

One row per result. `kind` says what the row is and `input` which of your entries it came from. Each kind has its own table view in the Output tab.

| Field | What it is |
|---|---|
| `kind` | What the row is |
| `input` | The keyword, link or ID you gave |
| `id` | The platform's ID of the item; it works as is in this Actor's ID inputs |
| `url` | Link that opens the post |
| `type` | Content format |
| `title` | Title |
| `text` | Body text |
| `lang` | Language of the text |
| `published_at` | When it was published |
| `author` | Author: `id`, `username`, `name`, `avatar_url`, `verified`, `followers` |
| `metrics` | Engagement counts: `likes`, `comments`, `shares`, `favorites`, `views` |
| `images` | Image addresses |
| `hashtags` | Hashtags, without the # |
| `is_pinned` | Whether the author pinned it |
| `duration` | Length of the video, in seconds; an image post has none |
| `cover_url` | Address of the cover image |
| `video_url` | Address the video plays from: a signed address of the platform's that expires, so use it soon; an image post has none |
| `categories` | What the platform files the post under, from the first level to the third, in its words (such as 美食 › 美食教程 › 饮品教程, food › food tutorials › drink tutorials); null where it filed it under none |
| `post_id` | ID of the post it is under |
| `parent_id` | ID of the comment it replies to directly; null for a top-level comment |
| `root_id` | ID of the top-level comment of its thread; null for a top-level comment |
| `ip_location` | IP location as the platform shows it |
| `keyword` | The keyword |
| `points` | The figures day by day, one entry a day, oldest first: `date`, `search_index`, `composite_index` |
| `composite_average` | Daily average of the composite index over the period asked for |
| `search_average` | Daily average of the search index over the period asked for |
| `previous_composite_average` | Daily average of the composite index over the period of the same length before it |
| `previous_search_average` | Daily average of the search index over the period of the same length before it |
| `year_ago_composite_average` | Daily average of the composite index over the same period a year earlier |
| `year_ago_search_average` | Daily average of the search index over the same period a year earlier |
| `fetched_at` | When the data was fetched |

A field the platform does not show for an item is `null`; counts are as of the moment of the run. A run also writes a summary to the `OUTPUT` record: rows per input, what was charged, and any input that returned nothing and why.

### Pricing

Pay per result. Apify shows the same prices on the Pricing tab.

| Result | Price per 1,000 | Price per result |
|---|---|---|
| Video from search | $3.50 | $0.0035 |
| Video from a profile | $1.00 | $0.001 |
| Comment | $1.00 | $0.001 |
| Play count | $2.00 | $0.002 |
| Keyword trend | $6.00 | $0.006 |

For example, 100 keywords at 20 each is 2,000 results: $7.00.

On Apify's free plan a run is a sample: the first entry, one page, without the extras. Runs on any paid Apify plan have no such limit.

### Use it from code or an AI agent

Run it and get the rows in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/dataxapi~douyin-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["露营"],"maxVideosPerQuery":20}'
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("dataxapi/douyin-scraper").call(run_input={"searchQueries":["露营"],"maxVideosPerQuery":20})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row)
```

AI agents (Claude, ChatGPT, Cursor and others) can call it as a tool through the Apify MCP server at `https://mcp.apify.com`: add the Actor `dataxapi/douyin-scraper`. Schedules, webhooks and the Apify integrations (Make, Zapier, n8n, Google Sheets and more) work as with any Actor.

### Good to know

- Only public data is read. Nothing is posted and no account is logged in.
- Counts (likes, plays, reads) are those at the moment of the run; run it again or on a schedule to follow them.
- This Actor is not affiliated with Douyin.

### More Chinese platforms from the same developer

- [Xiaohongshu (RedNote) Scraper: Notes, Comments, Profiles 小红书](https://apify.com/dataxapi/xiaohongshu-scraper)
- [WeChat Official Account Scraper: Search & Articles 微信公众号](https://apify.com/dataxapi/wechat-official-account-articles)
- [Zhihu Scraper: Search Answers, Articles, Questions 知乎](https://apify.com/dataxapi/zhihu-scraper)
- [Weibo Scraper: Search Posts, Hot Search, User Posts 微博热搜](https://apify.com/dataxapi/weibo-scraper)
- [Bilibili Scraper: Video Search, Comments, Uploads 哔哩哔哩 B站](https://apify.com/dataxapi/bilibili-scraper)
- [China Social Media Scraper: Douyin, RedNote, Weibo 多平台搜索](https://apify.com/dataxapi/china-social-media-scraper)
- [Douyin Comments Scraper: Text, Likes, IP Location 抖音评论](https://apify.com/dataxapi/douyin-comments-scraper)
- [Xiaohongshu Comments Scraper: Text, Likes, Commenters 小红书评论](https://apify.com/dataxapi/xiaohongshu-comments-scraper)

### 中文说明

按关键词搜抖音视频，列出一个账号发过的视频，导出视频评论，查视频播放量，取关键词在巨量算数上的每日热度。链接、App 复制的分享文案、短链接、编号都能直接粘贴。不用登录，不用 Cookie，不用扫码。

\*\*只为拿到的结果付钱。\*\*输入的内容不存在、搜索没结果、调用出错，都不收费；同一次运行里同一条只收一次。可以给每次运行设花费上限，到上限前就停。

| 你给 | 你拿到 | 价格（每千条） |
|---|---|---|
| 搜索词 | 抖音视频搜索 | $3.50 |
| 主页链接 | 抖音用户视频 | $1.00 |
| 要导出评论的视频 | 抖音视频评论 | $1.00 |
| 要查播放量的视频 | 抖音视频播放量 | $2.00 |
| 关键词 | 抖音巨量算数关键词热度趋势 | $6.00 |
| 勾选“播放量” | 抖音视频播放量 | $2.00 |

Apify 免费版每次运行只取第一个输入的一页、不带附加数据；任何付费版都没有这个限制。结果可以导出 JSON、CSV、Excel，也可以用 Apify API 或 AI 助手（Apify MCP）调用。

# Actor input Schema

## `searchQueries` (type: `array`):

One keyword or phrase per line. Each returns videos with caption, author and follower count, likes, comments, shares, saves, length, cover and link.

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

Order: the platform's ranking, newest first, most liked first. Douyin does not serve most liked within a day; with that pair, a day's results come with each page in order of likes.

## `publishedWithin` (type: `string`):

Only videos posted within the last day, week or half year; any time when left out.

## `maxVideosPerQuery` (type: `integer`):

How many to return for each entry above, 8 at least (one page). Each one returned is one charged result.

## `profileUrls` (type: `array`):

One account per line. Returns the videos it posted, newest first. Works with: Link to the profile, pasted as it is: the https://www.douyin.com/user/… web link, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which account it leads to. Or the ID: Account ID (the sec_uid, the string that starts with MS4w).

## `maxVideosPerProfile` (type: `integer`):

How many to return for each entry above, 20 at least (one page). Each one returned is one charged result.

## `commentVideoUrls` (type: `array`):

One video per line. Returns its comments: text, commenter, likes, reply count, time posted, IP location. Works with: Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to. Or the ID: Video ID, a string of digits.

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

How many to return for each entry above, 20 at least (one page). Each one returned is one charged result.

## `playCountVideoUrls` (type: `array`):

One video per line. Returns its plays and likes as of now. Works with: Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to. Or the ID: Video ID, a string of digits.

## `trendKeywords` (type: `array`):

One keyword per line. Returns the keyword's search index and composite index day by day over the dates below, with the period's daily averages, the period before and a year earlier. One keyword, at most 50 characters and without a comma; letter case does not matter.

## `trendSince` (type: `string`):

The first day wanted: the China-time (UTC+8) calendar day this moment falls on; 2026-09-01 means 1 September. Left empty: 30 days ago.

## `trendUntil` (type: `string`):

The last day wanted, read the same way. The platform publishes a day or two late: a day it has no figure for yet has a null index. Left empty: 1 day ago.

## `playCounts` (type: `boolean`):

Search and account lists do not carry play counts. Tick this to also read each video's current plays. Each play count is one more charged result.

## Actor input object example

```json
{
  "searchQueries": [
    "露营"
  ],
  "sort": "relevance",
  "maxVideosPerQuery": 20,
  "maxVideosPerProfile": 20,
  "maxCommentsPerVideo": 100,
  "playCounts": false
}
```

# Actor output Schema

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

All rows of the run.

## `summary` (type: `string`):

Rows per input, events charged, inputs that returned nothing and why.

# 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 = {
    "searchQueries": [
        "露营"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataxapi/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 = { "searchQueries": ["露营"] }

# Run the Actor and wait for it to finish
run = client.actor("dataxapi/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 '{
  "searchQueries": [
    "露营"
  ]
}' |
apify call dataxapi/douyin-scraper --silent --output-dataset

```

## MCP server setup

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