# Bilibili Scraper: Videos, Comments, Danmaku & Creators (B站) (`zaiq/bilibili-scraper`) Actor

Bilibili (哔哩哔哩, B站) data without login: search videos by keyword with plays, likes, danmaku, favorites, comments, duration, tags and date; popular videos; every comment and danmaku of a video; creator profiles. Sort by most played, newest or most danmaku.

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

## Pricing

from $16.00 / 1,000 videos

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

## Bilibili Scraper: videos, comments, danmaku and creators (B站, no login)

![Bilibili Scraper: Videos, Comments, Danmaku & Creators (B站)](https://api.apify.com/v2/key-value-stores/4VJNANhwKgqPpXtAi/records/hero-bilibili-scraper.jpg)

Get **Bilibili (哔哩哔哩, B站) data without an account**: **search videos** by keyword with **plays, likes, danmaku, favorites, comment count, duration, tags, category and publish date**; Bilibili's **popular (热门) videos**; every **comment** and **danmaku (弹幕, on-screen comment)** of a video; and **creator (UP主) profiles** with followers and video counts.

Built for China market research, brand and product monitoring on Chinese social video, influencer discovery and AI datasets. Chinese and English keywords both work; results come back in clean, consistent rows.

### What you get

| Field | What it holds |
|---|---|
| Video rows | `bvid`, `title`, `author`, `plays`, `likes`, `danmaku`, `favorites`, `comments`, `durationSeconds`, `publishedAt`, `category`, `tags`, `description`, `cover`, `url` |
| Popular rows | the same plus `coins`, `shares` and Bilibili's recommendation reason |
| Comment rows | `text`, `author`, `likes`, `replies`, `postedAt`, `location` (IP region shown by Bilibili) |
| Danmaku rows | every on-screen comment of a video part with its time in the video (`t`, seconds) and when it was sent |
| Creator rows | `author`, `followers`, `following`, `videos`, `likesReceived`, `level`, `verified`, `sign`, `avatar` |

### What people use it for

- **China market research:** see what Chinese viewers watch and say about a product, brand or category
- **Influencer discovery:** find the UP主 with the most-played videos for a keyword, then pull their profiles
- **Brand monitoring:** track new videos and comments that mention your brand, every day
- **Content strategy:** sort by most played or most danmaku to see what format works
- **Audience reaction:** danmaku show exactly which second of a video viewers reacted to
- **AI and NLP datasets:** Chinese-language comments and danmaku at scale

### How to use it

1. Add **searches** (Chinese or English), and choose the **sort** and **video length**.
2. Optionally turn on **Popular videos**.
3. For **comments and danmaku**, add **video links** (or BV ids).
4. Add **creator ids** for profiles, then click **Start**.

### Input

| Field | Example | Notes |
|---|---|---|
| Search videos | `美食` (food), `护肤` (skincare) | One per line; Chinese keywords find far more |
| Sort | Most played | Best match, most played, newest, most danmaku, most favorited |
| Video length | Any | Under 10 / 10-30 / 30-60 / over 60 minutes |
| Videos per search | `40` | Up to 1,000 |
| Popular videos | off | Bilibili's 热门 list |
| Video links | `https://www.bilibili.com/video/BV...` | For comments and danmaku |
| Comments per video link | `50` | Up to 5,000 |
| Danmaku | off | All on-screen comments, with timing |
| Creators | `546195` | mid or space.bilibili.com link |

### Output

Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):

```json
{
  "kind": "video",
  "bvid": "BV1xxxxxxxxx",
  "title": "Easy home cooking: 10-minute dinners",
  "author": "ExampleCreator",
  "authorId": 123456,
  "plays": 919018,
  "likes": 45038,
  "danmaku": 1203,
  "favorites": 8100,
  "comments": 640,
  "durationSeconds": 456,
  "publishedAt": "2026-10-10T12:00:00Z",
  "category": "美食",
  "tags": [
    "cooking",
    "recipe",
    "home food"
  ],
  "url": "https://www.bilibili.com/video/BV1xxxxxxxxx",
  "search": "美食",
  "rank": 1
}
```

A record named `SUMMARY` in the run's key-value store says what each input returned, with any notes (for example an account that does not exist), what was charged and how much traffic the run used.

### Pricing

- **$0.02 per video** (search or popular)
- **$0.003 per comment**
- **$0.03 per danmaku file** (all on-screen comments of one video part)
- **$0.02 per creator profile**
- Empty searches, missing videos and refused calls are free

What typical jobs cost at the list price:

| Job | Cost |
|---|---|
| 40 videos for one keyword | $0.80 |
| 20 popular videos | $0.40 |
| 100 comments + danmaku of one video | $0.33 |
| 10 creator profiles | $0.20 |

