# Douyin Trending Scraper (`toolzerhub/douyin-billboard-scraper`) Actor

Collect Douyin's official hot.douyin.com trend boards: overall, rising, and city hot topics, hot videos, hashtags, search terms, and content words, plus rankings for small-account hits and high like, follow, and completion-rate videos. This data normally needs a Douyin login to see.

- **URL**: https://apify.com/toolzerhub/douyin-billboard-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 $6.00 / 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/actors/running/actors-in-store.md#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 Trending Scraper

Collect Douyin's official hot.douyin.com trend boards — overall, rising, and city hot topics, hot videos, hashtags, search terms, and content words, plus rankings for small-account hits and high like, follow, and completion-rate videos. This data normally needs a Douyin login to view. Pick a board with `scraperType`; 18 modes are available, grouped below.

### The default `hotBoard` run avoids a frozen dashboard

`billboard/hot` only returns current rows when `snapshot_time` lands exactly on a five-minute mark ending in 5 — `:05`, `:15`, `:25`, and so on, in UTC. Leave `snapshot_time` blank and, instead of erroring, the source quietly serves a **frozen snapshot from January 2025**. Pick any other mark yourself — the current minute rounded down, midnight, "now" naively rounded — and it comes back with zero rows instead. Leave `snapshot_time` empty and this Actor computes the nearest valid five-minute mark itself, so a default `hotBoard` run returns today's board, not a stale one from over a year ago and not an empty one.

### Modes

**Hot-topic boards** — share the same sentence/topic shape:

| `scraperType` | Returns | Key input |
|---|---|---|
| `hotBoard` (default) | Overall hot-topic board | `range_type`, `snapshot_time` or `start_date`/`end_date`, `tag`, `keyword` |
| `risingBoard` | Topics rising fastest | `order`, `city_code`, `tag`, `keyword` |
| `cityBoard` | Hot topics by city | `order`, `city_code`, `tag`, `keyword` |
| `challengeBoard` | Hot hashtag challenges | `keyword` |

**Video-performance boards** — share the same item shape, an alias of `aweme_id` onto `item_id`:

| `scraperType` | Returns | Key input |
|---|---|---|
| `videoBoard` | Top-performing videos over a lookback window | `date_window`, `sub_type`, `keyword` |
| `lowFollowerHits` | Videos that broke out from small accounts | `date_window`, `keyword` |
| `highLikeRate` | Videos with the highest like rate | `date_window`, `keyword` |
| `highFollowRate` | Videos with the highest follow-conversion rate | `date_window`, `keyword` |
| `highCompletionRate` | Videos with the highest completion rate | `date_window`, `keyword` |

**Topic and search-term performance:**

| `scraperType` | Returns | Key input |
|---|---|---|
| `topicBoard` | Hashtag challenges by play/publish performance | `date_window`, `keyword` |
| `risingTopics` | Hashtag challenges rising fastest | `date_window`, `keyword` |
| `searchBoard` | Ranked in-search terms | `date_window`, `keyword` |
| `risingSearches` | In-search terms rising fastest | `date_window`, `keyword` |

**Content words:**

| `scraperType` | Returns | Key input |
|---|---|---|
| `contentWords` | Frequently-searched content words | `date_window`, `keyword` |
| `contentWordDetail` | Daily/weekly/monthly breakdown for one content word | `keyword`, `word_id`, `query_day` (all required together) |

**Reference lists** — fill the filters the boards above take:

| `scraperType` | Returns |
|---|---|
| `categories` | Category tags to pass as `tag` |
| `cityCodes` | City codes to pass as `city_code` |
| `contentTags` | Content-tag values, with child tags nested |

### Input

