# Douyin Search Scraper - Video & User Insights (`cloudcharlestom/douyin-search-scraper`) Actor

Extract Douyin video and user data by keyword. Get video URL, likes, comments, shares, favorites, and music info. Ideal for market analysis, influencer discovery, content research, and trend tracking.

- **URL**: https://apify.com/cloudcharlestom/douyin-search-scraper.md
- **Developed by:** [CloudCharles](https://apify.com/cloudcharlestom) (community)
- **Categories:** Automation, News, Social media
- **Stats:** 160 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

### 一、What's this? 这是什么？

This is a tool for scraping data from Douyin. It enables you to conveniently obtain data from Douyin and can be used for your data analysis, business reports, information tracking, and integration into your applications. It can help you obtain the following data:

- Video information, such as video ID, title, cover url, download url, duration, creation time, digg count, comment count, collect count, share count, etc.
- User information about the video, such as user ID, nickname, user avatar, signature, etc.
- Music information about the video, such as music ID, title, author, album name, cover url, url, duration, etc.
- Sharing information about the video, such as sharing title, sharing description, sharing url, etc.
- HashTag information about the video, such as hashtag ID, hashtag name, etc.

这是一款抖音爬取工具，它可以为您方便的获取抖音上的数据，可用于您的数据分析、业务报告、信息追踪以及集成到您的应用程序，它可以帮助您获得如下数据：

- 视频信息，如视频ID、标题、封面URL、URL、时长、创建时间、播放量、评论量、点赞量、分享量等。
- 关于视频的用户信息，如用户ID、昵称、用户头像、签名等。
- 关于视频的音乐信息，如音乐ID、标题、作者、专辑名、封面URL、URL、时长等。
- 关于视频的分享信息，如分享标题、分享描述、分享URL等。
- 关于视频的标签信息，如标签ID、标签名等。

### 二、How to use? 如何使用？

- \[Register for a free Apify account.] (https://console.apify.com/sign-up)
- [Open Douyin Search Scraper](https://apify.com/cloudcharlestom/douyin-search-scraper)
- Enter the video keyword you want to search for, e.g. Today's Hot Topics.
- Click Start and wait for the data scraping to complete.
- Download your data in JSON， XML， CSV， Excel or HTML format.

中文：

- [免费注册一个Apify账户。](https://console.apify.com/sign-up)
- [打开 Douyin Search Scraper](https://apify.com/cloudcharlestom/douyin-search-scraper)
- 输入想要搜索的视频关键词，keyword，例如：今日热门。
- 点击开始并等待数据的爬取完成。
- 以 JSON、XML、CSV、Excel 或 HTML 格式下载您的数据。

### 三、Input & Output Struct 输入与输出

#### 1、Input 输入

- keyword: Video keyword, for example: Today's Hot Topics.
- count: The number of videos to be crawled, for example: 10.
- timeout: The maximum timeout period, in milliseconds, for example: 30000. If sufficient data cannot be retrieved within this time, it will return a timeout.

中文：

- keyword: 视频关键词，例如：今日热门。
- count: 要爬取的视频数量，例如：10。
- timeout: 最大的超时时间，毫秒，例如：30000，如果超过这个时间还不能抓取到足够的数据，则超时返回。

#### 2、Output Struct 输出的结构

```json
[
  {
    "id": "",
    "cover": "",
    "url": "",
    "desc": "",
    "author": {
      "id": "",
      "short_id": "",
      "nickname": "",
      "signature": "",
      "avatar_larger": "",
      "avatar_thumb": "",
      "avatar_medium": "",
      "aweme_count": 0,
      "following_count": 0,
      "follower_count": 0,
      "favoriting_count": 0,
      "total_favorited": 0
    },
    "music": {
      "id": "",
      "title": "",
      "author": "",
      "album": "",
      "cover_hd": "",
      "cover_large": "",
      "cover_medium": "",
      "cover_thumb": "",
      "play_url": "",
      "source_platform": 0,
      "duration": 0,
      "owner_id": ""
    },
    "video": {
      "format": "",
      "height": 3840,
      "width": 2160,
      "cover": "",
      "dynamic_cover": "",
      "origin_cover": "",
      "video_url": "",
      "download_url": "",
      "ratio": "720p",
      "duration": 31067,
      "cdn_url_expired": 0
    },
    "text_extra": [
      {
        "start": 0,
        "end": 0,
        "type": 1,
        "hashtag_name": "",
        "hashtag_id": "",
        "is_commerce": false,
        "caption_start": 0,
        "caption_end": 0
      },
      {
        "start": 0,
        "end": 0,
        "type": 1,
        "hashtag_name": "",
        "hashtag_id": "",
        "is_commerce": false,
        "caption_start": 0,
        "caption_end": 0
      },
      {
        "start": 0,
        "end": 0,
        "type": 1,
        "hashtag_name": "",
        "hashtag_id": "",
        "is_commerce": false,
        "caption_start": 0,
        "caption_end": 0
      }
    ],
    "statistics": {
      "aweme_id": "",
      "comment_count": 1,
      "digg_count": 44,
      "download_count": 2,
      "play_count": 0,
      "share_count": 50,
      "forward_count": 0,
      "lose_count": 0,
      "lose_comment_count": 0,
      "whatsapp_share_count": 0,
      "digest": "",
      "exposure_count": 0,
      "live_watch_count": 0,
      "collect_count": 9,
      "recommend_count": 3
    },
    "share_info": {
      "share_url": "",
      "share_weibo_desc": "",
      "share_desc": "",
      "share_title": "",
      "bool_persist": 0,
      "share_title_myself": "",
      "share_title_other": "",
      "share_link_desc": "",
      "share_signature_url": "",
      "share_signature_desc": "",
      "share_quote": "",
      "share_desc_info": ""
    },
    "create_time": 1701091143
  }
]
```

### 四、How to use the crawled data? 如何使用爬取到的数据？

- Monitor the current hotspots in the real-time monitoring industry and predict the trends of content (such as beauty, games, education).
- Analyze user behavior data, such as video views, likes, comments, etc., to understand user preferences.
- Integrate data for social media analysis, such as user interactions, content dissemination, etc.
- Based on the obtained data, you can think of more scenarios.

中文：

- 实时监控行业热点，预测内容趋势（如美妆、游戏、教育）。
- 分析用户行为数据，如视频观看量、点赞数、评论数等，了解用户偏好。
- 整合数据进行社交媒体分析，如用户互动、内容传播等。
- 基于获取到的数据，您能想到的更多场景。

### 五、Application integration and expansion 应用程序集成与扩展

This is due to the integration capabilities provided by the Apify platform. You can integrate the obtained data with other applications, including the following:
这得益于Apify平台提供的集成能力，您可以将获取到的数据与其他应用程序进行集成，包括如下：

- [Instagram](https://docs.apify.com/platform/integrations/make/instagram)
- [TikTok](https://docs.apify.com/platform/integrations/make/tiktok)
- [Facebook](https://docs.apify.com/platform/integrations/make/facebook)
- [Telegram](https://docs.apify.com/platform/integrations/telegram)
- [Slack](https://docs.apify.com/platform/integrations/slack)
- [and more](https://docs.apify.com/platform/integrations)

### 六、Feedback 问题反馈

We will always iterate its functions, including launching new features and fixing known bugs. If you encounter any problems during use, please create an issue in the Issues section in a timely manner, and we will follow up and solve it promptly.

我们始终会迭代它的功能，包括推出新功能和修复已知的Bug，如果您在使用过程中遇到了任何问题，请及时在Issues中创建问题，我们将及时跟进解决。

### 七、Q\&A 常见问题

#### 1、Is data crawling legal? 爬取数据是否合法？

Our Actor adheres to ethical standards and does not extract any private user data, such as email addresses, gender or location. It will only extract the publicly available data on the platform and will not extract non-public private data. However, you should be aware that your results may contain publicly available user data. Personal data is protected by the General Data Protection Regulation (GDPR) of the European Union and other laws and regulations around the world. Please do not use the data for illegal purposes. If you are unsure whether the usage scenario is legal, please consult your lawyer.

我们的Actor符合道德规范，不会提取任何私人用户数据，例如电子邮件地址、性别或位置。它只会提取平台公开的数据，不会提取非公开的隐私数据。但是，您应该注意，您的结果可能包含公开的用户数据。个人数据受欧盟《通用数据保护条例》（GDPR）以及世界各地其他法律法规的保护。请勿将数据用于非法用途，如果您不确定使用的场景是否合法，请咨询您的律师。

# Actor input Schema

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

The keywords of the search

## `count` (type: `integer`):

Number of data entries

## `timeout` (type: `integer`):

Maximum timeout time, unit: milliseconds

## Actor input object example

```json
{
  "count": 10,
  "timeout": 30000
}
```

# 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("cloudcharlestom/douyin-search-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 = {}

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

```

## MCP server setup

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