# Bilibili Scraper — Videos, Views, Comments & Uploaders (B站) (`intelscrape/bilibili-scraper`) Actor

Bilibili Scraper (B站): search by keyword, video URL/BV id, uploader or popular feed and export views, likes, coins, favorites, shares, danmaku and comment counts, tags, uploader data and visible comments. No login, no cookies. JSON, CSV, Excel or API. Pay per result.

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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, Views, Comments & Uploaders (B站)

![Bilibili Scraper — Videos, Views, Comments & Uploaders (B站)](https://api.apify.com/v2/key-value-stores/hRabN9WfDGrT4nSvV/records/bilibili-scraper-banner.png)

🇨🇳 **B站数据采集器**：按关键词、视频链接/BV号、UP主或热门榜抓取哔哩哔哩视频的播放、点赞、投币、收藏、分享、弹幕数、标签以及评论。无需登录、无需Cookie，按结果付费，支持 JSON / CSV / Excel / API 导出。

🇸🇬 **Pengikis Bilibili**: dapatkan tontonan, suka, syiling, kegemaran, kongsi, kiraan danmaku, tag, data pemuat naik dan komen video Bilibili mengikut kata kunci, URL, saluran atau senarai popular. Tiada log masuk. Bayar hanya untuk hasil yang diterima.

#### 🤖 NEW: Connect This To Your AI!

Use this actor from Claude, ChatGPT, Cursor or any MCP client through the **[IntelScrape MCP Server](https://apify.com/intelscrape/skip--trace)**, or call it directly over the Apify API.

#### 🏆 Featured Bots by IntelScrape

- [Skip Trace Pro](https://apify.com/intelscrape/skip-trace-pro)
- [TruePeopleSearch Scraper](https://apify.com/intelscrape/truepeoplesearch-scraper)
- [TikTok Email Scraper](https://apify.com/intelscrape/tiktok-scraper)
- [Amazon Product Reviews Scraper](https://apify.com/intelscrape/amazon-product-review-scraper)
- [Website Contact Scraper](https://apify.com/intelscrape/contact-info-scraper)
- [Skip Trace MCP Server](https://apify.com/intelscrape/skip--trace)

⚡ Works with n8n, Make, Zapier, Google Sheets and the Apify API.

![price](https://img.shields.io/badge/price-%244%20per%201K%20videos-blue) ![comments](https://img.shields.io/badge/comments-%241%20per%201K-blue) ![billing](https://img.shields.io/badge/billing-pay%20per%20result-green) ![login](https://img.shields.io/badge/login-not%20required-brightgreen)

**Bilibili video performance data at scale: one clean row per video plus visible comments, with no account, no cookies and no ban risk.**

> **Honest coverage & billing:** Public data only; the actor never logs in. You pay only for results actually delivered, and a built-in cost guard stops the run at your max-charge limit.

🌍 Built for teams in the **US, China and Singapore**, and anyone who needs this data in a spreadsheet or pipeline.

⭐ Found it useful? Please leave a review; it helps others find it.

⚖️ **Lawful business use only.** Collect public data only, and comply with the source site's terms, copyright and data-protection laws (GDPR, CCPA, China PIPL, Singapore PDPA).

*Examples below are illustrative; names and values may be fictional or out of date.*

### What is Bilibili Scraper?

Bilibili (B站) is China's biggest video community for Gen Z, anime, gaming, tech and education, with no official public data export. **Bilibili Scraper** turns any keyword, video, uploader or the popular feed into clean, analysis-ready rows: views, likes, coins, favorites, shares, danmaku count, tags, uploader profile and the comments a visitor can see, without a Bilibili account.

### What does it do?

- **Keyword search**: search Bilibili in Chinese or English, sorted by relevance, most viewed, newest, most danmaku or most favorited
- **Video URLs / BV ids**: full stats for any list of videos
- **Uploader channels**: latest videos from any uploader (mid or space URL)
- **Popular feed (热门)**: what is trending on Bilibili right now
- **Comments (on by default)**: pinned/top comments and reply previews with likes, author level and post time
- **Uploader data**: name, mid, profile URL and avatar on every video row
- **Automatic resilience**: rotates sessions and switches to Apify Proxy if Bilibili rate-limits

### Why choose us over cheaper scrapers?

- **Honest output**: limits are documented, missing data is labeled, never invented
- **Clean, consistent schema** ready for Excel, Sheets, BI tools or an LLM
- **No account risk**: no logins, no cookies
- **Pay per result** with a cost guard; no subscription
- **Maintained by IntelScrape** and fixed fast when the source changes

### Who is it for?

- **China market research**: measure interest in a product, brand or topic among young Chinese consumers
- **Influencer / KOL discovery**: find uploaders who rank for your keywords and compare their views and engagement
- **Brand monitoring**: track videos and comments mentioning your brand or competitors
- **Content strategy**: find which titles, lengths and tags get the most views in your niche
- **Academic and media research**: build datasets of Chinese online video culture
- **Ad and sponsorship due diligence**: check real engagement (likes, coins, favorites) before paying for a placement

### How to use it

#### In Apify Console (no code)

1. Click **Try for free** / **Start**. The form is prefilled with a working example.
2. Change the inputs (see examples below).
3. Click **Start**, then export the results as **JSON, CSV, Excel, XML or HTML**, or open them in Google Sheets.
4. Optional: **Schedule** the actor to run hourly, daily or weekly.

#### Via API

```bash
curl -X POST "https://api.apify.com/v2/acts/intelscrape~bilibili-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "search", "searchQueries": ["python tutorial"], "maxResults": 20, "includeComments": true, "maxCommentsPerVideo": 10}'
```

Or use the official [Apify JavaScript](https://docs.apify.com/api/client/js/) and [Python](https://docs.apify.com/api/client/python/) clients:

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("intelscrape/bilibili-scraper").call(run_input={"mode": "search", "searchQueries": ["python tutorial"], "maxResults": 20, "includeComments": true, "maxCommentsPerVideo": 10})
for item in client.dataset(run["default_dataset_id"]).iterate_items():
    print(item)
```

#### With AI agents (MCP)

Add Apify's MCP server (`https://mcp.apify.com`) or the [IntelScrape MCP Server](https://apify.com/intelscrape/skip--trace) to Claude Desktop, Cursor, ChatGPT or any MCP client, then ask in plain language, e.g. *"Run intelscrape/bilibili-scraper with the default input and summarise the results."*

### Input examples

**Search keywords (default)**

```json
{
  "mode": "search",
  "searchQueries": ["python tutorial"],
  "maxResults": 20,
  "includeComments": true,
  "maxCommentsPerVideo": 10
}
```

**Specific videos**

```json
{
  "mode": "videos",
  "videoUrls": ["https://www.bilibili.com/video/BV1xx411c7mD"],
  "includeComments": true
}
```

**Uploader channel**

```json
{
  "mode": "users",
  "userIds": ["https://space.bilibili.com/546195"],
  "maxResults": 50
}
```

**Popular feed, no comments**

```json
{
  "mode": "popular",
  "maxResults": 100,
  "includeComments": false
}
```

### Output fields

| Field | Description |
|---|---|
| `title` | Video title |
| `url / bvid / aid` | Video link and Bilibili ids |
| `views` | Play count |
| `likes / coins / favorites / shares` | Engagement counters |
| `danmakuCount` | Number of bullet comments (弹幕) |
| `commentCount` | Total comments on the video |
| `durationSec` | Length in seconds |
| `publishedAt` | Publish time (ISO) |
| `tags` | Video tags |
| `uploaderName / uploaderMid / uploaderUrl` | Uploader profile |
| `searchQuery / searchRank` | Which keyword found it and at what rank |
| type = comment rows | text, likes, replyCount, isPinned, authorName, authorLevel, postedAt |

#### Sample output

```json
{
  "type": "video",
  "bvid": "BV1Mshg6REo4",
  "url": "https://www.bilibili.com/video/BV1Mshg6REo4",
  "title": "8.Python",
  "durationSec": 273,
  "publishedAt": "2026-08-25T07:05:50.000Z",
  "views": 2706,
  "likes": 17,
  "coins": 1,
  "favorites": 47,
  "shares": 37,
  "danmakuCount": 0,
  "uploaderName": "郑城_",
  "uploaderUrl": "https://space.bilibili.com/329954990",
  "tags": ["Python", "编程", "学习"],
  "searchQuery": "python tutorial",
  "searchRank": 1
}
```

### Pricing (pay per event)

| Event | When it is charged | Price |
|---|---|---|
| **Actor start** | once per run | $0.002 |
| **Video** | per video row | $0.004 |
| **Comment** | per comment row | $0.001 |

#### Cost examples

| Run | Cost |
|---|---|
| Default run: 1 keyword, 20 videos, up to 10 visible comments each | up to $0.282 (≈ $0.10–$0.28 depending on how many comments Bilibili shows) |
| 500 videos, comments off | $2.002 |
| 1,000 videos + ~5 comments each | ≈ $9.00 |

Platform usage is included in these prices. Set **Max charge per run** in the run options to cap spend; the actor stops cleanly when the limit is reached and keeps everything collected so far.

### FAQ

#### Do I need a Bilibili account or cookies?

No. The actor only uses data Bilibili shows to logged-out visitors. Nothing is ever logged in, so there is no account to get banned.

#### How many comments can I get per video?

Bilibili shows logged-out visitors only the pinned/top comments plus a short reply preview, usually 3–10 per video. That is the honest ceiling. You are charged only for comments actually delivered.

#### Can I turn comments off?

Yes. Set "includeComments": false for video-only runs at $0.004 per video.

#### Can I search in English?

Yes. Bilibili search works in Chinese and English; Chinese keywords usually return more results.

#### How do I get an uploader's videos?

Use "mode": "users" with the uploader's mid (e.g. 546195) or their space.bilibili.com URL.

#### Is there a Bilibili API?

Bilibili has no official public data API for this. This actor is the API: call it over HTTP, schedule it, or plug it into n8n, Make, Zapier or an AI agent.

#### How fresh is the data?

Live: every run reads Bilibili at that moment. Schedule it daily to track view growth over time.

#### Does it download the videos?

No. It exports metadata, stats, cover image URLs and comments, not video files.

#### What if Bilibili rate-limits me?

The actor rotates sessions and falls back to Apify Proxy automatically. Large runs may take longer but keep going.

### Honest limits

- Public data only; the actor never logs in.
- Comments are limited to what logged-out visitors see (pinned/top plus a reply preview, typically 3–10 per video).
- Search ranking is Bilibili's own and can differ slightly between runs.
- Some fields (category name, tags) may be empty when Bilibili does not return them.

### Related IntelScrape bots

- [Weibo Scraper](https://apify.com/intelscrape/weibo-scraper): 微博 hot search, posts, comments
- [TikTok Email Scraper](https://apify.com/intelscrape/tiktok-scraper): creator & influencer leads
- [Google News Scraper](https://apify.com/intelscrape/google-news-scraper): headlines & summaries
- [Keyword Search Volume](https://apify.com/intelscrape/keyword-search-volume): estimated monthly Google searches
- [AI Search Visibility Tracker](https://apify.com/intelscrape/ai-search-visibility-tracker): brand visibility in AI Overviews
- [Skip Trace MCP Server](https://apify.com/intelscrape/skip--trace): IntelScrape tools for AI agents

### Legal

This actor collects publicly available data only. You are responsible for using the results lawfully and in line with the source's terms and applicable privacy laws (GDPR, CCPA, PIPL, PDPA). Process personal data only with a legitimate purpose. IntelScrape is not affiliated with, endorsed by or sponsored by the data source; all trademarks belong to their owners.

# Actor input Schema

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

Choose the input source.

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

Keywords to search on Bilibili (Chinese or English). Used in 'search' mode.

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

Sort order for keyword search.

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

e.g. https://www.bilibili.com/video/BV1xx411c7mD or BV1xx411c7mD. Used in 'videos' mode.

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

e.g. 546195 or https://space.bilibili.com/546195. Used in 'users' mode.

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

Maximum videos per search keyword, per uploader, or in total for URL / popular mode.

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

Also scrape the pinned/top comments and reply previews Bilibili shows to logged-out visitors (typically 3-10 per video). Charged per comment delivered.

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

Only used when comments are enabled.

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

Usually not needed. The actor switches to Apify Proxy automatically if Bilibili rate-limits.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "python tutorial"
  ],
  "sortOrder": "totalrank",
  "maxResults": 20,
  "includeComments": true,
  "maxCommentsPerVideo": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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": [
        "python tutorial"
    ],
    "maxResults": 20,
    "includeComments": true,
    "maxCommentsPerVideo": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("intelscrape/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": ["python tutorial"],
    "maxResults": 20,
    "includeComments": True,
    "maxCommentsPerVideo": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("intelscrape/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": [
    "python tutorial"
  ],
  "maxResults": 20,
  "includeComments": true,
  "maxCommentsPerVideo": 10
}' |
apify call intelscrape/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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