| Field | Use it for |
|---|---|
| **`range_type`** | `hotBoard` only: `snapshot` (default, reads one moment) or `range` (aggregates `start_date`–`end_date` instead). |
| **`snapshot_time`** | `hotBoard` only, `snapshot` mode. As `yyyyMMddHHmmss`. Leave empty — see the note above. |
| **`start_date`**, **`end_date`** | `hotBoard` in `range` mode, as `yyyyMMdd`. |
| **`order`** | `risingBoard`, `cityBoard`: `rank` (default) or `trending`. |
| **`city_code`** | `risingBoard`, `cityBoard`. From `cityCodes`. |
| **`tag`** | `hotBoard`, `risingBoard`, `cityBoard`. Comma-separated category tags, from `categories`. |
| **`keyword`** | Narrows almost every board to one search term. |
| **`date_window`** | Video, topic, search, and content-word boards. Hours, not days: `1` past hour, `24` past day (default), `168` past week, `720` past month. |
| **`sub_type`** | `videoBoard` only. Which board section to read. Default `1001`. |
| **`billboard_type`** | `categories` only: `total`, `city`, or `rise`. Douyin rejects `hot` here. |
| **`word_id`**, **`query_day`** | `contentWordDetail`, alongside `keyword`. From a `contentWords` row's `id` and `query_day`. |
| **`addonVideoDetails`** | Video-performance boards. Fetches full video detail per row — one extra request and one extra charge per row. |
| **`maxItems`** | Caps every paginated board. Default `100`. Set `0` for no limit. |

```json
{
  "scraperType": "videoBoard",
  "date_window": "168"
}
```

### Output

| Field | Modes | Contents |
|---|---|---|
| **`rank`**, **`rank_diff`**, **`sentence`**, **`sentence_id`**, **`hot_score`**, **`video_count`**, **`sentence_tag_name`**, **`city_name`**, **`create_at`**, **`trends`**, **`label_name`** | Hot-topic boards | Rank, topic sentence, and heat score |
| **`item_id`**, **`item_title`**, **`item_cover_url`**, **`item_duration`**, **`item_url`**, **`nick_name`**, **`avatar_url`**, **`fans_cnt`**, **`play_cnt`**, **`like_cnt`**, **`score`**, **`aweme_id`**, **`video_detail`** | Video-performance boards | Each video, with `aweme_id` aliased for downstream enrichment |
| **`challenge_id`**, **`challenge_name`**, **`play_cnt`**, **`publish_cnt`**, **`cover_url`**, **`score`**, **`avg_play_cnt`**, **`create_time`**, **`trends`** | `topicBoard`, `risingTopics` | Each hashtag challenge |
| **`key_word`**, **`search_score`**, **`trends`** | `searchBoard`, `risingSearches` | Each ranked search term |
| **`id`**, **`title`**, **`score`**, **`rising_ratio`**, **`rising_speed`**, **`query_day`** | `contentWords` | Each content word |
| **`word_windows`**, **`source_keyword`**, **`source_word_id`** | `contentWordDetail` | The word's daily/weekly/monthly breakdown |
| **`label`**, **`value`**, **`num`** | `categories` | Each category tag |
| **`label`**, **`value`** | `cityCodes` | Each city code |
| **`label`**, **`value`**, **`count`**, **`children`** | `contentTags` | Each content tag, with children nested |

```json
{
  "rank": 1,
  "sentence": "秋分",
  "hot_score": 9481203,
  "sentence_tag_name": "节气"
}
```

### Questions

**I set `snapshot_time` myself and got zero rows — why?**
It has to land exactly on a five-minute mark ending in 5, in UTC. Any other value — including the current minute rounded down — returns an empty board rather than the nearest valid one. Leave `snapshot_time` empty and let the Actor compute a valid mark, or compute one to that exact rule yourself.

**Why do `categories`, `cityCodes`, and `contentTags` exist as separate modes?**
They're not trend data — they're the reference lists that fill `tag`, `city_code`, and content-tag filters on the boards above. Run one of these first if you need a valid value for those fields rather than guessing.

**What does `contentWordDetail` need all three fields for?**
`keyword`, `word_id`, and `query_day` together, or the run fails outright. `word_id` and `query_day` come from a row already returned by `contentWords` — this mode drills into one of those rows, it doesn't discover words on its own.

