# Douyin Video Analytics Scraper (`toolzerhub/douyin-video-analytics-scraper`) Actor

Get performance analytics for one public Douyin video by URL or aweme\_id: the frequent-word breakdown of its comment section, and the demographic profile -- region, gender, age, and device -- of viewers who liked it. This data normally needs a logged-in Douyin creator account to see.

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

## Pricing

from $8.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/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 Video Analytics Scraper

Get performance analytics for one public Douyin video: the frequent-word breakdown of its comment section, and the demographic profile — region, gender, age, and device — of viewers who liked it. This data normally needs a logged-in Douyin creator account to see. Pick a mode with `scraperType`.

### Modes

| `scraperType` | Returns |
|---|---|
| `videoCommentWords` (default) | Frequent-word breakdown of the video's comments |
| `videoAudience` | Demographic profile of viewers who liked the video |

### Input

| Field | Use it for |
|---|---|
| **`aweme_id`** | A Douyin video URL, or the numeric video ID it contains. Required for both modes. |
| **`option`** | `videoAudience` only. Integer `1`–`9`, default `4`. |
| **`addonVideoDetails`** | Fetches full video detail alongside the analytics — one extra request and one extra charge. |

```json
{
  "scraperType": "videoCommentWords",
  "aweme_id": "https://www.douyin.com/video/7448118827402972455"
}
```

### Only works for videos currently on a Douyin board

Douyin only serves both `videoCommentWords` and `videoAudience` for videos that are currently sitting on one of its hot.douyin.com boards, inside that board's viewable window. A video that has aged off — even one that was popular last month — returns nothing. Pull `aweme_id` values from a currently-live board rather than an arbitrary catalog of past videos if you want these two modes to return data.

### `videoCommentWords` is one row, not one row per word

The whole comment word cloud — roughly 80 words on a well-commented video — comes back from a single upstream request. This Actor keeps that as one row holding a `comment_words` array, rather than exploding it into one row per word, for the same reason as its account-level counterpart: a row means one request's worth of work, consistently.

### Output

| Field | Mode | Contents |
|---|---|---|
| **`comment_words`**, **`aweme_id`**, **`source_aweme_id`**, **`video_detail`** | `videoCommentWords` | The whole word cloud, one row |
| **`portrait`**, **`portrait_tgi`**, **`option`**, **`aweme_id`**, **`source_aweme_id`**, **`video_detail`** | `videoAudience` | Demographic breakdown of viewers who liked the video |

```json
{
  "comment_words": [{ "word_seg": "太好看了", "count": 214 }, { "word_seg": "求链接", "count": 87 }],
  "source_aweme_id": "7448118827402972455"
}
```

### Questions

**I ran this against a video I know is popular and got nothing back — why?**
Almost certainly because the video isn't currently on a hot.douyin.com board. See the note above — both endpoints scope to videos inside a board's active window, not any public video by ID.

**Why is `videoCommentWords` one row instead of ~80?**
By design — see the note above. Read the individual words out of `comment_words`.

**Where do I find a valid `aweme_id` to test with?**
The video-performance modes of the Trending Scraper — `videoBoard`, `lowFollowerHits`, `highLikeRate`, and the like — return `aweme_id` for videos that are, by definition, currently on a board.

### Related Actors

| Actor | Purpose |
|---|---|
| [Douyin Trending Scraper](https://apify.com/toolzerhub/douyin-billboard-scraper) | Find an `aweme_id` currently on a board before running this Actor against it |
| [Douyin Video Scraper](https://apify.com/toolzerhub/douyin-video-scraper) | Caption, sound, hashtags, and engagement stats for the same video |
| [Douyin Account Analytics Scraper](https://apify.com/toolzerhub/douyin-account-analytics-scraper) | The same kind of analytics, scoped to a whole account instead of one video |

# Actor input Schema

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

Choose the dataset for this run.

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

A Douyin video URL, or the numeric video ID it contains.

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

## `option` (type: `integer`):

Which metric the breakdown is measured by.

## Actor input object example

```json
{
  "scraperType": "videoCommentWords",
  "aweme_id": "https://www.douyin.com/video/7448118827402972455",
  "addonVideoDetails": false
}
```

# 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 = {
    "aweme_id": "https://www.douyin.com/video/7448118827402972455"
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/douyin-video-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 = { "aweme_id": "https://www.douyin.com/video/7448118827402972455" }

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/douyin-video-analytics-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 '{
  "aweme_id": "https://www.douyin.com/video/7448118827402972455"
}' |
apify call toolzerhub/douyin-video-analytics-scraper --silent --output-dataset

```

## MCP server setup

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