# Douyin Trending Live Rooms Scraper (`hgservices/douyin-trending-live-rooms-scraper`) Actor

Discover live rooms on Douyin (Chinese TikTok) by category: hot, chat, music, games, dance, and more. Get live viewer counts, streamer profiles, follower counts, cover images, and stream URLs. No login needed.

- **URL**: https://apify.com/hgservices/douyin-trending-live-rooms-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped rooms

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?

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

## Douyin Trending Live Rooms Scraper

Discover what is live on **Douyin (抖音直播, the Chinese TikTok)** right now. This Douyin live scraper browses the live category pages on live.douyin.com and returns every live room it finds. You get live viewer counts, room titles, cover images, streamer profiles with follower counts, and FLV and HLS stream URLs.

Browse Hot (热门), Chat (聊天), Music (音乐), Games (游戏), Anime (二次元), Dance (舞蹈), Culture (文化), Lifestyle (生活), Sports (运动), and game titles such as Honor of Kings (王者荣耀), League of Legends (英雄联盟), and Valorant (无畏契约). No Douyin account, cookies, or login are needed.

### What does Douyin Trending Live Rooms Scraper do?

The Actor gives you a snapshot of the Douyin live directory as structured data. Select the categories you want, start the run, and download a list of live rooms in JSON, CSV, Excel, or HTML.

- 📺 **Browse 17 live categories** – 9 main categories and 8 game subcategories.
- 🆕 **Get new categories automatically** – leave the category list empty, and the Actor scrapes every live category that Douyin shows at the time of the run.
- 👀 **Live viewer counts** – the number of people who watch each room now, and the total viewers of the broadcast.
- 🏆 **Category rank** – the position of each room in the category list.
- 👤 **Streamer profiles** – nickname, Douyin ID, bio, avatar, follower and following counts, verification text, and profile URL.
- 🛒 **Live commerce flag** – see which live rooms sell products.
- 🎥 **Stream URLs** – FLV and HLS URLs for every available video quality (optional).
- 🎯 **Filters** – skip rooms below a minimum viewer count, limit the number of results, and remove duplicate rooms.

### What data can you get from Douyin live rooms?

| Field              | Description                                                         | Example                               |
| ------------------ | ------------------------------------------------------------------- | ------------------------------------- |
| `url`              | Live room URL                                                       | `https://live.douyin.com/73596365817` |
| `title`            | Live room title                                                     | `啊！！这是谁回来了……`                |
| `categoryName`     | Category name in Chinese                                            | `热门`                                |
| `categoryNameEn`   | Category name in English                                            | `Hot`                                 |
| `rank`             | Position of the room in the category list                           | `1`                                   |
| `viewersNow`       | Current live viewers                                                | `250171`                              |
| `viewersNowText`   | Current live viewers as Douyin shows them                           | `25万在线观众`                        |
| `totalViewersText` | Total viewers of the broadcast as Douyin shows them                 | `10万+`                               |
| `coverUrl`         | Room cover image                                                    | image URL                             |
| `gameTag`          | Game name for game streams                                          | `王者荣耀`                            |
| `isRecommended`    | Douyin marks the room as recommended                                | `true`                                |
| `hasCommerceGoods` | The room sells products (live commerce)                             | `false`                               |
| `streamer`         | Nickname, Douyin ID, bio, avatar, followers, following, profile URL | object                                |
| `stream`           | FLV and HLS URLs per quality (`FULL_HD1`, `HD1`, `SD1`, `SD2`)      | object                                |
| `scrapedAt`        | Time of the scrape (ISO 8601)                                       | `2026-10-22T05:31:07.256Z`            |

