# Bilibili Scraper — Videos, Comments, Danmaku & English (`neronbaez/bilibili-scraper`) Actor

Scrape Bilibili (B站) without login: search, video stats, creators (UP主), trending, comments and danmaku. Optional built-in English translation of titles, tags, comments and danmaku. Clean JSON, from $2 per 1,000 videos.

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

## Pricing

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

### What does Bilibili Scraper do?

Bilibili Scraper extracts public data from **Bilibili (哔哩哔哩, B站)**, China's largest video platform for Gen Z, **without login or cookies**. It gives you clean, English-named JSON for:

- 🔎 **Keyword search**: videos or creators (UP主), sorted by relevance, views, date, danmaku or favorites
- 🎬 **Video details**: views, likes, coins, favorites, shares, comments, danmaku count, tags, duration, publish date and location
- 👤 **Creator profiles**: followers, total likes, video count, verification, plus their latest uploads
- 🔥 **Trending videos** (热门)
- 💬 **Comments**: hot comments with likes, author level and IP location
- 📺 **Danmaku (弹幕)**: the bullet comments that scroll over each video, with timestamp in the video

### 🇬🇧 Built-in English translation

Don't read Chinese? Turn on **Translate to English**. Every title, description, tag, comment and danmaku gets an English version next to the original, at **no extra cost**:

```json
{
  "title": "【A2O】A2O LITE 'NEON' Official Video",
  "tags": ["A2O", "Zalpha Pop", "李秀满新女团", "KPOP回归前线"],
  "tagsEn": ["A2O", "Zalpha Pop", "Lee Soo Man's new girl group", "KPOP returns to the front line"]
}
```

```json
{ "type": "danmaku", "text": "感觉很以前纯正sm味的歌和sm花田", "textEn": "It feels like the pure SM flavor of the songs and SM flower fields." }
```

### Who uses it?

- **Brands & agencies entering China**: find KOLs/UP主 in your niche and compare their reach
- **Market & trend research**: track what Chinese Gen Z watches and talks about
- **Sentiment analysis & AI datasets**: comments and danmaku are real-time audience reactions, timestamped to the second
- **Competitor monitoring**: follow a creator or brand account and get every new upload with stats
- **Academic research** on Chinese social media

### How much does it cost?

You only pay for results you get (pay per event). No monthly rental, and no proxy costs for typical runs.

| Result | Price |
|

### Related Actors

