# Bilibili Scraper — Videos, Search, Creators & Danmaku (`qilu/bilibili-no-login-scraper`) Actor

Scrape Bilibili trending videos, category rankings, keyword search, creator profiles & uploads, video details, top comments, and danmaku (bullet comments) without login or cookies. Direct signed HTTP API, zero browser overhead.

- **URL**: https://apify.com/qilu/bilibili-no-login-scraper.md
- **Developed by:** [Qilu Zhang](https://apify.com/qilu) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 bilibili video records

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, Search, Creators, Comments & Danmaku (No Login)

Fast, reliable, **zero-login** data extraction for **Bilibili (哔哩哔哩)** — powered directly by Bilibili's signed public APIs with automatic guest session handling.

- **No login, no cookies, no QR code scanning** — click **Start** and get clean JSON/CSV data immediately.
- **Zero browser overhead** — lightweight signed HTTP requests run on 256 MB memory and finish in seconds.
- **Built for China market intelligence, brand monitoring, influencer discovery, academic research, and AI pipelines**.

***

### Key Features

1. **Trending & Top 100 Category Rankings (`mode: "trending"`)**
   Scrape Bilibili's Popular hot feed or Top 100 rankings across 14 categories (All, Animation, Music, Gaming, Knowledge, Tech, Automotive, Lifestyle, Food, Entertainment, Film & TV, and more).
2. **Keyword Video Search (`mode: "search"`)**
   Search any Chinese or English keyword (e.g. `AI`, `新能源汽车`, `黑神话悟空`, `iPhone`) with sorting by relevance, most viewed, newest, most danmaku, or most favorited.
3. **Creator (UP主) Profile & Uploads (`mode: "creator"`)**
   Pass numeric UIDs or `space.bilibili.com/{uid}` URLs to extract creator follower counts, bio, total video count, and latest/most-viewed uploads.
4. **Specific Video Details (`mode: "videos"`)**
   Pass BV IDs or video URLs to get full engagement metrics (views, likes, coins, favorites, shares, danmaku count, comments count), tags, and creator stats.
5. **Optional Top Comments & Timestamped Danmaku (`includeComments`, `includeDanmaku`)**
   Attach top-liked comments and timestamped bullet-screen danmaku (`videoTimeSec` + `text`) to any scraped video.

***

### Pricing (Pay-Per-Event)

| Event | Price | Description |
| :--- | :--- | :--- |
| `video-record` | **$0.003 / video** ($3.00 per 1,000) | One Bilibili video record with full engagement metrics & creator info |
| `comment-record` | **$0.001 / comment** ($1.00 per 1,000) | Optional add-on per comment when `includeComments` is enabled |
| `danmaku-batch` | **$0.005 / video** ($5.00 per 1,000) | Optional add-on per video when `includeDanmaku` is enabled |

> Free Apify accounts can preview up to **20 videos** per run. Paid Apify plans unlock up to **2,000 videos** per run. Empty searches and errors are **100% free**.

***

### Input Examples

#### 1. Trending Hot Videos (Default)

```json
{
  "mode": "trending",
  "trendingType": "popular",
  "maxItems": 25
}
```

#### 2. Keyword Search with Top Comments & Danmaku

```json
{
  "mode": "search",
  "searchQuery": "AI",
  "searchOrder": "click",
  "includeComments": true,
  "maxCommentsPerVideo": 15,
  "includeDanmaku": true,
  "maxDanmakuPerVideo": 100,
  "maxItems": 30
}
```

#### 3. Scrape a Creator's Latest Uploads

```json
{
  "mode": "creator",
  "creatorIds": ["https://space.bilibili.com/946974"],
  "creatorVideoOrder": "pubdate",
  "maxItems": 30
}
```

***

### Sample Output

```json
{
  "recordType": "video",
  "source": "popular",
  "bvid": "BV1rryhzDEy8",
  "aid": "117654136297208",
  "cid": "43750131546",
  "title": "Example Video Title",
  "category": "Tech",
  "authorName": "影视飓风",
  "authorMid": "946974",
  "authorUrl": "https://space.bilibili.com/946974",
  "views": 1634837,
  "likes": 62359,
  "coins": 593,
  "favorites": 10277,
  "shares": 996,
  "danmakuCount": 943,
  "commentsCount": 1789,
  "durationSec": 485,
  "publishedAt": "2026-11-22T10:00:00Z",
  "url": "https://www.bilibili.com/video/BV1rryhzDEy8",
  "scrapedAt": "2026-11-23T14:20:00Z"
}
```

# Actor input Schema

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

Choose what to scrape from Bilibili: trending/rankings, keyword search, creator videos, or specific video URLs/BV IDs.

## `trendingType` (type: `string`):

Used in 'trending' mode. 'popular' paginates Bilibili's hot feed; 'ranking' fetches the Top 100 leaderboard for the chosen category.

## `rankingCategory` (type: `string`):

Used when mode='trending' and trendingType='ranking'.

## `searchQuery` (type: `string`):

Used in 'search' mode. Supports Chinese or English keywords (e.g. 'AI', '新能源汽车', '黑神话悟空', 'iPhone').

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

Used in 'search' mode.

## `creatorIds` (type: `array`):

Used in 'creator' mode. Enter numeric UIDs (e.g. '946974') or profile URLs ('https://space.bilibili.com/946974').

## `creatorVideoOrder` (type: `string`):

Used in 'creator' mode.

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

Used in 'videos' mode. Enter BV IDs (e.g. 'BV1rryhzDEy8') or full video URLs ('https://www.bilibili.com/video/BV1rryhzDEy8').

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

Fetch top-liked comments for each scraped video.

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

Maximum number of top comments to attach per video when Include Top Comments is enabled.

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

Fetch timestamped danmaku (bullet comments) from each video's XML feed.

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

Maximum number of danmaku items to keep per video when Include Danmaku is enabled.

## `maxItems` (type: `integer`):

Maximum number of videos to extract. Free Apify plans are capped at 20 preview items.

## Actor input object example

```json
{
  "mode": "trending",
  "trendingType": "popular",
  "rankingCategory": "all",
  "searchQuery": "",
  "searchOrder": "totalrank",
  "creatorIds": [
    "946974"
  ],
  "creatorVideoOrder": "pubdate",
  "videoUrls": [],
  "includeComments": false,
  "maxCommentsPerVideo": 20,
  "includeDanmaku": false,
  "maxDanmakuPerVideo": 200,
  "maxItems": 25
}
```

# Actor output Schema

## `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 = {
    "mode": "trending",
    "trendingType": "popular",
    "includeComments": false,
    "includeDanmaku": false,
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("qilu/bilibili-no-login-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 = {
    "mode": "trending",
    "trendingType": "popular",
    "includeComments": False,
    "includeDanmaku": False,
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("qilu/bilibili-no-login-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 '{
  "mode": "trending",
  "trendingType": "popular",
  "includeComments": false,
  "includeDanmaku": false,
  "maxItems": 25
}' |
apify call qilu/bilibili-no-login-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,qilu/bilibili-no-login-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/MejEBNowxNh4djb7H/builds/hxxZ95gAhZi6jqgQv/openapi.json