The full field list is in the [Output](#output) section.

### Use cases for Douyin live data

- **Live streaming trend research** – see which categories, games, and streamers draw the most live viewers in China.
- **Influencer discovery** – find active Douyin streamers in a niche, with follower counts and profile links.
- **Live commerce monitoring** – track which live rooms sell products and how many people watch them.
- **Esports and game analytics** – compare live viewers across game titles such as Honor of Kings, PUBG, and League of Legends.
- **Time series of live viewership** – schedule the Actor every hour and compare the snapshots.
- **Live stream archives and monitoring** – collect stream URLs for the rooms that you want to watch or record.

### Input

All input fields are optional. With an empty input, the Actor scrapes every live category and saves every room it finds.

| Field               | Type                | Default        | Description                                                         |
| ------------------- | ------------------- | -------------- | ------------------------------------------------------------------- |
| `categories`        | array of ID strings | `[]` (all)     | Categories to browse. Empty = every category that Douyin shows now. |
| `maxResults`        | integer             | `0` (no limit) | Stop after this many rooms are saved, in total for the run.         |
| `minViewers`        | integer             | `0`            | Skip rooms with fewer live viewers than this number.                |
| `includeStreamUrls` | boolean             | `true`         | Add FLV and HLS stream URLs to each room.                           |
| `deduplicate`       | boolean             | `false`        | Save each room once, even when it shows in more than one category.  |

Example input:

```json
{
    "categories": ["720", "1010045"],
    "maxResults": 200,
    "minViewers": 100,
    "includeStreamUrls": false,
    "deduplicate": true
}
```

#### Douyin live category IDs

Send category IDs as strings, for example `"720"`, not `720`. The input accepts only the IDs in this table. To get categories that are not in the table, leave `categories` empty.

| ID        | Category             | Chinese name | Parent |
| --------- | -------------------- | ------------ | ------ |
| `720`     | Hot                  | 热门         | –      |
| `101`     | Chat                 | 聊天         | –      |
| `102`     | Music                | 音乐         | –      |
| `103`     | Games                | 游戏         | –      |
| `104`     | Anime (ACG)          | 二次元       | –      |
| `105`     | Dance                | 舞蹈         | –      |
| `106`     | Culture              | 文化         | –      |
| `107`     | Lifestyle            | 生活         | –      |
| `108`     | Sports               | 运动         | –      |
| `1011032` | Delta Force          | 三角洲行动   | Games  |
| `1010045` | Honor of Kings       | 王者荣耀     | Games  |
| `1010017` | Valorant             | 无畏契约     | Games  |
| `1010014` | League of Legends    | 英雄联盟     | Games  |
| `1010032` | Peacekeeper Elite    | 和平精英     | Games  |
| `1010042` | Naruto Mobile        | 火影忍者手游 | Games  |
| `1010026` | PUBG                 | 绝地求生     | Games  |
| `1010055` | Golden Spatula (TFT) | 金铲铲之战   | Games  |

Rooms in a game subcategory also show in Games. To save each room once, set `deduplicate` to `true`.

### Output

Each live room is one item in the dataset. This is a sample item (the streamer data and stream URLs are shortened):

```json
{
    "roomId": "7699360201154661161",
    "webRid": "73596365817",
    "url": "https://live.douyin.com/73596365817",
    "title": "啊！！这是谁回来了……",
    "categoryId": "720",
    "categoryName": "热门",
    "categoryNameEn": "Hot",
    "rank": 1,
    "viewersNow": 6,
    "viewersNowText": "6在线观众",
    "totalViewersText": "7",
    "coverUrl": "https://p11-webcast.douyinpic.com/img/aweme-avatar/...webp",
    "gameTag": null,
    "tagName": null,
    "isRecommended": true,
    "hasCommerceGoods": false,
    "streamer": {
        "userId": "2652466855544127",
        "secUid": "MS4wLjABAAAA...",
        "displayId": "62629351460",
        "nickname": "…",
        "signature": "…",
        "avatarUrl": "https://p11.douyinpic.com/aweme/100x100/aweme-avatar/...jpeg",
        "followerCount": 13816,
        "followingCount": 5,
        "verifiedReason": null,
        "profileUrl": "https://www.douyin.com/user/MS4wLjABAAAA..."
    },
    "scrapedAt": "2026-10-22T05:31:07.256Z",
    "stream": {
        "defaultQuality": "HD1",
        "flvUrls": { "FULL_HD1": "http://pull-q3.douyincdn.com/...flv", "HD1": "…", "SD1": "…", "SD2": "…" },
        "hlsUrls": { "FULL_HD1": "http://pull-q3.douyincdn.com/...m3u8", "HD1": "…", "SD1": "…", "SD2": "…" },
        "hlsUrl": "http://pull-q3.douyincdn.com/...m3u8"
    }
}
```

The `stream` object is present only when `includeStreamUrls` is `true`. Fields that Douyin does not show for a room are `null`.

In Apify Console, the dataset has two views:

- **Live rooms** – cover, title, room URL, live viewers, category, rank, game, streamer, followers, and the commerce flag.
- **Streamers** – avatar, nickname, Douyin ID, followers, verification, bio, profile URL, room URL, and live viewers.

Each run also saves a `SUMMARY` record in the key-value store. It shows the total number of rooms saved, and the pages loaded and rooms saved for each category.

### How to use Douyin Trending Live Rooms Scraper

You can run the Actor in Apify Console, through the Apify API, or from an AI assistant. The examples below use the Actor ID `HGServices/douyin-trending-live-rooms-scraper`. In API URLs, the slash becomes a tilde: `HGServices~douyin-trending-live-rooms-scraper`.

#### Apify Console

1. Open the Actor in Apify Console.
2. In **Categories**, select the categories you want. Leave the field empty to scrape all categories.
3. Optionally, set **Minimum live viewers** to skip small rooms.
4. Optionally, set **Max results** to limit the run.
5. Click **Start**.
6. When the run is done, open the **Output** tab.
7. Click **Export** to download the results as JSON, CSV, Excel, XML, or HTML.

To get a snapshot every hour, open the Actor and click **Schedule**.

#### Apify API (HTTP)

Get your API token from **Settings › API & Integrations** in Apify Console. This request runs the Actor, waits for the run to finish, and returns the dataset items:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/HGServices~douyin-trending-live-rooms-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "categories": ["1010045"],
        "maxResults": 50,
        "minViewers": 1000,
        "includeStreamUrls": false
      }'
