# Douyin（抖音） Data API - Chinese TikTok Data API (`nourishing_fort/douyin-data-api`) Actor

Complete Douyin (抖音) data API for KOL analysis, brand monitoring, social listening, and trend research. Returns clean JSON with video details, comments, user profiles, danmaku, and more. Free tier - 100 events/month.

- **URL**: https://apify.com/nourishing\_fort/douyin-data-api.md
- **Developed by:** [quan qing](https://apify.com/nourishing_fort) (community)
- **Categories:** Social media, Lead generation, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Douyin Data API — Chinese TikTok Data

> **9 verified Douyin (抖音) data actions for KOL analysis, brand monitoring, social listening, and trend research.**
>
> Clean JSON. No login. No setup. Just run.

---

### 🎯 What You Get

A complete Douyin (Chinese TikTok) data layer in one Actor:

- ✅ **Video search & metadata** — keyword search, full video details, real-time stats
- ✅ **Comments & danmaku** — regular comments and live bullet comments (弹幕)
- ✅ **User analytics** — profiles, video lists, user search
- ✅ **Comprehensive search** — mixed content search (login-aware)
- ✅ **Clean JSON output** — consistent schema across all endpoints
- ✅ **Pagination built-in** — request up to 1,000 items per run with auto-cursor handling

---

### 🚀 Quick Start

No setup, no API keys, no configuration. Just run.

#### Web Console
1. Open this Actor page on Apify Store
2. Click **Try actor** → fill in the parameters (e.g. `action`, `keyword`, `max_items`)
3. Click **Start** → results appear in **Dataset** tab

#### Python (API)
```python
from apify_client import ApifyClient

client = ApifyClient(token="YOUR_APIFY_TOKEN")
run = client.actor("nourishing_fort/douyin-data-api").call(run_input={
    "action": "search_video",
    "keyword": "World Cup",
    "max_items": 50,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
````

#### MCP / AI Agent

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=nourishing_fort/douyin-data-api"
    }
  }
}
```

***

### ✅ Available Actions (9)

| # | Action | Description | Returns |
|---|---|---|---|
| 1 | `search_video` | Search videos by keyword | Up to 1,000 videos |
| 2 | `video_detail` | Get full video metadata | 1 video |
| 3 | `video_comments` | Get comments for a video | Up to 1,000 comments |
| 4 | `user_profile` | Get user profile (by `sec_user_id` or `uid`) | 1 user |
| 5 | `user_videos` | Get all videos from a user | Up to 1,000 videos |
| 6 | `user_search` | Search users by keyword | Up to 1,000 users |
| 7 | `danmaku` | Live bullet comments (弹幕) | Up to 1,000 danmaku |
| 8 | `video_real_statistics` | Real-time play count (App-side) | 1 video stats |
| 9 | `general_search_v3` | Comprehensive search (login-aware) | Up to 1,000 mixed results |

***

### 📥 Input Examples

```json
// 1. Search videos
{ "action": "search_video", "keyword": "World Cup", "max_items": 100 }

// 2. Video detail
{ "action": "video_detail", "aweme_id": "7661486561430752563" }

// 3. Video comments
{ "action": "video_comments", "aweme_id": "7661486561430752563", "max_items": 30 }

// 4. User profile
{ "action": "user_profile", "sec_user_id": "MS4wLjABAAAA..." }

// 5. User videos
{ "action": "user_videos", "sec_user_id": "MS4wLjABAAAA...", "max_items": 100 }

// 6. User search
{ "action": "user_search", "keyword": "体育" }

// 7. Danmaku
{ "action": "danmaku", "aweme_id": "7465287615521066266" }

// 8. Real video statistics
{ "action": "video_real_statistics", "aweme_id": "7661486561430752563" }

// 9. General search V3
{ "action": "general_search_v3", "keyword": "世界杯" }
```

***

### 📤 Output Format

Clean JSON with consistent field names across all actions.

#### Video item

```json
{
  "video_id": "7661486561430752563",
  "title": "...",
  "published_at": "2024-12-30T15:30:00Z",
  "duration_ms": 32000,
  "author": { "user_id": "...", "display_name": "...", "verified": false },
  "metrics": { "likes": 12345, "comments": 678, "shares": 90, "favorites": 234, "plays": 500000 },
  "media": { "cover": "https://...", "play_urls": ["https://..."] },
  "hashtags": ["话题1", "话题2"]
}
```

#### Comment item

```json
{
  "comment_id": "...",
  "text": "...",
  "published_at": "2024-12-30T15:30:00Z",
  "likes": 42,
  "author": { "user_id": "...", "display_name": "..." }
}
```

#### User item

```json
{
  "user_id": "...",
  "sec_user_id": "MS4wLjABAAAA...",
  "display_name": "...",
  "verified": false,
  "signature": "...",
  "metrics": { "followers": 100000, "following": 200, "likes": 5000000, "videos": 350 }
}
```

***

### 💰 Pricing

This Actor is **pay-per-event** on Apify Store. You pay only for successful results returned.

- 100 free events per month to try
- After that, prices start from **$4.99 / 1,000 results**
- Apify platform fee of 20% is deducted automatically
- No subscription, no commitment — pay as you go

See the **Pricing** tab on this Actor page for full per-event pricing.

***

### 📋 Changelog

**v1.0.0** (2026-07-13)

- Initial public release with 9 verified actions
- Pagination support up to 1,000 items per run
- MCP server integration for AI agents

***

### 🤝 Support

For bulk pricing or custom integrations:

- Open an issue on this Actor's page
- Apify Discord community

# Actor input Schema

## `action` (type: `string`):

Which data to retrieve. 1=search videos, 2=video detail, 3=comments, 4=user profile, 5=user videos, 6=search users, 7=danmaku, 8=real stats, 9=general search. Each action = 1 event charged.

## `keyword` (type: `string`):

Required for: search\_video, user\_search, general\_search\_v3. Leave empty to skip.

## `aweme_id` (type: `string`):

Required for: video\_detail, video\_comments, danmaku, video\_real\_statistics. Format: 19-digit number. Leave empty to skip.

## `sec_user_id` (type: `string`):

Required for: user\_profile, user\_videos. Starts with MS4wLjABAAAA... Leave empty to skip.

## `uid` (type: `string`):

Alternative to sec\_user\_id for: user\_profile. Leave empty to skip.

## `cursor` (type: `integer`):

Use returned cursor for next page (0 for first)

## `max_items` (type: `integer`):

Maximum number of items to return (1-1000, default 100)

## Actor input object example

```json
{
  "action": "search_video",
  "cursor": 0,
  "max_items": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nourishing_fort/douyin-data-api").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("nourishing_fort/douyin-data-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call nourishing_fort/douyin-data-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nourishing_fort/douyin-data-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Douyin（抖音） Data API - Chinese TikTok Data API",
        "description": "Complete Douyin (抖音) data API for KOL analysis, brand monitoring, social listening, and trend research. Returns clean JSON with video details, comments, user profiles, danmaku, and more. Free tier - 100 events/month.",
        "version": "1.0",
        "x-build-id": "gmcCj9ESBVVHguNz6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nourishing_fort~douyin-data-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nourishing_fort-douyin-data-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nourishing_fort~douyin-data-api/runs": {
            "post": {
                "operationId": "runs-sync-nourishing_fort-douyin-data-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nourishing_fort~douyin-data-api/run-sync": {
            "post": {
                "operationId": "run-sync-nourishing_fort-douyin-data-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "action"
                ],
                "properties": {
                    "action": {
                        "title": "Action",
                        "enum": [
                            "search_video",
                            "video_detail",
                            "video_comments",
                            "user_profile",
                            "user_videos",
                            "user_search",
                            "danmaku",
                            "video_real_statistics",
                            "general_search_v3"
                        ],
                        "type": "string",
                        "description": "Which data to retrieve. 1=search videos, 2=video detail, 3=comments, 4=user profile, 5=user videos, 6=search users, 7=danmaku, 8=real stats, 9=general search. Each action = 1 event charged.",
                        "default": "search_video"
                    },
                    "keyword": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Required for: search_video, user_search, general_search_v3. Leave empty to skip."
                    },
                    "aweme_id": {
                        "title": "Video ID",
                        "type": "string",
                        "description": "Required for: video_detail, video_comments, danmaku, video_real_statistics. Format: 19-digit number. Leave empty to skip."
                    },
                    "sec_user_id": {
                        "title": "User SecID",
                        "type": "string",
                        "description": "Required for: user_profile, user_videos. Starts with MS4wLjABAAAA... Leave empty to skip."
                    },
                    "uid": {
                        "title": "User UID",
                        "type": "string",
                        "description": "Alternative to sec_user_id for: user_profile. Leave empty to skip."
                    },
                    "cursor": {
                        "title": "Pagination cursor / offset",
                        "type": "integer",
                        "description": "Use returned cursor for next page (0 for first)",
                        "default": 0
                    },
                    "max_items": {
                        "title": "Max items per run",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of items to return (1-1000, default 100)",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
