# Bilibili Scraper – Videos, Creators, Trending & Danmaku (B站) (`rt-solutions/bilibili-scraper`) Actor

Scrape Bilibili (哔哩哔哩) without login: search videos by keyword, all videos of a creator, creator search, trending & rankings, plus danmaku (bullet comments). Views, likes, coins, favorites, tags, followers. $1.50 per 1,000 results.

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

## Pricing

from $1.05 / 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/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, Creators, Trending & Danmaku (B站 / 哔哩哔哩)

Scrape **Bilibili**, China's largest video platform (the "Chinese YouTube"), **without login, cookies or account**. Get videos by keyword, every video of a creator (UP主), creator search, trending lists and category rankings, plus **danmaku (弹幕 bullet comments)**. Export to JSON, CSV or Excel, or use the API.

### What you can scrape

| Mode | What you get |
|---|---|
| **Search videos by keyword** | title, views, likes, favorites, danmaku count, comments, tags, category, duration, publish date, author, thumbnail |
| **Videos of creators** | creator profile (followers, total likes, video count, verification) + all their videos |
| **Search creators** | creators matching a keyword with followers, videos, level, verified status, bio |
| **Trending & rankings** | "Popular right now" list and Top-100 rankings for 15 categories (gaming, tech, music, food, anime…) with full stats: views, likes, **coins**, **shares**, favorites, comments |
| **Danmaku** (option) | the bullet comments of each video: text, time in the video, date sent |
| **Full stats** (option) | coins, shares, likes, comments and complete tags for searched or creator videos |

### Why this scraper

- ✅ **No login, no cookies to paste** – works out of the box.
- ✅ **More than 1,000 videos per keyword** – Bilibili stops at 1,000 results per search; the scraper splits the search by date automatically and removes duplicates (tested: 2,000 unique videos in under 3 minutes).
- ✅ **Danmaku included** – a unique Bilibili signal for sentiment and audience reactions.
- ✅ **Clean numbers** – durations in seconds, ISO dates, full image URLs, HTML removed from titles.
- ✅ **Low price** – $1.50 per 1,000 results, with discounts on higher Apify plans.

### Use cases

- **Market research in China**: what Chinese audiences watch and say about a brand, product or game.
- **Influencer marketing (KOL)**: find Bilibili creators in a niche, compare followers and engagement.
- **Trend monitoring**: daily trending and category rankings.
- **Sentiment analysis**: danmaku and engagement metrics (coins, likes, favorites).
- **Gaming & anime studios**: track reactions to releases and updates.

### Input example

```json
{
  "mode": "search_videos",
  "keywords": ["原神", "iPhone 17"],
  "sortBy": "views",
  "maxResults": 500,
  "includeDanmaku": true,
  "maxDanmakuPerVideo": 300
}
```

Tip: **Chinese keywords give far more results** (手机 rather than "phone", 美食 rather than "food").

### Output example

```json
{
  "type": "video",
  "bvid": "BV1Xop163ETX",
  "title": "【原神】7.2前瞻直播！…",
  "url": "https://www.bilibili.com/video/BV1Xop163ETX",
  "author": "游戏大猪猪",
  "authorId": 574115689,
  "category": "手机游戏",
  "tags": ["原神7.2卡池", "原神新角色前瞻爆料"],
  "views": 473828,
  "likes": 26875,
  "favorites": 2947,
  "danmakuCount": 685,
  "comments": 1371,
  "durationSec": 148,
  "publishedAt": "2026-10-14T10:43:18.000Z",
  "danmaku": [{ "time": 2.8, "text": "抽新不抽旧", "sentAt": "2026-10-17T16:27:08.000Z" }]
}
```

### Pricing

Pay only for results:

- **$1.50 per 1,000 results** (videos or creators)
- **+ $0.002 per video** with danmaku (only if you turn the option on)
- **+ $0.003 per video** for full stats (only if you turn the option on)

### Notes & limits

- Only public data visible to any visitor is collected. **Comments are not included**: Bilibili shows only 3 comments to visitors without an account.
- Danmaku: Bilibili serves up to a few thousand of the most recent bullet comments per video.
- Be reasonable with volume; the scraper paces its requests.

### Other scrapers by RT Solutions

AliExpress Scraper · App Store & Google Play Reviews + AI Insights · Google News Scraper · Google Ads Transparency Scraper · SEEK Jobs Scraper

### Related scrapers

Other ready-to-use Actors by RT Solutions:

- [Weibo Scraper](https://apify.com/rt-solutions/weibo-scraper)
- [Google News Scraper](https://apify.com/rt-solutions/google-news-scraper)
- [Substack Scraper](https://apify.com/rt-solutions/substack-scraper)

# Actor input Schema

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

Search videos by keyword, get all videos of creators, search creators, or get trending/ranking lists.

## `keywords` (type: `array`):

For video or creator search. Chinese keywords give far more results (e.g. 手机, 原神, 美食).

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

For 'Videos of creators': profile URLs like https://space.bilibili.com/546195 or just the UID 546195.

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

Order of video search results.

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

Filter video search by duration.

## `publishedAfter` (type: `string`):

Only videos published on or after this date (video search).

## `publishedBefore` (type: `string`):

Only videos published on or before this date (video search).

## `trendingCategory` (type: `string`):

For 'Trending & rankings'.

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

Bilibili shows 1,000 videos per search; above that the scraper splits the search by date automatically.

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

Adds the danmaku of each video (text, video time, date). Extra $0.002 per video that has danmaku.

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

Up to a few thousand recent danmaku per video.

## `includeFullStats` (type: `boolean`):

Searched videos lack coins and shares; creator videos only have views. This opens each video page to add likes, coins, shares, favorites, comments, danmaku count and full tags. Extra $0.003 per video. Trending videos already include everything.

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

Apify Proxy is used by default.

## Actor input object example

```json
{
  "mode": "search_videos",
  "keywords": [
    "原神"
  ],
  "sortBy": "relevance",
  "duration": "any",
  "trendingCategory": "all",
  "maxResults": 100,
  "includeDanmaku": false,
  "maxDanmakuPerVideo": 500,
  "includeFullStats": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "keywords": [
        "原神"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rt-solutions/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 = { "keywords": ["原神"] }

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

```

## MCP server setup

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