# Douyin Scraper 2026 (`devcake/douyin-scraper`) Actor

Douyin video scraper and Douyin comment scraper for public posts, replies, creator data, hashtags, media links, and engagement metrics.

- **URL**: https://apify.com/devcake/douyin-scraper.md
- **Developed by:** [devcake](https://apify.com/devcake) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 douyin results

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

## Douyin Scraper for Videos, Comments & Creator Data

Collect public Douyin (抖音) videos, comments, replies, engagement metrics, and creator details as structured data. Search by keyword or start with public video links, then export the results for research, monitoring, reporting, or analysis.

### 🔎 What can you collect?

#### Douyin videos

- Captions, publication dates, and direct post links
- Creator names, profile details, and avatars
- Likes, comments, shares, saves, and other available engagement signals
- Hashtags, mentions, music, and content categories
- Video, cover, and slideshow links when available

#### Comments and replies

- Comment and reply text
- Authors, avatars, timestamps, and displayed regions
- Likes and reply counts
- Links back to the source content

#### Creator data

- Nickname, bio, profile identifiers, and avatar
- Public audience and content totals
- Verification and available region information
- Additional public profile details when available

### 🎯 Popular use cases

- 🔎 **Video and post search:** collect public Douyin content by keyword with captions, creators, hashtags, music, engagement, and media links.
- 💬 **Comment and reply export:** capture conversation threads with commenter details, timestamps, likes, reply counts, and available regions.
- 📈 **Trend and hashtag research:** compare recent or most-liked posts for supplied topics and track the hashtags returned with each result.
- 🤝 **Influencer and KOL discovery:** find niche creators through popular posts and optionally enrich their public profile details.
- 👂 **Brand monitoring:** search recent brand and product mentions, then add comments and replies for audience context.
- 🧭 **Competitor analysis:** compare public posts, creators, hashtags, media, and engagement across competitor keywords.
- 🧪 **Sentiment-analysis datasets:** collect comment and reply text for downstream sentiment or topic analysis.
- 📊 **Engagement datasets:** export likes, comments, shares, saves, publishing times, creator context, and other available post metrics.

### 📦 What does the output include?

Results can be downloaded as CSV, Excel, or JSON.

| Result type | Examples of included data |
| --- | --- |
| 🔎 Posts | Caption, date, post link, keyword, creator, engagement, hashtags, music, and media links |
| 👤 Creators | Name, bio, account identifiers, public totals, verification, avatar, and region |
| 💬 Comments | Text, author, time, likes, reply count, displayed region, and nested replies |

#### JSON output examples

The examples are shortened for readability. Available fields can vary between public posts and accounts.

##### Search post with creator data and comments

```json
{
  "recordType": "post",
  "id": "7655283400210664719",
  "source": "search",
  "keyword": "咖啡",
  "position": 3,
  "description": "咖啡的区别终于搞明白了！ #咖啡 #科普 #涨知识",
  "createTime": 1782384571,
  "createTimeIso": "2026-06-25T10:49:31+00:00",
  "url": "https://www.iesdouyin.com/share/video/7655283400210664719/",
  "profileEnrichmentStatus": "enriched",
  "authorProfile": {
    "uid": "64968301152",
    "sec_uid": "MS4wLjABAAAAPmtZB1l8kxB7aGDHYtL_XPJIPitif5LG9mDMXyu26i4",
    "nickname": "智识科普",
    "signature": "动画科普知识，科学变得有趣！",
    "ip_location": "IP属地：江西",
    "follower_count": 1111174,
    "following_count": 91,
    "total_favorited": 5388065,
    "aweme_count": 238,
    "verification_type": 0,
    "is_verified": false,
    "avatar": "https://p3-pc.douyinpic.com/example-avatar.jpeg",
    "personal_tags": [
      {
        "type": 2,
        "text": "IP：江西"
      }
    ]
  },
  "diggCount": 200478,
  "commentCount": 5579,
  "shareCount": 74629,
  "collectCount": 82418,
  "durationMs": 53801,
  "videoUrl": "https://v26-dymsearch.douyinvod.com/example-video/",
  "videoWidth": 1080,
  "videoHeight": 1920,
  "videoFormat": "mp4",
  "hashtags": [
    "咖啡",
    "科普",
    "涨知识"
  ],
  "musicTitle": "@智识科普创作的原声",
  "postType": "video",
  "allowComment": true,
  "allowShare": true,
  "commentsTotalAtScrape": 5579,
  "commentsScraped": 1,
  "commentsStatus": "limit_reached",
  "comments": [
    {
      "commentId": "7655660369926603557",
      "text": "有没有中式咖啡[微笑]",
      "createTimeIso": "2026-06-26T11:12:12+00:00",
      "diggCount": 4584,
      "replyCount": 700,
      "ipLabel": "广东",
      "isAuthor": false,
      "authorId": "69604339797",
      "authorNickname": "除了英俊其他没什么好说的",
      "repliesStatus": "limit_reached",
      "replies": [
        {
          "commentId": "7655670204734669626",
          "text": "豆浆",
          "createTimeIso": "2026-06-26T11:50:22+00:00",
          "diggCount": 2280,
          "ipLabel": "浙江",
          "isAuthor": false,
          "authorNickname": "胡一刀",
          "repliesStatus": "not_requested",
          "replies": []
        }
      ]
    }
  ],
  "scrapedAt": "2026-09-19T23:03:25.209254+00:00"
}
```

##### Search post with basic creator data

```json
{
  "recordType": "post",
  "id": "7680888431794244883",
  "source": "search",
  "keyword": "咖啡",
  "position": 1,
  "description": "滋滋冒油的快乐，配上一口畅爽的可口可乐",
  "url": "https://www.iesdouyin.com/share/video/7680888431794244883/",
  "profileEnrichmentStatus": "basic_author_data",
  "authorProfile": {
    "uid": "2872385366922622",
    "sec_uid": "MS4wLjABAAAABh00A6yCdJwEuqP5Dy-NU0H0mxAlSXPxeNr9pzf1o-2ODkWQw0I4NI2LFxJjMK2m",
    "nickname": "可口可乐",
    "unique_id": "71002003910",
    "signature": "",
    "verification_type": 0,
    "region": "CN"
  },
  "diggCount": 16630,
  "commentCount": 1126,
  "shareCount": 335,
  "collectCount": 4032,
  "durationMs": 15019,
  "postType": "video",
  "isAd": true,
  "isCommerce": true,
  "scrapedAt": "2026-09-19T23:03:29.898178+00:00"
}
```

### 🚀 How to get results

1. Add search terms, public Douyin video links, or both.
2. Choose the content and filters relevant to your research.
3. Start the Actor and export the resulting dataset.

### 🔗 Related Actors

Continue your social media research with our other Actors:

- 📺 **[Bilibili Videos & Comments Scraper](https://apify.com/devcake/bilibili-scraper):** Search public Bilibili videos or collect comments and replies from video links.
- 🎵 **[TikTok Video & Comments Scraper](https://apify.com/devcake/tiktok-search-video-comments):** Find TikTok videos by keyword and collect public engagement and comment data.
- 📕 **[RedNote (Xiaohongshu) Scraper](https://apify.com/devcake/rednote-scraper):** Search public RedNote posts and collect comments and replies from post links.
- 👤 **[TikTok Creator Search](https://apify.com/devcake/tiktok-creator-apify):** Discover public TikTok creators by name, niche, topic, keyword, or brand.

### ⚠️ Good to know

- Only publicly available Douyin content can be collected.
- Private, deleted, restricted, or login-only content may be unavailable.
- The number of available results depends on the search, selected filters, and current public availability.
- Some public posts or accounts may not expose every field shown in the examples.
- Direct media links may expire and should be saved promptly when needed.
- Use the data responsibly and follow applicable laws and platform rules.

### ❓ Frequently asked questions

#### Is Douyin the same as TikTok?

No. Douyin is ByteDance’s short-video platform for mainland China and is separate from TikTok. Its creators, content, trends, links, and search results are distinct.

#### Do I need a Douyin account?

No. The Actor works with supported public Douyin content without requiring you to provide a Douyin login.

#### Can I use Chinese and English keywords?

Yes. You can search with Chinese, English, mixed-language terms, brand names, product names, or hashtags.

#### Can I collect comments from videos found in search?

Yes. Comments and replies can be included with matching public videos when available.

#### Why can some results contain fewer fields?

Public availability differs between posts, creators, and accounts. Restricted or unavailable fields are not guaranteed to appear in every result.

# Actor input Schema

## `keywords` (type: `array`):

Enter up to 50 Douyin search terms. A sample query (咖啡) is included by default; replace it with your query, or remove it for Profile Scraper or Comments Scraper-only runs. Duplicate and blank values are removed automatically.

## `maxPostsPerKeyword` (type: `integer`):

Set the maximum number of unique posts saved for each keyword. The default is 30 posts; larger runs automatically receive a larger bounded page budget.

## `sortBy` (type: `string`):

Choose Douyin's keyword-search result ordering.

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

Only save keyword-search posts published in the selected time window.

## `duration` (type: `string`):

Only save keyword-search videos in the selected duration range. Douyin's H5 endpoint does not enforce this filter, so the Actor applies it locally and may request extra pages to fill the result limit.

## `enrichProfiles` (type: `boolean`):

Enable this to make one extra request per unique search author and add the full normalized profile (45 fields: follower/video counts, bio, verification, avatar sizes, coverage, permissions, tags, live state) inline under authorProfile. Authors are deduplicated across the whole run and cached, so each is fetched once. When disabled, rows keep only the basic author data returned by the search card.

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

Paste up to 100 public Douyin video, note, share, or v.douyin.com short URLs. The Actor extracts the video ID and collects its comments without running a keyword search. Provide URLs, search keywords, or both.

## `maxCommentsPerUrl` (type: `integer`):

Set how many unique public comments to collect from each URL above. Larger limits are paginated with up to 50 comments per request.

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

Set how many comments to add to each video found through keyword search. Use 0 to keep search-only runs fast. Videos reporting zero comments are skipped automatically.

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

Set how many replies to collect under each saved comment from URLs and search results. Leave at 0 for the fastest and lowest-traffic run.

## Actor input object example

```json
{
  "keywords": [
    "咖啡"
  ],
  "maxPostsPerKeyword": 30,
  "sortBy": "general",
  "publishTime": "unlimited",
  "duration": "unlimited",
  "enrichProfiles": false,
  "videoUrls": [],
  "maxCommentsPerUrl": 100,
  "maxCommentsPerVideo": 0,
  "maxRepliesPerComment": 0
}
```

# Actor output Schema

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

All collected search posts and direct comment-thread results in the default dataset.

## `runSummary` (type: `string`):

Run status, request count, duration, totals, per-keyword statistics, and direct-URL outcomes.

# 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 = {
    "keywords": [
        "咖啡"
    ]
};

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

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

```

## MCP server setup

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