```

The synchronous endpoint waits up to 300 seconds. For long runs, such as a run of all categories, start the run with `POST /v2/acts/HGServices~douyin-trending-live-rooms-scraper/runs`. Then get the items from `GET /v2/datasets/{defaultDatasetId}/items` when the run is done.

#### JavaScript (Node.js) with apify-client

Install the client with `npm install apify-client`.

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

// Start the Actor and wait for the run to finish.
const run = await client.actor('HGServices/douyin-trending-live-rooms-scraper').call({
    categories: ['720', '1010045'],
    maxResults: 200,
    minViewers: 100,
    includeStreamUrls: false,
    deduplicate: true,
});

// Read the live rooms from the run's dataset.
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const room of items) {
    console.log(room.viewersNow, room.title, room.url, room.streamer?.nickname);
}
```

#### Python with apify-client

Install the client with `pip install apify-client`.

```python
import os

from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

## Start the Actor and wait for the run to finish.
run = client.actor("HGServices/douyin-trending-live-rooms-scraper").call(
    run_input={
        "categories": ["720", "1010045"],
        "maxResults": 200,
        "minViewers": 100,
        "includeStreamUrls": False,
        "deduplicate": True,
    }
)

## Read the live rooms from the run's dataset.
for room in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(room["viewersNow"], room["title"], room["url"])
```

#### AI assistants (Claude, ChatGPT, and other MCP clients)

