# Bilibili Scraper 哔哩哔哩 (No Cookie)—Videos, Danmaku & Comments (`axon-studio/bilibili-scraper`) Actor

\[100% No Cookie / No Login — $4.5/1k] All-in-one Bilibili (哔哩哔哩 / B站) API. Extract video search, XML danmaku (弹幕), comments with English IP provinces, UP主 creator uploads (user_videos), profiles, Top 100 rankings & hot search. Auto EN→ZH translation.

- **URL**: https://apify.com/axon-studio/bilibili-scraper.md
- **Developed by:** [Axon Studio](https://apify.com/axon-studio) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.80 / 1,000 item scrapeds

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

Extract videos, real-time XML **danmaku (弹幕)** bullet comments, reader reply threads with English IP province locations, UP creator uploads (`user_videos`), KOL follower profiles, and Top 100 rankings from **Bilibili (哔哩哔哩 / bilibili.com)** — China's premier Gen-Z video, gaming, tech review, and creator platform.

Built for **AI/LLM multimodal training corpora, gaming & consumer tech equity research (alt-data), KOL sponsorship vetting, and automated RAG workflows** (n8n, Make, Dify, Claude MCP). **100% no login, no cookies, and no VPN required.** Users on the **Apify Free plan ($5 monthly credit) can extract up to 1,111 Bilibili records per month for free**.

***

### What Can This Bilibili Scraper Do? (Features)

| Bilibili Scraper Capability | Built-In Advantage |
| :--- | :--- |
| **8 Extraction Modes (100% Cookie-Free)** | Powered by automatic `buvid3` anonymous fingerprinting and a pure-Python **WBI dynamic signature engine** so all 8 modes work out-of-the-box without login. |
| **Complete 7-Metric Engagement Stats** | Automatically enriches `search` and `user_videos` results so every video includes real `views`, `likesCount`, `coinsCount` (投币), `favoritesCount` (收藏), `sharesCount`, `danmakuCount`, and `commentsCount`. |
| **Exclusive KOL Vetting KPIs** | Automatically computes **`coinPerViewRatio`** (real user coin endorsement vs. raw views) and **`engagementRate`** (triple-combo interaction rate) on every video. |
| **XML Danmaku & Peak Minute Detection** | Extracts native bullet comments (`list.so`) and pinpoints the exact **`peakMinute`** (e.g., `"02:00-02:59"`) where viewer reactions reach maximum density. |
| **Creator Uploads (`user_videos`) Without `-352` Blocks** | Uses a 3-stage anti-risk-control fallback engine to extract any UP creator's full uploaded video history by numeric MID or space URL without cookies. |
| **Auto EN ↔ ZH Brand Localization** | Type an English game, brand, or tech keyword (e.g., `Black Myth Wukong`, `Tesla`, `iPhone`) and automatically search both its Chinese and English terms. |
| **IP Province Geolocation (`regionEn`)** | Maps Chinese commenter IP labels (`IP属地：广东`) into standardized English province and country names (`Guangdong`, `Shanghai`, `Beijing`). |
| **256 MB RAM Real-Time Streaming** | Streams records to your Apify Dataset in real-time batches of 10 rows on just **256 MB RAM**, supporting scheduled runs (`deltaMode`) and **JSON, CSV, Excel, or Parquet** exports. |

***

### How to Scrape Bilibili in 3 Easy Steps

1. **Select a `mode`** — Choose from 8 modes (`search`, `popular`, `hot_search`, `video_details`, `video_comments`, `danmaku`, `user_videos`, or `user_profile`).
2. **Enter your target** — Type keywords in **English or Chinese** (e.g., `Black Myth Wukong`, `黑神话悟空`, `Tesla`), or paste Bilibili `BV` video IDs / creator `MID`s.
3. **Click "Start"** — Download your structured Bilibili dataset in **JSON, CSV, Excel, or Parquet**, or connect via REST API, n8n, Make, or Claude MCP.

***

### Bilibili Scraper Use Cases

| Buyer Profile | Bilibili Video & Danmaku Intelligence Use Case |
| :--- | :--- |
| **Gaming, Tech & Consumer Brand Teams** | Monitor product launches, gameplay reviews, EV comparisons (BYD, Xiaomi, Tesla), and smartphone teardowns across China's top video community |
| **KOL & Influencer Marketing Agencies** | Vet Bilibili UP creators using `coinPerViewRatio`, `engagementRate`, `followersCount`, total likes received, and official verification badges |
| **AI / LLM & Multimodal Research Teams** | Collect time-aligned XML danmaku bullet comments (`videoTimeFormatted`), peak reaction minutes (`peakMinute`), and high-like comment threads for SFT and RAG |
| **Hedge Funds & Equity Research Desks** | Track video upload velocity, view momentum, and regional commenter distribution (`regionEn`) on Chinese gaming, ACG, and consumer tickers |

***

### Input

All parameters are configured in the **Input** tab. Below are the 8 extraction modes, the complete input parameter reference table, and JSON input examples:

#### Summary of All 8 Extraction Modes

| Mode | What It Extracts from Bilibili | Primary Input | Cookies Needed? |
| :--- | :--- | :--- | :--- |
| **`search`** | Keyword video search with 6 sort orders, 5 duration filters, date range & full 7-metric stats | `searchQuery` | **No** |
| **`popular`** | Official Bilibili Top 100 Leaderboard (`rank` 1–100) + Popular viral video stream | *None (Click Start)* | **No** |
| **`hot_search`** | Live Top 30 Bilibili Hot Search trending keywords, ranks, heat scores & badges | *None (Click Start)* | **No** |
| **`video_details`** | Deep single/batch video metrics: views, likes, coins, favorites, shares, tags & KPIs | `videoIds` | **No** |
| **`video_comments`** | Video comment threads, like counts, user levels (`LV0–LV6`) & English IP provinces (`regionEn`) | `videoIds` | **No** |
| **`danmaku`** | XML bullet comments with exact video timestamps (`02:05`), peak minute & keyword filtering | `videoIds` | **No** |
| **`user_videos`** | Full uploaded video history and 7-metric stats for any Bilibili creator (`mid`) | `userIds` | **No** |
| **`user_profile`** | UP creator profile: followers, following, total uploads, cumulative likes, verification & bio | `userIds` | **No** |

#### Complete Input Parameters Reference

| Input Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| **`mode`** | `string` | `"search"` | Extraction mode: `"search"`, `"popular"`, `"hot_search"`, `"video_details"`, `"video_comments"`, `"danmaku"`, `"user_videos"`, or `"user_profile"`. |
| **`maxResults`** | `integer` | `30` | Maximum number of primary records to return (`1` to `10,000`). |
| **`searchQuery`** | `array` | `["黑神话悟空"]` | Keywords in English or Chinese for `search` mode (or auto-discovery fallback). |
| **`searchOrder`** | `string` | `"totalrank"` | Sort order for `search`: `"totalrank"` (Relevance), `"click"` (Most views), `"pubdate"` (Newest), `"dm"` (Most danmaku), `"stow"` (Most favorites), `"scores"` (Most comments). |
| **`durationFilter`** | `string` | `"0"` | Video duration filter: `"0"` (Any), `"1"` (<10m), `"2"` (10–30m), `"3"` (30–60m), `"4"` (>60m). |
| **`dateStart` / `dateEnd`** | `string` | `""` | Optional publication date filter (`YYYY-MM-DD`). |
| **`autoLocalize`** | `boolean` | `true` | Automatically translates English keywords or brand names into Simplified Chinese. |
| **`videoIds`** | `array` | `["BV1r94y1H77U"]` | Target Bilibili BV IDs, av numbers, or video URLs for `video_details`, `video_comments`, and `danmaku`. |
| **`userIds`** | `array` | `["946974"]` | Target creator numeric MIDs or `space.bilibili.com/{mid}` URLs for `user_videos` and `user_profile`. |
| **`danmakuKeyword`** | `string` | `""` | Optional keyword filter to extract specific bullet comments in `danmaku` mode. |
| **`scrapeComments`** | `boolean` | `false` | Cascade add-on: automatically extracts top `maxCommentsPerVideo` comments for each video (billed per row). |
| **`maxCommentsPerVideo`** | `integer` | `10` | Maximum comments to extract per video when `scrapeComments` is enabled (`1` to `100`). |
| **`scrapeDanmaku`** | `boolean` | `false` | Inline enrichment: attaches `peakMinute` and `danmakuSamples` directly onto each video row at zero extra row cost. |
| **`maxDanmakuPerVideo`** | `integer` | `20` | Number of representative bullet comments to attach when `scrapeDanmaku` is enabled (`1` to `100`). |
| **`includeCreatorProfiles`** | `boolean` | `false` | Cascade add-on: emits 1 `user_profile` row per unique UP creator discovered (billed per row). |
| **`deltaMode`** | `boolean` | `false` | Skips previously scraped IDs across scheduled runs so you only pay for brand-new items. |

#### 1. Bilibili Video Search + Inline Danmaku & Cascade Comments (JSON)

```json
{
  "mode": "search",
  "searchQuery": ["Black Myth Wukong"],
  "searchOrder": "click",
  "durationFilter": "0",
  "dateStart": "2024-08-20",
  "autoLocalize": true,
  "maxResults": 30,
  "scrapeDanmaku": true,
  "maxDanmakuPerVideo": 15,
  "scrapeComments": true,
  "maxCommentsPerVideo": 10
}
```

#### 2. Creator Uploaded Videos — No Cookie Needed (JSON)

```json
{
  "mode": "user_videos",
  "userIds": ["946974"],
  "maxResults": 50,
  "scrapeDanmaku": false
}
```

#### 3. Standalone XML Danmaku Extraction (JSON)

```json
{
  "mode": "danmaku",
  "videoIds": ["BV1r94y1H77U"],
  "danmakuKeyword": "",
  "maxResults": 100
}
```

***

### Output

All scraped records are stored in your Apify **Dataset** and can be exported to JSON, CSV, Excel, XML, or Parquet. Below are sample JSON outputs matching the `"Black Myth Wukong"` (`BV1r94y1H77U`) and creator `"946974"` inputs above:

#### 1. Video Row (`search`, `popular`, `video_details`, `user_videos`)

```json
{
  "mode": "search",
  "bvid": "BV1r94y1H77U",
  "aid": 1130123456,
  "cid": 1612345678,
  "title": "《黑神话：悟空》最终预告 | 8月20日，重走西游",
  "text": "实机录制，包含全新战斗演示与关卡首领。",
  "description": "实机录制，包含全新战斗演示与关卡首领。",
  "authorName": "黑神话之悟空",
  "authorId": "642389251",
  "authorAvatar": "https://i0.hdslb.com/bfs/face/example.jpg",
  "views": 18520000,
  "likesCount": 1920000,
  "coinsCount": 1680000,
  "favoritesCount": 1150000,
  "sharesCount": 640000,
  "danmakuCount": 312000,
  "commentsCount": 148000,
  "coinPerViewRatio": 0.0907,
  "engagementRate": 0.291,
  "duration": 296,
  "videoTimeFormatted": "04:56",
  "category": "单机游戏",
  "tags": ["黑神话悟空", "国产游戏", "动作游戏"],
  "peakMinute": "02:00-02:59",
  "danmakuSamples": [
    "[02:05] 前方高能！四大天王压迫感绝了！",
    "[02:18] 这演出水准真是国产3A天花板"
  ],
  "coverUrl": "https://i0.hdslb.com/bfs/archive/example.jpg",
  "videoUrl": "https://www.bilibili.com/video/BV1r94y1H77U",
  "authorUrl": "https://space.bilibili.com/642389251",
  "createdAtIso": "2024-08-08T02:00:00Z",
  "scrapedAtIso": "2026-10-26T10:30:00Z",
  "searchQuery": "Black Myth Wukong",
  "searchOrder": "click"
}
```

#### 2. Comment Row (`video_comments`) & Danmaku Row (`danmaku`)

```json
{
  "mode": "video_comments",
  "commentId": "238910456789",
  "bvid": "BV1r94y1H77U",
  "aid": 1130123456,
  "text": "真正国产3A神作，美术和打击感太硬核了，直接一键三连支持！",
  "authorName": "天命人_0820",
  "authorId": "38192011",
  "authorLevel": 6,
  "likesCount": 15420,
  "repliesCount": 312,
  "regionName": "广东",
  "regionEn": "Guangdong",
  "isPinned": true,
  "upLiked": true,
  "videoUrl": "https://www.bilibili.com/video/BV1r94y1H77U",
  "createdAtIso": "2024-08-20T04:15:12Z",
  "scrapedAtIso": "2026-10-26T10:30:02Z"
}
```

#### 3. Creator Profile Row (`user_profile`)

```json
{
  "mode": "user_profile",
  "authorId": "946974",
  "authorName": "影视飓风",
  "title": "影视飓风",
  "text": "无限进步！商务合作请联系：bd@mediastorm.cn",
  "authorLevel": 6,
  "followersCount": 11250000,
  "followingCount": 412,
  "videosCount": 685,
  "likesCount": 98400000,
  "officialVerify": "bilibili 2023百大UP主、知名科技UP主",
  "vipLabel": "年度大会员",
  "authorUrl": "https://space.bilibili.com/946974",
  "scrapedAtIso": "2026-10-26T10:30:05Z"
}
```

#### Output Field Definitions

- **`bvid` / `aid` / `cid`**: Unique Bilibili alphanumeric BV ID, numeric archive ID, and video player cid.
- **`views` / `likesCount` / `coinsCount` / `favoritesCount` / `sharesCount`**: Complete playback and One-Click Triple Combo engagement counts.
- **`coinPerViewRatio` / `engagementRate`**: Derived KOL quality metrics measuring coin endorsement per view and overall interaction rate.
- **`peakMinute` / `danmakuSamples`**: The 1-minute window with the highest bullet-comment density and sampled bullet strings.
- **`regionName` / `regionEn`**: Commenter's IP location mapped to standardized English province/country names.
- **`followersCount` / `videosCount` / `officialVerify`**: Creator follower count, total uploaded videos, and verification badge.

***

### Automated Daily Bilibili Monitoring (Schedules & Delta Mode)

Set up a **24/7 automated Bilibili brand or creator monitor** in 2 minutes:

1. Run the Actor once with your desired `search`, `user_videos`, or `video_comments` configuration.
2. Go to **Apify Console → Schedules → Create new schedule**, select **`axon-studio/bilibili-scraper`**, and choose an interval (e.g., hourly or daily).
3. Enable **`deltaMode: true`**. The Actor persists scraped `bvid`, `commentId`, and `danmakuId` records in your Key-Value Store and skips old items on future runs—so you only pay for brand-new uploads or comments.

#### Python, JavaScript & Synchronous REST API Integration

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("axon-studio/bilibili-scraper").call(run_input={
    "mode": "search",
    "searchQuery": ["Black Myth Wukong"],
    "searchOrder": "click",
    "maxResults": 30,
    "scrapeDanmaku": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("bvid"), item.get("views"), item.get("coinsCount"), item.get("title"))
```

```bash
curl -X POST "https://api.apify.com/v2/acts/axon-studio~bilibili-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"search","searchQuery":["Black Myth Wukong"],"maxResults":20}'
```

***

### How Much Does It Cost to Scrape Bilibili? (Pricing)

**$4.50 per 1,000 results (`$0.0045` per item) + `$0.02` per Actor start (Pay-Per-Event)**

- **Free Plan Credits**: Every Apify account includes **$5.00 in free monthly credits**, covering up to **1,111 Bilibili videos, comments, danmaku, or creator profiles every month for free**.
- **Volume Discounts**: Automatic lower unit prices for Apify **Bronze / Starter**, **Silver / Scale**, and **Gold / Business** plan subscribers.
- **Free Inline Danmaku Samples**: Enabling `scrapeDanmaku: true` in video modes attaches `peakMinute` and `danmakuSamples` directly onto each video row at zero extra item cost.
- **Typical Run Costs**: 30 Hot Search topics = **`$0.155`** · 100 Search or Creator Videos = **`$0.47`** · 200 Video Comments or Danmaku = **`$0.92`**.

***

### FAQ & Legal Compliance

#### Do I need a Bilibili account or `SESSDATA` cookie?

**No.** The Actor automatically generates anonymous `buvid3`/`buvid4` browser fingerprints and signs requests with Bilibili's WBI algorithm out of the box.

#### Is it legal to scrape public Bilibili data?

This Actor extracts publicly available metadata, comments, and danmaku visible to any unauthenticated visitor on `bilibili.com` and does not access private user accounts. Under **GDPR** and **PIPL**, ensure you have a lawful basis for market research or NLP analytics. *Not affiliated with Bilibili Inc.*

***

### More Chinese Social Intelligence Scrapers by Axon Studio

- **[Weibo Scraper 微博 (No Cookie) — Search, Posts, Comments & BlackCat](https://apify.com/axon-studio/weibo-scraper)** — 9-mode Sina Weibo & BlackCat social listening suite.
- **[BlackCat Scraper 黑猫投诉 — China Consumer Complaints API](https://apify.com/axon-studio/blackcat-complaints-scraper)** — Extract consumer disputes and brand complaints from `tousu.sina.com.cn`.
- **[Weibo User Posts & Profile Scraper (100% No Cookie)](https://apify.com/axon-studio/weibo-user-posts-scraper)** — Extract Weibo creator timelines and KOL follower profiles without login.
- **[Weibo Comments & Province Geolocation Scraper](https://apify.com/axon-studio/weibo-comments-scraper)** — Extract Weibo comment threads and English IP province locations (`regionEn`).

# Actor input Schema

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

Choose what type of Bilibili data to scrape.

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

Maximum number of primary items to scrape for the selected mode (1 - 10,000). Cascade add-on items (comments, creator profiles) are billed separately without consuming this primary quota.

## `searchQuery` (type: `array`):

One or more search keywords (Chinese or English, e.g., '黑神话悟空', 'Black Myth Wukong', 'BYD', 'DeepSeek').

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

Sorting order for Bilibili video search results.

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

Filter search results by video length.

## `dateStart` (type: `string`):

Optional earliest publication date filter in YYYY-MM-DD format (e.g., '2024-08-20'). Leave empty for no lower bound.

## `dateEnd` (type: `string`):

Optional latest publication date filter in YYYY-MM-DD format (e.g., '2026-12-31'). Leave empty for no upper bound.

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

Automatically expand English brand/topic queries into native Chinese keywords via built-in brand dictionary and keyless translation so you capture maximum Bilibili volume.

## `videoIds` (type: `array`):

List of Bilibili BV IDs (e.g., 'BV1r94y1H77U'), av numbers (e.g., 'av170001'), or full URLs ('https://www.bilibili.com/video/BV1r94y1H77U'). Used in 'video_details', 'video_comments', and 'danmaku' modes.

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

List of Bilibili creator numeric MIDs (e.g., '946974' for MediaStorm 影视飓风) or space URLs ('https://space.bilibili.com/946974'). Used in 'user_videos' and 'user_profile' modes.

## `danmakuKeyword` (type: `string`):

In standalone 'danmaku' mode, optionally filter bullet comments containing this substring. When empty, the scraper samples representative bullets across the highest-density peak minutes and full video timeline.

## `scrapeComments` (type: `boolean`):

When enabled, automatically scrape top comments (with IP province geolocation) for every video discovered. Each comment is pushed & billed as a standalone 'video_comments' row.

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

Number of top comments to extract per video when 'scrapeComments' is enabled.

## `scrapeDanmaku` (type: `boolean`):

When enabled in video modes ('search', 'popular', 'user_videos', 'video_details'), parses the video's XML danmaku to attach 'peakMinute' (e.g. '02:00-02:59') and 'danmakuSamples' (representative bullets across peak minutes) directly onto the video record at zero extra row cost.

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

Number of representative bullet comment samples to attach to each video record when 'scrapeDanmaku' is enabled.

## `includeCreatorProfiles` (type: `boolean`):

When enabled, automatically fetch the full creator profile (followers count, total likes, verification badge, bio, level) once per unique UP creator discovered.

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

Persist seen IDs in a named Key-Value Store ('bilibili-scraper-delta') across runs and skip items that were already delivered in earlier runs.

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

Custom identifier for the Delta state bucket when running multiple independent schedules.

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

Optional proxy settings. The scraper works out-of-the-box without proxies using its built-in buvid3 fingerprint & WBI signature engine.

## Actor input object example

```json
{
  "mode": "search",
  "maxResults": 30,
  "searchQuery": [
    "黑神话悟空"
  ],
  "searchOrder": "totalrank",
  "durationFilter": "0",
  "dateStart": "",
  "dateEnd": "",
  "autoLocalize": true,
  "videoIds": [
    "BV1r94y1H77U"
  ],
  "userIds": [
    "946974"
  ],
  "danmakuKeyword": "",
  "scrapeComments": false,
  "maxCommentsPerVideo": 10,
  "scrapeDanmaku": false,
  "maxDanmakuPerVideo": 20,
  "includeCreatorProfiles": false,
  "deltaMode": false,
  "deltaStateKey": "default_monitor",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "searchQuery": [
        "黑神话悟空"
    ],
    "videoIds": [
        "BV1r94y1H77U"
    ],
    "userIds": [
        "946974"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("axon-studio/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": ["黑神话悟空"],
    "videoIds": ["BV1r94y1H77U"],
    "userIds": ["946974"],
}

# Run the Actor and wait for it to finish
run = client.actor("axon-studio/bilibili-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 '{
  "searchQuery": [
    "黑神话悟空"
  ],
  "videoIds": [
    "BV1r94y1H77U"
  ],
  "userIds": [
    "946974"
  ]
}' |
apify call axon-studio/bilibili-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axon-studio/bilibili-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/KaEAXHjVVbgxYrQjg/builds/DEEDnGt1qPdxZYRoY/openapi.json
