# Douyin Hot Search Scraper (`toolzerhub/douyin-hot-search-scraper`) Actor

Collect Douyin's in-app hot-search board with heat value, rank position, and related video count, the music chart of hot, rising, or original sounds, and the ranked brand board by category. Every row carries the term, score, and rank. Built for daily Douyin trend monitoring.

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

## Pricing

from $3.20 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Hot Search Scraper

Collect Douyin's in-app hot-search board, the music chart of hot, rising, or original sounds, and the ranked brand board by category. Every hot-search row carries the term, heat value, and rank; every mode is a live in-app read, not the separate hot.douyin.com dashboard. Pick a mode with `scraperType`.

### Modes

| `scraperType` | Returns | Needs |
|---|---|---|
| `hotSearch` (default) | Trending search terms with heat value, rank, and related video count | — |
| `musicChart` | Douyin's music chart, paginated | — |
| `brandBoard` | Ranked brands in one category | `category_id`, or leave empty for the first category |
| `brandCategories` | The categories the brand board is filed under | — |

### Input

| Field | Use it for |
|---|---|
| **`board_type`** | `hotSearch` only: `0` Main hot-search board (default), `2` Sub-board. |
| **`board_sub_type`** | `hotSearch` only, used together with `board_type` `2` to pick which sub-board. |
| **`chart_type`** | `musicChart` only: `hot` (default), `rise`, or `original`. Anything else is rejected. |
| **`category_id`** | `brandBoard` only. From `brandCategories`. Left empty, the Actor fetches the category list itself and uses the first one. |
| **`maxItems`** | Caps `hotSearch`, `musicChart`, and `brandBoard`. Default `100`. Set `0` for no limit. |

```json
{
  "scraperType": "hotSearch",
  "board_type": "2"
}
```

### How many terms the board returns

`hotSearch` returns the full board — around 50 terms on either `board_type`, ranked by heat. Douyin also publishes a much shorter rising strip of about 5 terms alongside it; the Actor only falls back to that strip on the rare response where the main board comes back empty, so a run that returns a handful of rows means Douyin served no board at that moment, not that a setting is wrong.

### Output

| Field | Mode | Contents |
|---|---|---|
| **`word`**, **`hot_value`**, **`position`**, **`event_time`**, **`video_count`**, **`group_id`**, **`room_count`**, **`view_count`**, **`source_board_type`** | `hotSearch` | Each trending term |
| **`music_info`**, **`source_chart_type`** | `musicChart` | Each charted sound |
| **`id`**, **`name`**, **`heat`**, **`rank`**, **`is_in_webcasting`**, **`bluev_uid`**, **`bluev_sec_uid`**, **`logo_url`**, **`source_category_id`** | `brandBoard` | Each ranked brand |
| **`id`**, **`name`** | `brandCategories` | Each brand category |

```json
{
  "word": "秋天的第一杯奶茶",
  "hot_value": 8452130,
  "position": 3,
  "video_count": 61204,
  "source_board_type": "2"
}
```

### Questions

**Why did `hotSearch` only return a handful of rows?**
Because `board_type` was left at its default. See the note above — `0` returns the small rising strip, `2` returns the full board.

**Why does `brandBoard` work without setting `category_id`?**
When `category_id` is empty, the Actor makes one extra request to list the brand categories and defaults to the first one it gets back, rather than failing the run. Run `brandCategories` first if you want a specific category instead of whichever one is first.

**Can I filter the music chart to a specific artist or title?**
No. `chart_type` only switches between the hot, rising, and original lists; there's no keyword filter on this endpoint. Filter the returned rows yourself after the run.

### Related Actors

| Actor | Purpose |
|---|---|
| [Douyin Sound Scraper](https://apify.com/toolzerhub/douyin-sound-scraper) | Found a sound on the music chart? Get its full detail and every video using it |
| [Douyin Trending Scraper](https://apify.com/toolzerhub/douyin-billboard-scraper) | The broader hot.douyin.com dashboard — trending topics, videos, and searches with weekly and monthly windows |
| [Douyin Marketing Calendar Scraper](https://apify.com/toolzerhub/douyin-marketing-calendar-scraper) | Plan content around what's trending, against Douyin's own campaign calendar |

# Actor input Schema

## `scraperType` (type: `string`):

Choose the dataset for this run.

## `board_type` (type: `string`):

Which hot-search board to read.

## `board_sub_type` (type: `string`):

Sub-board to read, only used when the sub-board option is chosen.

## `maxItems` (type: `integer`):

Maximum rows to save. Set 0 to keep collecting until the source is exhausted.

## `chart_type` (type: `string`):

Which music chart to read.

## `category_id` (type: `string`):

A brand-board category ID, as returned by the categories endpoint.

## Actor input object example

```json
{
  "scraperType": "hotSearch",
  "board_type": "0",
  "maxItems": 20,
  "chart_type": "hot"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

# 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 = {
    "board_sub_type": "",
    "maxItems": 20,
    "category_id": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/douyin-hot-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 = {
    "board_sub_type": "",
    "maxItems": 20,
    "category_id": "",
}

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

```

## MCP server setup

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