On Apify's Scale and Business plans the per-event prices are lower (Store discounts). Set **Maximum cost per run** and the Actor stops cleanly when it is reached: you never pay more than that.

### Tips

- Sort by **Most played** and set a length filter to find the format that wins in a category.
- Danmaku are the fastest way to see which moments viewers reacted to: each has its second in the video.
- Search in Chinese for the widest results (e.g. 护肤 for skincare).

### Use it through the API

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zaiq/bilibili-scraper").call(run_input={"searches": ["美食"], "sort": "click", "maxResultsPerSearch": 40})
for row in client.dataset(run.default_dataset_id).iterate_items():
    print(row)
```

**JavaScript**

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('zaiq/bilibili-scraper').call({"searches": ["美食"], "sort": "click", "maxResultsPerSearch": 40});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**HTTP (one call, results back)**

```bash
curl -X POST 'https://api.apify.com/v2/acts/zaiq~bilibili-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"searches": ["美食"], "sort": "click", "maxResultsPerSearch": 40}'
```

### Integrations and schedules

- **Schedules:** run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- **Make, Zapier, n8n, Google Sheets, Slack, Airtable:** connect it through Apify's integrations, or send each finished run to a **webhook**.
- **Datasets:** results stay in the run's dataset; export them or read them by API whenever you need them.

### Use it with AI agents (MCP)

Add Apify's MCP server (`https://mcp.apify.com`) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for "the 40 most played Bilibili videos about electric cars". AI agents can also pay for runs directly through Apify's agentic payments.

### Limits

- Signed out, Bilibili does not show a creator's full upload list or detailed video stats pages: use search to find a creator's videos.
- Bilibili returns up to 1,000 videos (50 pages) for one search.
- Comments: the replies Bilibili shows signed-out visitors, most-liked first.
- Public data only: you are responsible for how you use it under Bilibili's terms and the laws that apply to you, including China's PIPL.

### FAQ

**Do I need a Bilibili account or a Chinese IP?**

No. Public data, read signed out from outside China.

**Can I search in English?**

Yes; Chinese keywords give the widest results.

**What is danmaku?**

Bilibili's on-screen comments (弹幕): viewers' comments pinned to a moment of the video.

**Why do some videos show no danmaku?**

New or small videos may have none; you are not charged.

### Related Actors from Zaiq

- [tiktok-transcript-scraper](https://apify.com/zaiq/tiktok-transcript-scraper): TikTok videos and transcripts
- [google-trends-scraper](https://apify.com/zaiq/google-trends-scraper): how a topic trends on Google and YouTube
- [amazon-product-scraper](https://apify.com/zaiq/amazon-product-scraper): what sells on Amazon in 23 countries

### Support

Questions, a site that changed, or a field you need? Open an issue on this Actor's **Issues** tab: we answer there, usually within a day.

***

Also found as: bilibili scraper, b站 爬虫, bilibili api, bilibili comments, bilibili danmaku, 哔哩哔哩 数据, china social media scraper.

# Actor input Schema

## `searches` (type: `array`):

Keywords to search Bilibili videos for, one per line. Chinese keywords find far more (美食 = food, 护肤 = skincare, 旅行 = travel); English works too.

## `sort` (type: `string`):

Order of search results.

## `duration` (type: `string`):

Only videos of this length (search).

## `maxResultsPerSearch` (type: `integer`):

Bilibili returns up to 1,000 videos (50 pages of 20) for one search.

## `popular` (type: `boolean`):

Also return Bilibili's popular (热门) videos.

## `maxPopular` (type: `integer`):

How many popular videos.

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

Bilibili video links or BV ids, one per line.

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

Top comments of each video link ($0.003 each); 0 = none.

## `danmaku` (type: `boolean`):

All on-screen comments of each video link, with their time in the video ($0.03 per video part).

## `creators` (type: `array`):

Creator ids (mid) or space.bilibili.com links, one per line: their profile.

## Actor input object example

```json
{
  "searches": [
    "美食"
  ],
  "sort": "totalrank",
  "duration": "any",
  "maxResultsPerSearch": 40,
  "popular": false,
  "maxPopular": 20,
  "maxComments": 50,
  "danmaku": false
}
```

# Actor output Schema

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

Dataset: the results.

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

What each input returned, and notes.

# 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 = {
    "searches": [
        "美食"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaiq/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 = { "searches": ["美食"] }

# Run the Actor and wait for it to finish
run = client.actor("zaiq/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 '{
  "searches": [
    "美食"
  ]
}' |
apify call zaiq/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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