**Why does `videoBoard` take a `sub_type` but the other video-performance boards don't?**
Only `videoBoard` reads Douyin's board-section split; `lowFollowerHits`, `highLikeRate`, `highFollowRate`, and `highCompletionRate` are each already a single fixed ranking, so there's no section to choose on them.

### Related Actors

| Actor | Purpose |
|---|---|
| [Douyin Hot Search Scraper](https://apify.com/toolzerhub/douyin-hot-search-scraper) | The in-app hot-search board and music/brand charts, rather than the hot.douyin.com dashboard |
| [Douyin Account Analytics Scraper](https://apify.com/toolzerhub/douyin-account-analytics-scraper) | The hot-account board and per-account analytics, split out from this Actor's video and topic boards |
| [Douyin Video Analytics Scraper](https://apify.com/toolzerhub/douyin-video-analytics-scraper) | Comment word cloud and audience demographics for one video these boards surface |
| [Douyin Marketing Calendar Scraper](https://apify.com/toolzerhub/douyin-marketing-calendar-scraper) | Plan content around Douyin's own campaign calendar rather than reactive trend boards |

### Support

Questions, bugs, or feature requests: **contact@toolzerhub.com**

Browse the rest: [apify.com/toolzerhub](https://apify.com/toolzerhub)

# Actor input Schema

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

Choose the dataset for this run.

## `range_type` (type: `string`):

Read the board at one moment, or aggregated over a date range.

## `snapshot_time` (type: `string`):

The exact moment to read the board at, as YYYYMMDDHHMMSS, e.g. 20260815120000. Leave empty for the latest reading.

## `start_date` (type: `string`):

First day of the range to read, as YYYYMMDD, e.g. 20260801.

## `end_date` (type: `string`):

Last day of the range to read, as YYYYMMDD, e.g. 20260815.

## `tag` (type: `string`):

One or more hot-topic categories to read, separated by commas — copy them from a Categories reference run's output.

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

Words or phrase to search for. Chinese terms return the most results.

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

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

## `order` (type: `string`):

Ranking order for the board.

## `city_code` (type: `string`):

Copy this from a City Codes reference run's output — Douyin doesn't publish these codes anywhere else.

## `date_window` (type: `string`):

How far back the board is measured.

## `sub_type` (type: `string`):

Which section of the video board to read. The default (1001) is the right value for almost every run.

## `addonVideoDetails` (type: `boolean`):

Fetch full video detail for every video found. This makes one extra request per video and adds a charge per enriched row.

## `word_id` (type: `string`):

A hot-content-word id, copied from a Content Words board run's output. Only needed for that board's own detail lookup.

## `query_day` (type: `string`):

The single day to read, as YYYYMMDD, e.g. 20260815.

## `billboard_type` (type: `string`):

Which board the categories belong to.

## Actor input object example

```json
{
  "scraperType": "hotBoard",
  "range_type": "snapshot",
  "keyword": "猫咪",
  "maxItems": 20,
  "order": "rank",
  "date_window": "24",
  "sub_type": "1001",
  "addonVideoDetails": false,
  "billboard_type": "total"
}
```

# 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 = {
    "snapshot_time": "",
    "start_date": "",
    "end_date": "",
    "tag": "",
    "keyword": "猫咪",
    "maxItems": 20,
    "city_code": "",
    "sub_type": "1001",
    "word_id": "",
    "query_day": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/douyin-billboard-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 = {
    "snapshot_time": "",
    "start_date": "",
    "end_date": "",
    "tag": "",
    "keyword": "猫咪",
    "maxItems": 20,
    "city_code": "",
    "sub_type": "1001",
    "word_id": "",
    "query_day": "",
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/douyin-billboard-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 '{
  "snapshot_time": "",
  "start_date": "",
  "end_date": "",
  "tag": "",
  "keyword": "猫咪",
  "maxItems": 20,
  "city_code": "",
  "sub_type": "1001",
  "word_id": "",
  "query_day": ""
}' |
apify call toolzerhub/douyin-billboard-scraper --silent --output-dataset

```

## MCP server setup

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