# Bilibili Scraper (`silentflow/bilibili-scraper`) Actor

Scrape Bilibili videos, danmaku text, comment threads with replies, creator catalogs and live room status by keyword, URL or creator ID. Get views, likes, coins, favorites, danmaku with timestamps, sentiment and contact handles across eight modes. No login or API key. Export JSON, CSV or Excel.

- **URL**: https://apify.com/silentflow/bilibili-scraper.md
- **Developed by:** [SilentFlow](https://apify.com/silentflow) (community)
- **Categories:** Social media, Videos, Business
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.83 / 1,000 video 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 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

## Bilibili Scraper

**Turn Bilibili into structured Gen-Z reaction data.** Pull videos, real danmaku (弹幕) text, comment threads, creator profiles, and live-room status from China's biggest youth video platform. No login, no API key, no VPN. In seconds, not hours.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/HAjPFKz3Z74zdIKSQ/records/how-it-works-v2.png)

### ✨ Why teams choose this over other Bilibili scrapers

Paying for a "danmaku" scraper that only gives you a number? Searching English brand names and getting almost nothing back? Stuck looking up creators one ID at a time?

- 🎯 **Get the actual danmaku text, not just a count.** Most Bilibili scrapers report a danmaku number and stop there. This one pulls the real scrolling-comment text, thousands per video, with the video timestamp, display style, and a per-user hash so you can chart reactions second by second and filter spam.
- 🧩 **Multi-part videos, fully covered.** Bilibili tutorials and compilations often have dozens of parts (分P). Danmaku collection walks every part, not just the first one, so a 100-episode course gives you the whole reaction stream.
- 💬 **Comment threads, not just top comments.** Every comment comes back with its reply samples linked by `parentCommentId`, which roughly triples the text you get per video.
- 📺 **Live status for 50 creators in one call.** Point the live mode at a list of creator IDs and get who is live right now, stream titles, categories, and live viewer counts. Built for scheduled KOL monitoring.
- 🔎 **Find creators by keyword, not just by ID.** Search Bilibili's creators by niche and get their follower counts, levels, and video totals, so you can build a KOL shortlist instead of hunting profile links by hand.
- 📚 **Complete creator catalogs with full metrics.** Walk a creator's entire upload history, with views, likes, coins, favorites, shares, replies, and danmaku on every row, where most scrapers flake out or return partial stats.
- 📇 **Outreach handles, extracted for you.** When a creator lists a WeChat, Weibo, QQ, or business email in their bio, it comes back as a clean `contacts` object, so your KOL shortlist is ready to contact, not just to read.
- 🌐 **Search English, get Chinese results.** Bilibili indexes by Chinese text, so "耐克" returns far more than "Nike". Auto-localize searches both and merges them, so you get full native recall even when you search in English.
- 📊 **Every Bilibili metric, structured.** Views, likes, coins (投币), favorites (收藏), danmaku, shares, and replies on every video, plus tags and categories, ready for a spreadsheet or a model.
- 🧠 **Tag reactions with sentiment, built in.** Turn on sentiment analysis and every video, comment, and danmaku comes back scored positive, neutral, or negative, so you can chart how a topic is received without a second tool.
- 🔁 **Turn any search into a daily monitor.** Delta mode returns only videos you have not seen before, so a schedule becomes a hands-off "what's new" feed and quiet days cost almost nothing.
- 🚀 **No login, no setup, fast.** Works on public data with zero authentication, and fetches videos in parallel. Point it at a keyword or a URL and go.
- 💸 **Pay for what each row is worth.** Videos, comments, danmaku, and live checks are billed as separate result types, so a 2,000-danmaku pull does not cost like 2,000 videos.

### 🎯 What you can do with Bilibili data

| Team | What they build |
|------|----------------|
| **AI / LLM training teams** | Chinese danmaku and comment corpora for sentiment models and Gen-Z slang classifiers, pulled at scale on a schedule |
| **Equity research desks** | Gen-Z reaction sentiment on consumer brands (Pop Mart, BYD, gaming and anime IPs) as a leading indicator |
| **Brand monitoring agencies** | Track Western-brand mentions, viral reactions, and creator partnerships across Chinese youth culture |
| **Gaming and entertainment** | Monitor Chinese reception of game launches and anime adaptations on the community that drives them |
| **KOL and influencer agencies** | Discover Bilibili creators by niche and vet them by coins, favorites, and followers before you reach out |
| **Academic NLP researchers** | Study danmaku behavior, Gen-Z language trends, and Chinese digital culture with clean structured data |

### 📥 Input parameters

| Parameter | Description |
|-----------|-------------|
| `mode` | search / search_users / video_detail / video_comments / video_danmaku / user_videos / live_info / popular |
| `searchQuery` | Keyword, in Chinese or English (search modes) |
| `autoLocalize` | Also search a brand's Chinese name and merge results (on by default) |
| `searchAliases` | Extra term variants to search and merge |
| `sortOrder` | Relevance, most views, newest, most danmaku, most favorites, most comments |
| `durationFilter` | Filter search by video length |
| `pubtimeBegin` / `pubtimeEnd` | Publish-date range (YYYY-MM-DD) |
| `videoUrls` | Video URLs or BV IDs (detail / comments / danmaku modes) |
| `userIds` | Creator IDs (mid) for creator videos and live status |
| `category` | Category filter for trending |
| `maxItems` | Total results cap |
| `maxComments` / `maxDanmaku` | Per-video caps |
| `deltaMode` / `deltaStateKey` | Recurring "only new videos" monitoring |
| `sentimentAnalysis` | Tag videos, comments, and danmaku with Chinese sentiment |

### 📊 Output data

Video:

```json
{
    "type": "video",
    "bvid": "BV1rz7569EWw",
    "title": "Example video title",
    "url": "https://www.bilibili.com/video/BV1rz7569EWw",
    "viewCount": 13518564,
    "likeCount": 1311984,
    "coinCount": 750521,
    "favoriteCount": 371694,
    "danmakuCount": 23231,
    "replyCount": 21942,
    "authorName": "Creator Name",
    "authorMid": 5294454,
    "publishDate": "2026-06-08T12:00:00Z",
    "category": "Life",
    "tags": ["review", "life"],
    "durationFormatted": "7:19"
}
````

Danmaku:

```json
{
    "type": "danmaku",
    "videoBvid": "BV1rz7569EWw",
    "page": 1,
    "text": "肉眼可见的清纯",
    "progressMs": 417,
    "timestamp": 1775822400,
    "displayMode": 1,
    "fontSize": 25,
    "userHash": "ccae0794"
}
```

Live status:

```json
{
    "type": "live",
    "mid": 50329118,
    "name": "哔哩哔哩英雄联盟赛事",
    "liveStatusLabel": "live",
    "title": "HLE vs LYON",
    "online": 607494,
    "areaName": "游戏赛事",
    "liveUrl": "https://live.bilibili.com/7734200"
}
```

Creator:

```json
{
    "type": "user",
    "mid": 546195,
    "name": "老番茄",
    "fans": 20477550,
    "level": 6,
    "archiveCount": 664,
    "profileUrl": "https://space.bilibili.com/546195"
}
```

### 🗂️ Data fields

- **Video:** bvid, aid, cid, title, description, url, thumbnailUrl, duration, durationFormatted, viewCount, likeCount, coinCount, favoriteCount, shareCount, danmakuCount, replyCount, authorName, authorMid, publishDate, publishTimestamp, category, tags, partCount, videoParts, scrapedAt
- **Comment:** commentId, parentCommentId (for sub-replies), text, likeCount, replyCount, createdAt, authorName, authorMid, authorAvatar, authorLevel, videoBvid, scrapedAt
- **Danmaku:** videoBvid, cid, page, text, progressMs, timestamp, color, displayMode, fontSize, userHash, scrapedAt
- **Creator:** mid, name, face, sign, level, fans, archiveCount, profileUrl, contacts (wechat / weibo / qq / email when present in the bio), scrapedAt
- **Live:** mid, name, roomId, liveStatus, liveStatusLabel, title, online, areaName, parentAreaName, tags, liveStartedAt, coverUrl, keyframeUrl, faceUrl, liveUrl, scrapedAt

### 🚀 Examples

**Search AI tutorials, newest first**

```json
{ "mode": "search", "searchQuery": "人工智能教程", "sortOrder": "pubdate", "maxItems": 100 }
```

**Track a Western brand with native recall**

```json
{ "mode": "search", "searchQuery": "Nike", "searchAliases": ["AJ"], "maxItems": 200 }
```

**Pull the danmaku off a viral video**

```json
{ "mode": "video_danmaku", "videoUrls": ["BV1rz7569EWw"], "maxDanmaku": 2000 }
```

**Find tech creators to partner with**

```json
{ "mode": "search_users", "searchQuery": "科技", "maxItems": 50 }
```

**Watch a gaming trend every morning**

```json
{ "mode": "search", "searchQuery": "原神", "deltaMode": true, "deltaStateKey": "genshin", "sortOrder": "pubdate" }
```

**Check which of your KOLs are live right now**

```json
{ "mode": "live_info", "userIds": ["50329118", "672328094", "546195"] }
```

### 💻 Integrations

Feed Bilibili reactions straight into your pipeline.

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("YOUR_USERNAME/bilibili-scraper").call(run_input={
    "mode": "video_danmaku",
    "videoUrls": ["BV1rz7569EWw"],
    "maxDanmaku": 2000,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["text"])
```

JavaScript:

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('YOUR_USERNAME/bilibili-scraper').call({
    mode: 'search',
    searchQuery: '人工智能教程',
    maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### 📈 Performance

| Mode | Input | Typical result |
|------|-------|----------------|
| Search | maxItems 100 | Full page walk in seconds |
| Popular | category | Top trending in one call |
| Video details | BV IDs | Full metrics plus tags, fetched in parallel |
| Danmaku | one video | Thousands of danmaku lines, every part covered |
| Live status | 50 creator IDs | One call |

### 💡 Tips for best results

- Searching a Western brand? Keep **auto-localize** on, or add the Chinese name to **searchAliases** for brands outside the built-in list.
- For monitoring, set **sortOrder** to "Newest first" and turn on **deltaMode** with a distinct **deltaStateKey** per topic.
- For the richest reaction signal, use **video\_danmaku**: it returns far more Gen-Z reaction text than comment counts.
- Comments are sorted best with **Hot**, which is the most complete public view.
- Raise **maxItems** for bulk pulls (category sweeps, creator monitoring, corpus building) and lower it for quick lookups.

### ❓ FAQ

**Do I need a Bilibili account?** No. It reads public data. No login, no API key, no cookies.

**Can I get the actual danmaku text?** Yes. The `video_danmaku` mode returns the scrolling-comment text itself, not just a count.

**Does English search work?** Yes. Auto-localize also searches the Chinese brand name and merges the results, so an English keyword still returns native videos.

**Can I monitor a topic over time?** Yes. Turn on delta mode and schedule the actor, and each run returns only videos it has not seen before.

**What comes back for a creator?** Their profile (name, followers, level, video count) plus their recent videos with full metrics.

**Can I see who is live?** Yes. The `live_info` mode checks up to 50 creators per call and returns live status, stream title, category, and current viewers for each.

**Do comments include replies?** Yes. Each comment thread comes back with its reply samples, linked to the parent comment by `parentCommentId`.

**Can I get sentiment?** Yes. Turn on sentiment analysis and each video, comment, and danmaku gets a polarity (positive / neutral / negative) and a score from -1.0 to +1.0.

**What formats can I export?** JSON, CSV, or Excel from the run's dataset.

### 📬 Support

Need something this scraper does not do yet? We ship features fast.

- Feature requests go straight to our backlog.
- Enterprise needs? We do custom integrations.

Response time: usually under 24 hours.

# Actor input Schema

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

What to scrape from Bilibili.

## `searchQuery` (type: `string`):

Keyword to search. Works in Chinese (人工智能) and English (AI tutorial). Used in 'Search videos' and 'Search creators' modes.

## `autoLocalize` (type: `boolean`):

When on, a Latin brand name (e.g. 'Nike') also searches its Chinese name ('耐克') and results are merged, so you get full native recall even when searching in English. Add your own variants below.

## `searchAliases` (type: `array`):

Extra term variants to also search and merge with your query (e.g. add '耐克' for Nike).

## `sortOrder` (type: `string`):

How to sort video search results.

## `durationFilter` (type: `string`):

Filter video search results by length.

## `pubtimeBegin` (type: `string`):

Only videos published on or after this date (YYYY-MM-DD). Leave empty for no filter.

## `pubtimeEnd` (type: `string`):

Only videos published on or before this date (YYYY-MM-DD). Leave empty for no filter.

## `videoUrls` (type: `array`):

Bilibili video URLs or BV IDs. Used in 'Video details', 'Video comments', and 'Video danmaku' modes. Example: https://www.bilibili.com/video/BV1GJ411x7h7 or BV1GJ411x7h7

## `userIds` (type: `array`):

Bilibili creator numeric IDs (mid). Used in 'Creator videos' and 'Live status' modes. Find a creator's mid in their profile URL: space.bilibili.com/{mid}

## `category` (type: `string`):

Filter trending videos by category. Used in 'Popular / trending' mode.

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

Maximum number of results to return, across all inputs combined.

## `maxComments` (type: `integer`):

Maximum comments to return per video. Used in 'Video comments' mode.

## `maxDanmaku` (type: `integer`):

Maximum danmaku (弹幕) to return per video. Used in 'Video danmaku' mode. 0 uses a sensible default.

## `sortComments` (type: `string`):

How to sort comments (Hot recommended). Used in 'Video comments' mode.

## `deltaMode` (type: `boolean`):

Turn a search into a recurring monitor: each run returns only videos not seen before (deduped across runs). Pair with an Apify Schedule for a hands-off daily feed. Used in 'Search videos' mode.

## `deltaStateKey` (type: `string`):

Names the saved 'already-seen' state so independent monitors do not collide. Use a distinct key per query you track. Only used when Delta mode is on.

## `sentimentAnalysis` (type: `boolean`):

Tag each video, comment, and danmaku with Chinese sentiment: polarity (positive / neutral / negative) and a score from -1.0 to +1.0.

## `debugMode` (type: `boolean`):

Enable verbose diagnostic logging.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "人工智能教程",
  "autoLocalize": true,
  "sortOrder": "totalrank",
  "durationFilter": "any",
  "videoUrls": [
    "https://www.bilibili.com/video/BV1GJ411x7h7"
  ],
  "category": "all",
  "maxItems": 100,
  "maxComments": 20,
  "maxDanmaku": 0,
  "sortComments": "hot",
  "deltaMode": false,
  "deltaStateKey": "default",
  "sentimentAnalysis": false,
  "debugMode": false
}
```

# Actor output Schema

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

Videos (bvid, title, views, likes, coins, favorites, danmakuCount, replies, author, publishDate, category, tags), comments (text, likes, author), danmaku (text, progressMs, timestamp), and creators (name, fans, level).

## `resultsCSV` (type: `string`):

CSV format export for spreadsheet analysis

## `resultsExcel` (type: `string`):

Excel format export

# 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 = {
    "searchQuery": "人工智能教程",
    "videoUrls": [
        "https://www.bilibili.com/video/BV1GJ411x7h7"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("silentflow/bilibili-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 = {
    "searchQuery": "人工智能教程",
    "videoUrls": ["https://www.bilibili.com/video/BV1GJ411x7h7"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("silentflow/bilibili-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 '{
  "searchQuery": "人工智能教程",
  "videoUrls": [
    "https://www.bilibili.com/video/BV1GJ411x7h7"
  ],
  "maxItems": 100
}' |
apify call silentflow/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bilibili Scraper",
        "description": "Scrape Bilibili videos, danmaku text, comment threads with replies, creator catalogs and live room status by keyword, URL or creator ID. Get views, likes, coins, favorites, danmaku with timestamps, sentiment and contact handles across eight modes. No login or API key. Export JSON, CSV or Excel.",
        "version": "1.0",
        "x-build-id": "rublIYxMGHIhnzedN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/silentflow~bilibili-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-silentflow-bilibili-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/silentflow~bilibili-scraper/runs": {
            "post": {
                "operationId": "runs-sync-silentflow-bilibili-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/silentflow~bilibili-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-silentflow-bilibili-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "search_users",
                            "video_detail",
                            "video_comments",
                            "video_danmaku",
                            "user_videos",
                            "live_info",
                            "popular"
                        ],
                        "type": "string",
                        "description": "What to scrape from Bilibili.",
                        "default": "search"
                    },
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Keyword to search. Works in Chinese (人工智能) and English (AI tutorial). Used in 'Search videos' and 'Search creators' modes."
                    },
                    "autoLocalize": {
                        "title": "Auto-localize brand names",
                        "type": "boolean",
                        "description": "When on, a Latin brand name (e.g. 'Nike') also searches its Chinese name ('耐克') and results are merged, so you get full native recall even when searching in English. Add your own variants below.",
                        "default": true
                    },
                    "searchAliases": {
                        "title": "Search aliases",
                        "type": "array",
                        "description": "Extra term variants to also search and merge with your query (e.g. add '耐克' for Nike).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sortOrder": {
                        "title": "Sort order (search)",
                        "enum": [
                            "totalrank",
                            "click",
                            "pubdate",
                            "dm",
                            "stow",
                            "scores"
                        ],
                        "type": "string",
                        "description": "How to sort video search results.",
                        "default": "totalrank"
                    },
                    "durationFilter": {
                        "title": "Duration filter (search)",
                        "enum": [
                            "any",
                            "short",
                            "medium",
                            "long",
                            "verylong"
                        ],
                        "type": "string",
                        "description": "Filter video search results by length.",
                        "default": "any"
                    },
                    "pubtimeBegin": {
                        "title": "Published after (search)",
                        "type": "string",
                        "description": "Only videos published on or after this date (YYYY-MM-DD). Leave empty for no filter."
                    },
                    "pubtimeEnd": {
                        "title": "Published before (search)",
                        "type": "string",
                        "description": "Only videos published on or before this date (YYYY-MM-DD). Leave empty for no filter."
                    },
                    "videoUrls": {
                        "title": "Video URLs or BVIDs",
                        "type": "array",
                        "description": "Bilibili video URLs or BV IDs. Used in 'Video details', 'Video comments', and 'Video danmaku' modes. Example: https://www.bilibili.com/video/BV1GJ411x7h7 or BV1GJ411x7h7",
                        "items": {
                            "type": "string"
                        }
                    },
                    "userIds": {
                        "title": "Creator IDs (mid)",
                        "type": "array",
                        "description": "Bilibili creator numeric IDs (mid). Used in 'Creator videos' and 'Live status' modes. Find a creator's mid in their profile URL: space.bilibili.com/{mid}",
                        "items": {
                            "type": "string"
                        }
                    },
                    "category": {
                        "title": "Category (popular)",
                        "enum": [
                            "all",
                            "animation",
                            "music",
                            "dance",
                            "game",
                            "knowledge",
                            "tech",
                            "sports",
                            "car",
                            "life",
                            "food",
                            "animal",
                            "fashion",
                            "entertainment"
                        ],
                        "type": "string",
                        "description": "Filter trending videos by category. Used in 'Popular / trending' mode.",
                        "default": "all"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of results to return, across all inputs combined.",
                        "default": 100
                    },
                    "maxComments": {
                        "title": "Max comments per video",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum comments to return per video. Used in 'Video comments' mode.",
                        "default": 20
                    },
                    "maxDanmaku": {
                        "title": "Max danmaku per video",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum danmaku (弹幕) to return per video. Used in 'Video danmaku' mode. 0 uses a sensible default.",
                        "default": 0
                    },
                    "sortComments": {
                        "title": "Sort comments by",
                        "enum": [
                            "hot",
                            "likes",
                            "time"
                        ],
                        "type": "string",
                        "description": "How to sort comments (Hot recommended). Used in 'Video comments' mode.",
                        "default": "hot"
                    },
                    "deltaMode": {
                        "title": "Delta mode (only new videos since last run)",
                        "type": "boolean",
                        "description": "Turn a search into a recurring monitor: each run returns only videos not seen before (deduped across runs). Pair with an Apify Schedule for a hands-off daily feed. Used in 'Search videos' mode.",
                        "default": false
                    },
                    "deltaStateKey": {
                        "title": "Delta state key",
                        "type": "string",
                        "description": "Names the saved 'already-seen' state so independent monitors do not collide. Use a distinct key per query you track. Only used when Delta mode is on.",
                        "default": "default"
                    },
                    "sentimentAnalysis": {
                        "title": "Sentiment analysis",
                        "type": "boolean",
                        "description": "Tag each video, comment, and danmaku with Chinese sentiment: polarity (positive / neutral / negative) and a score from -1.0 to +1.0.",
                        "default": false
                    },
                    "debugMode": {
                        "title": "Debug logging",
                        "type": "boolean",
                        "description": "Enable verbose diagnostic logging.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