- [Google Maps Scraper](https://apify.com/neronbaez/google-maps-scraper) — Local business leads with emails
- [Instagram & TikTok Scraper](https://apify.com/neronbaez/instagram-tiktok-scraper) — Social media profiles
- [LinkedIn Profile Scraper](https://apify.com/neronbaez/linkedin-profile-scraper) — B2B profiles with emails
- [Facebook Ads Library Scraper](https://apify.com/neronbaez/facebook-ads-library-scraper) — Competitor ad intelligence

\---|

### Related Actors

- [Google Maps Scraper](https://apify.com/neronbaez/google-maps-scraper) — Local business leads with emails
- [Instagram & TikTok Scraper](https://apify.com/neronbaez/instagram-tiktok-scraper) — Social media profiles
- [LinkedIn Profile Scraper](https://apify.com/neronbaez/linkedin-profile-scraper) — B2B profiles with emails
- [Facebook Ads Library Scraper](https://apify.com/neronbaez/facebook-ads-library-scraper) — Competitor ad intelligence

\---|
| Video | $0.002 |
| Creator profile | $0.002 |
| Comment | $0.0005 |
| Danmaku line | $0.0001 |

Example: 1,000 videos with full stats costs **$2**. 10,000 danmaku lines costs **$1**.

🆓 **On Apify's Free plan you can try it practically free** (about $0.01 per 1,000 results). The prices above apply to paid plans.

### Input examples

**Search videos by keyword**

```json
{ "searchQueries": ["人工智能", "iPhone 17"], "sortBy": "click", "maxItemsPerQuery": 200 }
```

**Find creators (KOL discovery)**

```json
{ "searchQueries": ["美妆", "数码"], "searchType": "creators", "maxItemsPerQuery": 100 }
```

**Videos + comments + danmaku for sentiment analysis**

```json
{
  "videoUrls": ["https://www.bilibili.com/video/BV1VVpo6gEYg/"],
  "includeComments": true, "maxCommentsPerVideo": 200,
  "includeDanmaku": true, "maxDanmakuPerVideo": 2000
}
```

**Monitor creators**

```json
{ "creatorUrls": ["https://space.bilibili.com/2", "546195"], "maxVideosPerCreator": 30 }
```

### Output examples

Every item has a `type` field: `video`, `creator`, `comment` or `danmaku`.

**Video**

```json
{
  "type": "video",
  "bvid": "BV1VVpo6gEYg",
  "url": "https://www.bilibili.com/video/BV1VVpo6gEYg",
  "title": "【A2O】A2O LITE 'NEON' Official Video",
  "durationSeconds": 223,
  "publishedAt": "2026-10-12T12:30:00+00:00",
  "category": "音乐",
  "views": 2233111,
  "likes": 104543,
  "coins": 46923,
  "favorites": 37325,
  "shares": 29249,
  "comments": 11704,
  "danmakuCount": 12502,
  "creatorId": 670061998,
  "creatorName": "A2O_WORLD",
  "tags": [
    "A2O",
    "Zalpha Pop",
    "李秀满新女团",
    "A2O LITE",
    "NEON",
    "KPOP回归前线"
  ],
  "isOriginal": true
}
```

**Creator**

```json
{
  "type": "creator",
  "creatorId": 2,
  "url": "https://space.bilibili.com/2",
  "name": "碧诗",
  "followers": 1431852,
  "totalLikes": 5092595,
  "videoCount": 44,
  "verified": true,
  "verificationTitle": "bilibili创始人（站长）"
}
```

**Danmaku**

```json
{ "type": "danmaku", "videoBvid": "BV1VVpo6gEYg", "text": "感觉很以前纯正sm味的歌", "videoTimeSeconds": 126.08, "color": "#e2027f", "sentAt": "2026-10-12T13:45:42+00:00" }
```

### Tips

- **Search results are fast.** Turn on *Fetch full details* only if you need coins, shares and tags for search results.
- **Comments:** Bilibili shows guests only the top ~3 comments per video. To get full threads, paste your own `SESSDATA` cookie in *Advanced*. It is stored as a secret and only used for this run.
- **Large runs (10k+ videos):** enable Apify Proxy (residential) to avoid rate limits. The scraper rotates IPs automatically when Bilibili blocks one.
- Use **Max total items** to cap your spend.

### Is it legal to scrape Bilibili?

This Actor only collects publicly available data that anyone can see without logging in. Personal data is protected by laws such as GDPR and China's PIPL. Do not scrape personal data unless you have a legitimate reason. If unsure, consult a lawyer.

### Need something else?

Open an issue in the **Issues** tab. Feature requests are usually shipped within a few days.

### More China data scrapers

All with English field names, pay-per-result pricing and optional English translation:

- [Bilibili Comments](https://apify.com/neronbaez/bilibili-comments-scraper)
- [Bilibili Danmaku 弹幕](https://apify.com/neronbaez/bilibili-danmaku-scraper)
- [Bilibili Creators UP主](https://apify.com/neronbaez/bilibili-creator-scraper)
- [Bilibili Search](https://apify.com/neronbaez/bilibili-search-scraper)
- [Bilibili Trending](https://apify.com/neronbaez/bilibili-trending-scraper)
- [Bilibili Live 直播](https://apify.com/neronbaez/bilibili-live-scraper)
- [Bilibili Hot Search 热搜](https://apify.com/neronbaez/bilibili-hot-search-scraper)
- [Weibo Scraper (all-in-one)](https://apify.com/neronbaez/weibo-scraper)
- [Weibo Search](https://apify.com/neronbaez/weibo-search-scraper)
- [Weibo User Posts](https://apify.com/neronbaez/weibo-user-posts-scraper)
- [Weibo Comments](https://apify.com/neronbaez/weibo-comments-scraper)
- [Weibo Hot Search 热搜](https://apify.com/neronbaez/weibo-hot-search-scraper)
- [WeChat Articles 公众号](https://apify.com/neronbaez/wechat-article-scraper)
- [China Trending Topics (6 platforms)](https://apify.com/neronbaez/china-trending-scraper)
- [Douyin Hot Search 抖音热榜](https://apify.com/neronbaez/douyin-hot-search-scraper)
- [Baidu Hot Search](https://apify.com/neronbaez/baidu-hot-search-scraper)
- [Zhihu Hot List](https://apify.com/neronbaez/zhihu-hot-list-scraper)

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on Bilibili (Chinese or English).

## `searchType` (type: `string`):

Search for.

## `sortBy` (type: `string`):

Sort video search by.

## `maxItemsPerQuery` (type: `integer`):

Max results per keyword.

## `fetchFullVideoDetails` (type: `boolean`):

Adds coins, shares, tags, publish location and creator avatar to search results. Slower.

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

bilibili.com/video/BV... links, BV IDs or av IDs.

## `creatorUrls` (type: `array`):

space.bilibili.com/123456 links or numeric user IDs (mid).

## `maxVideosPerCreator` (type: `integer`):

Max videos per creator.

## `includeTrending` (type: `boolean`):

Scrape trending (热门) videos.

## `maxTrendingVideos` (type: `integer`):

Max trending videos.

## `rankingCategories` (type: `array`):

Top videos of these categories (Bilibili 排行榜).

## `rankingDays` (type: `string`):

Ranking window.

## `includeTags` (type: `boolean`):

Include video tags.

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

Without a login cookie Bilibili only shows the top 3 comments per video. Add SESSDATA below to get all.

## `includeReplies` (type: `boolean`):

Include comment replies.

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

Max comments per video.

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

Include danmaku (弹幕 bullet comments).

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

Max danmaku per video.

## `maxTotalItems` (type: `integer`):

Max total items (0 = no limit).

## `translateToEnglish` (type: `boolean`):

Adds English translations next to the original Chinese: titleEn, descriptionEn, tagsEn, textEn (comments & danmaku), bioEn. Free, no extra charge.

## `sessdata` (type: `string`):

Optional. Your Bilibili SESSDATA cookie, only needed for full comment threads.

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

Usually not needed. Use residential proxy if you hit rate limits on very large runs.

## Actor input object example

```json
{
  "searchQueries": [
    "人工智能"
  ],
  "searchType": "videos",
  "sortBy": "totalrank",
  "maxItemsPerQuery": 50,
  "fetchFullVideoDetails": false,
  "maxVideosPerCreator": 20,
  "includeTrending": false,
  "maxTrendingVideos": 100,
  "rankingDays": "3",
  "includeTags": true,
  "includeComments": false,
  "includeReplies": false,
  "maxCommentsPerVideo": 100,
  "includeDanmaku": false,
  "maxDanmakuPerVideo": 500,
  "maxTotalItems": 0,
  "translateToEnglish": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items as JSON. Add ?format=csv or ?format=xlsx for other formats.

## `overview` (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 = {
    "searchQueries": [
        "人工智能"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neronbaez/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 = { "searchQueries": ["人工智能"] }

# Run the Actor and wait for it to finish
run = client.actor("neronbaez/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 '{
  "searchQueries": [
    "人工智能"
  ]
}' |
apify call neronbaez/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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