The [Apify MCP server](https://mcp.apify.com) lets AI assistants run this Actor and read the results. Use this server URL to give the assistant access to this Actor only:

```text
https://mcp.apify.com/?tools=HGServices/douyin-trending-live-rooms-scraper
```

**Claude (claude.ai and Claude Desktop):**

1. Open **Settings › Connectors**.
2. Click **Add custom connector**.
3. Paste the server URL above.
4. Sign in to Apify when Claude asks you.

**Claude Code:**

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=HGServices/douyin-trending-live-rooms-scraper"
```

**ChatGPT:**

1. Open **Settings › Apps & Connectors**.
2. Turn on **Developer mode** in the advanced settings.
3. Create a new connector with the server URL above.
4. Sign in to Apify when ChatGPT asks you.

**Other MCP clients (Cursor, VS Code, and more):**

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?tools=HGServices/douyin-trending-live-rooms-scraper"
        }
    }
}
```

Then ask the assistant in plain language. Example prompts:

- "Find the 20 Honor of Kings live rooms on Douyin with the most viewers now. Show the streamer, follower count, and room URL."
- "Which Douyin live categories have the most viewers now? Make a table."
- "List Douyin streamers in the Music category with more than 100,000 followers."

### Tips and limitations

- **Hot is a discovery feed, not a top list.** Douyin mixes small and large rooms in the Hot category. To get only big rooms, set **Minimum live viewers** or sort the results by `viewersNow`.
- **Category depth.** Douyin shows about 100–150 rooms per category. Small categories, such as Dance or Sports, can have only 15 rooms at some times of day.
- **`maxResults` is a total for the run.** When you select more than one category, the first categories can use up the limit.
- **Stream URLs expire.** Use them soon after the run.
- **Results are a snapshot.** Live rooms start and end all the time. Schedule the Actor to track changes.
- **No keyword search.** The Actor browses live categories. It does not search Douyin for keywords.

### FAQ

#### Do I need a Douyin account or cookies?

No. The Actor collects data from the public live category pages. You do not need a Douyin account, cookies, or a login.

#### Do I need a proxy?

No. You do not need to configure a proxy. The Actor manages its connection to Douyin.

#### How long does a run take?

A run of all categories (about 1,500 rooms) usually takes 1–2 minutes. A run of one category takes a few seconds.

#### Can I get comments, gifts, or more data for one live room?

No. This Actor finds live rooms and gives you their room URLs. To get more data for one live room, give the room URL to a Douyin live room scraper.

#### Is it legal to scrape Douyin?

This Actor collects only data that Douyin shows publicly to every visitor of live.douyin.com. The output includes public streamer profile data. You are responsible for using it in line with the Douyin terms of service and data protection laws such as GDPR and the Chinese PIPL. Read more in the Apify blog post [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

#### I found a bug or need a feature

Open an issue in the **Issues** tab of the Actor. We read every report.

# Actor input Schema

## `categories` (type: `array`):

Live categories to browse. Leave empty to scrape every category that Douyin shows now, including new ones. Game titles (for example Honor of Kings) are subcategories of Games.

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

Stop after this many rooms are saved. Set 0 for no limit.

## `minViewers` (type: `integer`):

Skip rooms with fewer live viewers than this number. Many rooms have fewer than 5 viewers.

## `includeStreamUrls` (type: `boolean`):

Add the FLV and HLS stream URLs for each quality. These URLs expire after some time.

## `deduplicate` (type: `boolean`):

Save each room once, even when it shows in more than one category (for example Games and Honor of Kings).

## Actor input object example

```json
{
  "categories": [
    "720",
    "1010045"
  ],
  "maxResults": 0,
  "minViewers": 0,
  "includeStreamUrls": true,
  "deduplicate": false
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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 = {
    "categories": [
        "720",
        "1010045"
    ],
    "deduplicate": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/douyin-trending-live-rooms-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 = {
    "categories": [
        "720",
        "1010045",
    ],
    "deduplicate": False,
}

# Run the Actor and wait for it to finish
run = client.actor("hgservices/douyin-trending-live-rooms-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 '{
  "categories": [
    "720",
    "1010045"
  ],
  "deduplicate": false
}' |
apify call hgservices/douyin-trending-live-rooms-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hgservices/douyin-trending-live-rooms-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/Ww75PhXEYqwGEEutC/builds/xnn7jvEYC2rokpFWG/openapi.json
