# Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站) (`haketa/bilibili-scraper`) Actor

Scrape Bilibili (B站/哔哩哔哩) without an API key or login. Export videos, engagement stats (views, likes, coins, favorites, danmaku 弹幕), comments and creator/UP主 profiles by keyword, URL or trending feed. A fast Bilibili API alternative for market research, KOL lead-gen and AI datasets. JSON/CSV/Excel.

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

## Pricing

from $7.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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 🎬 — Videos, Comments, Danmaku & Creators (B站 / 哔哩哔哩)

> Extract **Bilibili** video data, engagement metrics, **comments**, **danmaku (弹幕)** and **creator / UP主** profiles at scale — by keyword, URL or trending feed. **No API key. No login. No account.**

[![Works without login](https://img.shields.io/badge/login-not%20required-brightgreen)](#)
[![No API key](https://img.shields.io/badge/API%20key-not%20required-brightgreen)](#)
[![Output](https://img.shields.io/badge/export-JSON%20%7C%20CSV%20%7C%20Excel-blue)](#)
[![Danmaku](https://img.shields.io/badge/弹幕-danmaku%20included-ff69b4)](#)
[![Language](https://img.shields.io/badge/EN%20%2B%20中文-supported-orange)](#)

**Bilibili** (哔哩哔哩, a.k.a. **B站** or *bili bili*) is one of the largest video platforms in China — 300M+ monthly users, the home of **danmaku** bullet comments and a massive creator (**UP主**) economy. This actor turns that public data into clean, structured **JSON / CSV / Excel** you can actually use — a practical **Bilibili API alternative** that just works.

Paste a keyword, a video link, or a creator page. Press **Start**. Get rows.

---

### 📑 Table of contents

- [Why this scraper](#-why-this-scraper)
- [What you can scrape](#-what-you-can-scrape)
- [Quick start](#-quick-start)
- [Input examples](#-input-examples)
- [Output examples](#-output-examples)
- [Field reference & fill rates](#-field-reference--fill-rates)
- [Who uses this & why](#-who-uses-this--why)
- [Use cases](#-use-cases)
- [FAQ](#-faq)
- [Legal & responsible use](#-legal--responsible-use)

---

### ✨ Why this scraper

| | |
|---|---|
| 🔑 **No API key, no login** | Nothing to register, no cookies to paste, no OAuth. Just input → output. |
| 🌊 **Danmaku included** | Export Bilibili's signature on-screen **bullet comments (弹幕)** with text + timestamps — data you can't get anywhere else. |
| 🪙 **Full engagement metrics** | Not just views — **coins (投币), favorites (收藏), danmaku, likes, shares** and comment counts. The complete Bilibili signal set. |
| 👤 **Creator / UP主 lead-gen** | Follower counts, bio, verification, video count — and **business emails** pulled straight from creator profiles. |
| 🔎 **Search in English or 中文** | Query with `python`, `美食`, `原神`, `machine learning` — anything. |
| ⚡ **Fast & pay-as-you-go** | Lightweight, no heavy browser. You only pay for the rows you keep. |
| 📤 **Clean exports** | Tidy, flat records ready for **Excel, Google Sheets, JSON or CSV** — or straight into your database / AI pipeline. |

> 💡 **The danmaku difference.** Most Bilibili tools stop at views and titles. This one gives you the *bullet comments* that scroll across every video — the richest, rawest audience-reaction signal on the Chinese internet. Perfect for sentiment, trends and AI training data.

---

### 📦 What you can scrape

<table>
<tr><td>

**🎬 Videos**
- Title, description, cover, category
- Duration & publish date
- Views, danmaku, likes, **coins**, **favorites**, shares, comments
- Direct video URL + IDs (BV / av)

</td><td>

**👤 Creators (UP主)**
- Name, avatar, space URL
- **Followers** & following
- Bio + **business email**
- Verification / official role
- Total videos & likes

</td></tr>
<tr><td>

**💬 Comments**
- Top comments by likes
- Author name + ID
- Like count & reply count
- Timestamp

</td><td>

**🌊 Danmaku (弹幕)**
- Bullet-comment text
- Position in the video (seconds)
- When it was posted

</td></tr>
</table>

**Four ways to find videos:** 🔎 keyword search · 🎬 direct URL / ID · 👤 by creator · 🔥 trending feed.

---

### 🚀 Quick start

1. Open the **Input** tab.
2. Do any of these (mix freely):
   - Type keywords under **🔎 Search keywords** (e.g. `python tutorial`, `原神`).
   - Paste links under **🎬 Video URLs** (e.g. `https://www.bilibili.com/video/BV1GJ411x7h7`).
   - Paste creator pages under **👤 Creators** (e.g. `https://space.bilibili.com/431073645`).
   - Tick **🔥 Include trending videos**.
3. *(Optional)* Turn on **💬 Include comments** and **🌊 Include danmaku**.
4. Press **Start** ▶️

No input at all? The actor returns a sample of **trending videos** so you can see the shape of the data instantly.

---

### 🧾 Input examples

**Search two topics, keep the top 100 videos with comments:**

```json
{
  "searchKeywords": ["机器学习", "python tutorial"],
  "searchPages": 2,
  "includeComments": true,
  "maxCommentsPerVideo": 20,
  "maxVideos": 100
}
````

**Deep-dive specific videos, danmaku included:**

```json
{
  "videoUrls": [
    "https://www.bilibili.com/video/BV1GJ411x7h7",
    "BV1uMTY6aEZv"
  ],
  "includeDanmaku": true,
  "maxDanmakuPerVideo": 1000
}
```

**Build a creator (UP主) lead list:**

```json
{
  "userIds": [
    "https://space.bilibili.com/431073645",
    "2267573"
  ]
}
```

**Grab what's trending right now:**

```json
{ "scrapePopular": true, "popularCount": 100 }
```

***

### 📤 Output examples

**🎬 Video record**

```json
{
  "recordType": "video",
  "bvid": "BV1uMTY6aEZv",
  "url": "https://www.bilibili.com/video/BV1uMTY6aEZv",
  "title": "【全748集】目前B站最全最细的Python零基础教程",
  "category": "科技",
  "durationSeconds": 934,
  "publishedAt": "2026-07-10T09:00:00.000Z",
  "views": 12833945,
  "danmakuCount": 59357,
  "likes": 421003,
  "coins": 92644,
  "favorites": 93028,
  "shares": 18220,
  "comments": 12045,
  "author": "你的影月月",
  "authorMid": 431073645,
  "authorUrl": "https://space.bilibili.com/431073645",
  "topComments": [
    { "text": "讲得太清楚了，一口气看完！", "author": "学习使我快乐", "likes": 13467, "time": "2026-07-11T09:03:29.000Z" }
  ],
  "danmaku": [
    { "text": "前排学习", "videoTimeSec": 4.09, "sentAt": "2026-07-11T12:04:10.000Z" }
  ],
  "scrapedAt": "2026-07-26T10:00:00.000Z"
}
```

**👤 Creator (UP主) record**

```json
{
  "recordType": "creator",
  "mid": "431073645",
  "name": "你的影月月",
  "spaceUrl": "https://space.bilibili.com/431073645",
  "followers": 10138744,
  "following": 312,
  "videoCount": 2190,
  "totalLikes": 88450231,
  "bio": "攻略在合集观看！商务合作邮箱 jyybiz@qq.com",
  "businessEmail": "jyybiz@qq.com",
  "level": 6,
  "official": "2025百大UP主、知名游戏UP主",
  "avatar": "https://i2.hdslb.com/bfs/face/....jpg",
  "scrapedAt": "2026-07-26T10:00:00.000Z"
}
```

***

### 📊 Field reference & fill rates

Legend: 🟢 almost always present · 🟡 present when available · ⚪ only when you enable the option

#### 🎬 Video fields

| Field | Fill | Description |
|---|:---:|---|
| `bvid` / `aid` / `cid` | 🟢 | Bilibili video identifiers |
| `url` | 🟢 | Canonical video link |
| `title` | 🟢 | Video title |
| `description` | 🟡 | Video description text |
| `cover` | 🟢 | Thumbnail image URL |
| `category` | 🟢 | Bilibili category (分区), e.g. 科技, 游戏, 美食 |
| `durationSeconds` | 🟢 | Length in seconds |
| `publishedAt` | 🟢 | Publish date (ISO 8601) |
| `views` | 🟢 | Play count (播放) |
| `danmakuCount` | 🟢 | Number of danmaku (弹幕) |
| `likes` | 🟢 | Likes (点赞) |
| `coins` | 🟢 | Coins given (投币) |
| `favorites` | 🟢 | Favorites (收藏) |
| `shares` | 🟢 | Shares (分享) |
| `comments` | 🟢 | Comment count (评论) |
| `author` / `authorMid` / `authorUrl` | 🟢 | Creator name, ID and space link |
| `topComments[]` | ⚪ | Top comments — enable **Include comments** |
| `danmaku[]` | ⚪ | Bullet comments — enable **Include danmaku** |

#### 👤 Creator (UP主) fields

| Field | Fill | Description |
|---|:---:|---|
| `name` | 🟢 | Creator display name |
| `followers` | 🟢 | Follower count (粉丝) |
| `following` | 🟢 | Accounts followed |
| `videoCount` | 🟢 | Number of uploads |
| `totalLikes` | 🟢 | Lifetime likes received |
| `bio` | 🟡 | Profile bio / signature (签名) |
| `businessEmail` | 🟡 | Business email detected in the bio — great for outreach |
| `level` | 🟢 | Bilibili level (0–6) |
| `official` | 🟡 | Verification / official title |
| `avatar` / `spaceUrl` | 🟢 | Avatar image and profile link |

#### 💬 Comment & 🌊 danmaku fields

| Field | Belongs to | Description |
|---|---|---|
| `text` | both | Comment / danmaku text |
| `author`, `likes`, `replyCount`, `time` | comment | Author, engagement and timestamp |
| `videoTimeSec`, `sentAt` | danmaku | Position in the video (s) and when it was posted |

***

### 🎯 Who uses this & why

| Persona | What they pull | Why |
|---|---|---|
| 📈 **Market & China researchers** | Videos + metrics by keyword | Track what's trending on B站 and how audiences react |
| 🤝 **Influencer / KOL agencies** | Creator profiles + business emails | Build **UP主 lead lists** and shortlist partners by real reach |
| 🏷️ **Brands & social listening** | Comments + danmaku on branded videos | Measure sentiment and spot issues early |
| 🤖 **AI / ML & NLP teams** | Danmaku + comments in Chinese | Harvest large, authentic Chinese-language datasets |
| 🎬 **Creators & MCNs** | Competitor videos + engagement | Benchmark performance and find content gaps |
| 📊 **Analysts & data teams** | Everything, as CSV/JSON | Feed dashboards, notebooks and databases |

***

### 💡 Use cases

- **Chinese market research** — see which topics, formats and creators win on Bilibili.
- **KOL / influencer discovery** — rank **UP主** by followers, then reach out via the business email in their bio.
- **Brand & sentiment monitoring** — pull **danmaku + comments** on your product videos and competitors'.
- **Trend detection** — snapshot the **trending feed** daily and watch what rises.
- **AI training data** — export authentic Chinese comments and danmaku for NLP, sentiment and LLM work.
- **Content benchmarking** — compare **coins, favorites and danmaku** across videos, not just view counts.
- **Academic & social studies** — study danmaku culture, fandoms and online behavior at scale.

> ⏱️ **Automate it.** Add a **Schedule** to refresh trending videos, a creator watchlist or a keyword every morning — the data lands in your dataset automatically.

***

### ❓ FAQ

<details>
<summary><b>Do I need a Bilibili account, cookies or an API key?</b></summary>

No. The actor works entirely with public data — nothing to register, no login, no cookies to paste. It's a drop-in **Bilibili API alternative**.

</details>

<details>
<summary><b>What is danmaku (弹幕)?</b></summary>

Danmaku are the comments that scroll across the screen *while a video plays* — a defining feature of Bilibili. This actor exports them with their text, their position in the video (in seconds) and when they were posted.

</details>

<details>
<summary><b>Can I search in Chinese?</b></summary>

Yes — search in **English or Chinese** (e.g. `原神`, `美食`, `编程`). Results come back the same way.

</details>

<details>
<summary><b>What can I paste as a video or creator?</b></summary>

For videos: a full URL (`https://www.bilibili.com/video/BV1...`) **or** a bare ID (`BV1...` / `av170001`). For creators: a space URL (`https://space.bilibili.com/123456`) **or** just the numeric ID.

</details>

<details>
<summary><b>How many results can I get?</b></summary>

As many as you like — set **Max videos**, search more pages, or queue many keywords, URLs and creators in one run. Comments and danmaku have their own per-video limits so you stay in control of run size and cost.

</details>

<details>
<summary><b>What export formats are supported?</b></summary>

JSON, CSV, Excel, HTML table and RSS — download from the dataset or pull via the Apify API.

</details>

<details>
<summary><b>Can I run it on a schedule or via API?</b></summary>

Yes. Use Apify **Schedules** to run it automatically, or start it programmatically with the Apify API / SDK and webhooks.

</details>

***

### ⚖️ Legal & responsible use

This tool collects **publicly available** information only — the same data any visitor can see without logging in. It does not access private accounts, bypass paywalls, or collect anything behind authentication.

You are responsible for how you use the data. Please:

- Respect Bilibili's Terms of Service and robots policies.
- Comply with applicable laws, including privacy and data-protection rules (e.g. **GDPR**, **CCPA**, **PIPL**) when handling any personal data such as creator contact details.
- Use collected data lawfully — for research, analytics and legitimate business purposes — and not for spam, harassment or re-identification.

If you're unsure whether your use case is permitted, seek legal advice. This actor is provided for lawful data-collection purposes only.

***

#### 🌏 Also searched as

Bilibili scraper · B站 scraper · 哔哩哔哩 爬虫 · bilibili video scraper · bilibili comments scraper · **danmaku scraper** · 弹幕 scraper · bilibili UP主 scraper · bilibili creator / influencer scraper · bilibili API · bilibili data export · bili bili scraper · Chinese video data

***

*Made for researchers, marketers, agencies and data teams who need Bilibili data without the hassle. Questions or a field you'd like added? Open an issue on the actor's **Issues** tab.*

# Actor input Schema

## `searchKeywords` (type: `array`):

Find videos by keyword — English or Chinese (e.g. "python", "美食", "原神"). One keyword per line.

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

Scrape specific videos. Paste full URLs (https://www.bilibili.com/video/BV1xx...) or bare IDs (BV1xx... / av170001). One per line.

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

Get creator profiles — followers, bio, business email, verification. Paste space URLs (https://space.bilibili.com/123456) or bare IDs. One per line.

## `scrapePopular` (type: `boolean`):

Also pull the current Bilibili trending / popular feed.

## `popularCount` (type: `integer`):

How many trending videos to fetch when the option above is on.

## `includeComments` (type: `boolean`):

Attach the top comments (sorted by likes) to each video.

## `maxCommentsPerVideo` (type: `integer`):

Upper limit of comments collected for each video.

## `includeDanmaku` (type: `boolean`):

Attach danmaku — Bilibili's on-screen bullet comments — with their text and timestamp. Unique to Bilibili.

## `maxDanmakuPerVideo` (type: `integer`):

Upper limit of danmaku collected for each video.

## `searchPages` (type: `integer`):

How many result pages to pull per keyword (~42 videos per page).

## `searchOrder` (type: `string`):

Ordering for keyword search.

## `maxVideos` (type: `integer`):

Overall cap on the number of videos to scrape across all keywords and sources.

## `maxConcurrency` (type: `integer`):

How many videos to enrich in parallel. Higher finishes faster; lower is gentler. Recommended: 6–12.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default (Apify Proxy) works out of the box for every mode. Advanced users can override it.

## Actor input object example

```json
{
  "searchKeywords": [
    "原神",
    "机器学习"
  ],
  "videoUrls": [
    "https://www.bilibili.com/video/BV1GJ411x7h7"
  ],
  "userIds": [
    "https://space.bilibili.com/431073645"
  ],
  "scrapePopular": false,
  "popularCount": 30,
  "includeComments": false,
  "maxCommentsPerVideo": 20,
  "includeDanmaku": false,
  "maxDanmakuPerVideo": 200,
  "searchPages": 2,
  "searchOrder": "totalrank",
  "maxVideos": 200,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

Download every result (JSON, CSV, Excel).

## `runUrl` (type: `string`):

Open this run in the Apify Console.

## `recordType` (type: `string`):

video or creator

## `title` (type: `string`):

Video title

## `author` (type: `string`):

Creator name

## `views` (type: `string`):

Play count

## `danmakuCount` (type: `string`):

Bullet-comment count

## `likes` (type: `string`):

Like count

## `coins` (type: `string`):

Coins given

## `favorites` (type: `string`):

Favorite count

## `comments` (type: `string`):

Reply count

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

Video category

## `publishedAt` (type: `string`):

Publish date

## `url` (type: `string`):

Video URL

## `name` (type: `string`):

Creator name (creator records)

## `followers` (type: `string`):

Follower count

## `businessEmail` (type: `string`):

Business email from bio

## `spaceUrl` (type: `string`):

Creator space URL

## `scrapedAt` (type: `string`):

ISO 8601 timestamp

# 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 = {
    "searchKeywords": [
        "python tutorial"
    ],
    "videoUrls": [],
    "userIds": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "searchKeywords": ["python tutorial"],
    "videoUrls": [],
    "userIds": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "searchKeywords": [
    "python tutorial"
  ],
  "videoUrls": [],
  "userIds": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站)",
        "description": "Scrape Bilibili (B站/哔哩哔哩) without an API key or login. Export videos, engagement stats (views, likes, coins, favorites, danmaku 弹幕), comments and creator/UP主 profiles by keyword, URL or trending feed. A fast Bilibili API alternative for market research, KOL lead-gen and AI datasets. JSON/CSV/Excel.",
        "version": "0.1",
        "x-build-id": "Om82o6SD1nrqTKfxY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/haketa~bilibili-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-haketa-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/haketa~bilibili-scraper/runs": {
            "post": {
                "operationId": "runs-sync-haketa-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/haketa~bilibili-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-haketa-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",
                "properties": {
                    "searchKeywords": {
                        "title": "🔎 Search keywords",
                        "type": "array",
                        "description": "Find videos by keyword — English or Chinese (e.g. \"python\", \"美食\", \"原神\"). One keyword per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoUrls": {
                        "title": "🎬 Video URLs or IDs",
                        "type": "array",
                        "description": "Scrape specific videos. Paste full URLs (https://www.bilibili.com/video/BV1xx...) or bare IDs (BV1xx... / av170001). One per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "userIds": {
                        "title": "👤 Creators (UP主)",
                        "type": "array",
                        "description": "Get creator profiles — followers, bio, business email, verification. Paste space URLs (https://space.bilibili.com/123456) or bare IDs. One per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "scrapePopular": {
                        "title": "🔥 Include trending videos",
                        "type": "boolean",
                        "description": "Also pull the current Bilibili trending / popular feed.",
                        "default": false
                    },
                    "popularCount": {
                        "title": "Number of trending videos",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "How many trending videos to fetch when the option above is on.",
                        "default": 30
                    },
                    "includeComments": {
                        "title": "💬 Include comments",
                        "type": "boolean",
                        "description": "Attach the top comments (sorted by likes) to each video.",
                        "default": false
                    },
                    "maxCommentsPerVideo": {
                        "title": "Max comments per video",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Upper limit of comments collected for each video.",
                        "default": 20
                    },
                    "includeDanmaku": {
                        "title": "🌊 Include danmaku (bullet comments)",
                        "type": "boolean",
                        "description": "Attach danmaku — Bilibili's on-screen bullet comments — with their text and timestamp. Unique to Bilibili.",
                        "default": false
                    },
                    "maxDanmakuPerVideo": {
                        "title": "Max danmaku per video",
                        "minimum": 1,
                        "maximum": 6000,
                        "type": "integer",
                        "description": "Upper limit of danmaku collected for each video.",
                        "default": 200
                    },
                    "searchPages": {
                        "title": "Search pages per keyword",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many result pages to pull per keyword (~42 videos per page).",
                        "default": 2
                    },
                    "searchOrder": {
                        "title": "Sort search results by",
                        "enum": [
                            "totalrank",
                            "click",
                            "pubdate",
                            "dm",
                            "stow"
                        ],
                        "type": "string",
                        "description": "Ordering for keyword search.",
                        "default": "totalrank"
                    },
                    "maxVideos": {
                        "title": "Max videos",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Overall cap on the number of videos to scrape across all keywords and sources.",
                        "default": 200
                    },
                    "maxConcurrency": {
                        "title": "Max concurrent requests",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "How many videos to enrich in parallel. Higher finishes faster; lower is gentler. Recommended: 6–12.",
                        "default": 8
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The default (Apify Proxy) works out of the box for every mode. Advanced users can override it.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
