# Douyin Analytics Scraper (`maximedupre/douyin-analytics-scraper`) Actor

Collect Douyin hot search trend data without a Douyin login. Export ranks, hot values, video counts, source IDs, cover image URLs, source timestamps, and scrape times to an Apify dataset.

- **URL**: https://apify.com/maximedupre/douyin-analytics-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$15.55 / 1,000 douyin hot search trends

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 analytics scraper for hot search trends

Douyin Analytics Scraper collects current hot search trend data from [Douyin](https://www.douyin.com/). Run it to export ranked Douyin hot search topics with hot values, video counts, discussion-video counts, source IDs, cover image URLs, source timestamps, and scrape timestamps.

Use this Actor when you need a repeatable Douyin trend export for social listening, China market research, content planning, newsroom research, brand monitoring, or internal dashboards. Instead of checking the Douyin hot search page by hand, you get structured trend data in an Apify dataset that you can download as JSON, CSV, Excel, XML, RSS, or HTML, or send through the Apify API, scheduler, webhooks, and integrations.

For a small first run, choose **Hot search trends** and set **Trend limit** to `30`. Hot search trends work without a Douyin login. Video search and profile analytics are visible as planned surfaces, but Douyin currently requires login for those public web surfaces, so those modes stop with a clear message instead of saving placeholder data.

### ✅ What this Actor does

- Collects Douyin hot search trends.
- Saves one result per hot search trend.
- Preserves Douyin's source rank order.
- Adds hot value, video count, discussion-video count, room count, and max-rank fields when Douyin returns them.
- Adds Douyin source identifiers such as sentence ID or group ID when available.
- Adds source URL, source-returned timestamp, snapshot ID, and scrape timestamp for traceability.
- Can include cover image URLs for each trend.
- Caps each run at the current public hot search list size returned by Douyin.
- Runs without a user-provided Douyin login, cookies, or API key for hot search trends.

This Actor is focused on Douyin hot search analytics. It does not download videos, scrape comments, extract emails or phone numbers, automate logged-in Douyin accounts, translate trend text, or run sentiment analysis.

### 📦 Data you can extract

Each dataset item represents one Douyin hot search trend. Fields include:

- `rowType` - `hotSearchTrend` for trend rows.
- `inputMode` and `inputValue` - the source mode used for the row.
- `rank` - Douyin's source rank for the trend.
- `titleOrKeyword` - the hot search topic text.
- `douyinId` - Douyin sentence ID or group ID when available.
- `sourceUrl` - source URL used for the trend list.
- `scrapedAt` - UTC timestamp when the row was saved.
- `snapshotId` - source snapshot identifier when Douyin returns one.
- `trend.hotValue` - Douyin hot value.
- `trend.videoCount` and `trend.discussVideoCount` - visible trend-related video counts.
- `trend.roomCount`, `trend.maxRank`, `trend.eventTime`, `trend.sentenceTag`, `trend.wordType`, and `trend.label` when available.
- `media.coverImageUrl` and `media.coverImageUrls` when Douyin returns cover images.
- `sourceReturnedAt` - timestamp reported by the source, converted to UTC when available.

Some fields can be `null` when Douyin does not return that value for a specific trend.

### 🚀 Common use cases

- Track current Douyin hot search topics for social listening.
- Export Douyin trend ranks and hot values into a spreadsheet.
- Watch China social trends for content, PR, or market research.
- Feed Douyin hot search topics into dashboards, alerts, or AI workflows.
- Compare trend lists across scheduled Apify runs.
- Keep source IDs and timestamps for repeatable research notes.
- Collect cover image URLs for quick trend review.

### ▶️ How to run it

1. Keep **Douyin source** set to **Hot search trends**.
2. Set **Trend limit** to `30` for a quick sample or `50` for the full current public list returned by Douyin.
3. Start the Actor and open the dataset when the run finishes.

For scheduled monitoring, keep the same input and use Apify schedules. Each run saves a fresh trend snapshot with scrape timestamps and source metadata.

### 🛠️ Input

#### 🧪 Example input

```json
{
	"mode": "hotSearch",
	"maxResults": 30
}
````

#### 🎯 Douyin source

Choose the Douyin source surface to collect. **Hot search trends** is the working public no-login mode.

Video search and profile analytics are listed as planned surfaces, but Douyin currently requires login for those web sources. If you choose one of those modes, the Actor exits cleanly with a warning and does not save placeholder rows.

#### 🔢 Trend limit

Set how many Douyin hot search trends to save. Use `30` for a small first run or `50` for the full current hot search list returned by the public source.

### 📊 Output example

```json
{
	"rowType": "hotSearchTrend",
	"inputMode": "hotSearch",
	"inputValue": "hotSearch",
	"rank": 1,
	"titleOrKeyword": "神舟二十三号点火发射",
	"douyinId": "2510281",
	"sourceUrl": "https://www.douyin.com/aweme/v1/web/hot/search/list/?device_platform=webapp&aid=6383&channel=channel_pc_web",
	"scrapedAt": "2026-05-24T15:23:47.080Z",
	"snapshotId": "202605242323462B975C9C801B104FB016",
	"trend": {
		"hotValue": 12126931,
		"videoCount": 9,
		"discussVideoCount": 1,
		"roomCount": 2,
		"maxRank": 1,
		"eventTime": "2026-05-24T03:49:16.000Z",
		"sentenceTag": 6000,
		"wordType": 1,
		"label": 6
	},
	"media": {
		"coverImageUrl": "https://p11-sign.douyinpic.com/example.jpeg",
		"coverImageUrls": ["https://p11-sign.douyinpic.com/example.jpeg"]
	},
	"status": "ok",
	"warning": null,
	"unavailableReason": null,
	"targetSucceeded": true,
	"sourceReturnedAt": "2026-05-24T15:21:34.000Z"
}
```

### 💳 Pricing

This Actor uses pay-per-event pricing. You are charged for each Douyin hot search trend found and saved. Runs that stop without saving trends do not charge for trend results.

Use **Trend limit** to keep run size predictable. The current public hot search source returns up to 50 trends per run.

### ⚠️ Limits and caveats

- Hot search trends are collected from Douyin's public no-login source surface.
- Video search and profile analytics currently require login on Douyin's web source and are not saved by this Actor yet.
- The Actor saves the trend metrics Douyin returns at run time; it does not calculate historical trend growth.
- Trend text is returned as Douyin provides it. The Actor does not translate, classify, or score sentiment.
- Cover image URLs can expire or change because they are source-hosted media links.
- The Actor does not download videos, audio, comments, private data, emails, phone numbers, or logged-in-only content.

### ❓ FAQ

#### 🔐 Does this Douyin analytics scraper need a Douyin account?

No account, cookies, or API key is needed for Hot search trends. Other Douyin surfaces can require login, so this Actor does not claim to scrape video search or profile analytics until those surfaces can be collected safely.

#### 🔢 Can I get all 50 current Douyin hot search trends?

Yes. Set **Trend limit** to `50`. The Actor saves results in Douyin's source rank order.

#### 📅 Can I schedule repeat trend checks?

Yes. Use Apify schedules to run the same input repeatedly. Each run saves a fresh dataset with scrape timestamps and source snapshot fields.

#### 🌐 Does the Actor translate Chinese trend text?

No. It saves trend text as Douyin returns it. You can translate or classify the exported dataset in your own workflow.

### 📝 Changelog

- 0.1: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~douyin-analytics-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Other actors

- [TikTok Keywords Discovery Tool ↗](https://apify.com/maximedupre/tiktok-keywords-discovery-tool) - collect TikTok autocomplete keyword ideas for social search research.
- [TikTok Transcript Scraper ↗](https://apify.com/maximedupre/tiktok-transcript-scraper) - extract transcript text and public metadata from TikTok video URLs.
- [Twitter Scraper ↗](https://apify.com/maximedupre/twitter-scraper) - collect public X posts or current trending topics for social monitoring.
- [YouTube Channel Scraper ↗](https://apify.com/maximedupre/youtube-channel-scraper) - export public YouTube channel profiles and recent video data.
- [Pinterest Keyword Scraper ↗](https://apify.com/maximedupre/pinterest-keyword-scraper) - collect Pinterest autocomplete keyword suggestions for content planning.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `mode` (type: `string`):

Choose the Douyin source surface. Hot search trends are available for public no-login runs; video search and profile analytics currently stop with a clear message because Douyin requires login for those surfaces.

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

Keywords for the planned video search mode. Douyin currently requires login for this source surface, so Hot search trends is the working public mode.

## `profileTargets` (type: `array`):

Douyin profile URLs, handles, or IDs for the planned profile analytics mode. Douyin currently requires login for this source surface, so Hot search trends is the working public mode.

## `maxResults` (type: `integer`):

Maximum Douyin hot search trends to save. Use 30 for a quick sample, or 50 to collect the full current hot search list returned by the public source.

## Actor input object example

```json
{
  "mode": "hotSearch",
  "keywords": [],
  "profileTargets": [],
  "maxResults": 50
}
```

# Actor output Schema

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

Open the dataset with Douyin trend ranks, hot values, video counts, IDs, source URLs, cover images, and scrape timestamps.

# 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": [],
    "profileTargets": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/douyin-analytics-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": [],
    "profileTargets": [],
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Douyin Analytics Scraper",
        "description": "Collect Douyin hot search trend data without a Douyin login. Export ranks, hot values, video counts, source IDs, cover image URLs, source timestamps, and scrape times to an Apify dataset.",
        "version": "0.1",
        "x-build-id": "At4zisJuE7vS5xKH3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~douyin-analytics-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-douyin-analytics-scraper",
                "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/maximedupre~douyin-analytics-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-douyin-analytics-scraper",
                "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/maximedupre~douyin-analytics-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-douyin-analytics-scraper",
                "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",
                "properties": {
                    "mode": {
                        "title": "Douyin source",
                        "enum": [
                            "hotSearch",
                            "videoSearch",
                            "profileAnalytics"
                        ],
                        "type": "string",
                        "description": "Choose the Douyin source surface. Hot search trends are available for public no-login runs; video search and profile analytics currently stop with a clear message because Douyin requires login for those surfaces.",
                        "default": "hotSearch"
                    },
                    "keywords": {
                        "title": "Video search keywords",
                        "type": "array",
                        "description": "Keywords for the planned video search mode. Douyin currently requires login for this source surface, so Hot search trends is the working public mode.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "profileTargets": {
                        "title": "Profile targets",
                        "type": "array",
                        "description": "Douyin profile URLs, handles, or IDs for the planned profile analytics mode. Douyin currently requires login for this source surface, so Hot search trends is the working public mode.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "maxResults": {
                        "title": "Trend limit",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum Douyin hot search trends to save. Use 30 for a quick sample, or 50 to collect the full current hot search list returned by the public source.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
