# Bilibili Video & Comment Scraper — 哔哩哔哩 Search, No Login (`actor-forge/bilibili-scraper`) Actor

Scrape Bilibili (哔哩哔哩) videos without login: keyword search, video URLs/BV ids, and the popular feed. Each video comes with full stats (views, likes, coins, favorites, shares, danmaku, comments), tags and the uploader's follower count. Optional anonymised top comments. $4 per 1,000 videos.

- **URL**: https://apify.com/actor-forge/bilibili-scraper.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (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 $4.00 / 1,000 video results

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 Video & Comment Scraper — 哔哩哔哩 Search, No Login

Scrape Bilibili (哔哩哔哩) videos without login: keyword search, video URLs/BV ids, and the popular feed. Each video comes with full stats (views, likes, coins, favorites, shares, danmaku, comments), tags and the uploader's follower count. Optional anonymised top comments. $4 per 1,000 videos.

Get Bilibili (哔哩哔哩 / B站) video data at scale, the YouTube of China, with **no login, no cookies and nothing to configure**. This Bilibili scraper/API takes keywords, video URLs/BV ids, or the live popular feed (热门). It returns every video with its full engagement stats: views, likes, coins (投币), favorites, shares, danmaku (弹幕) count and comment count, plus tags, category, duration, publish time, cover image, and the uploader's channel and follower count. Optionally it attaches a sample of top comments, anonymised. Use it for China influencer and KOL discovery, brand and campaign monitoring, competitor content research, gaming and anime trend analysis, or as a Bilibili tool for AI agents. Handles Bilibili's request signing and anti-bot checks for you. **Roughly 5× cheaper** than the alternatives.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| bvid | title | views | likes | coins | danmakuCount | uploaderName | uploaderFollowers | tags |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| BV17x411w7KC | 【MV】保加利亚妖王AZIS视频合辑 | 45826694 | 943353 | 295002 | 915679 | 冰封.虾子 | 62936 | 保加利亚妖王, azis, mv … |
| BV1MHJB63Emv | 不是 AI 特效！这才是《中国功夫》的魅力！ | 1638241 | 180301 | 75203 | 1987 | 含亮老师 | 1647453 | 武术, 功夫, 传统武术 … |
| BV1j5nj68E48 | 【英雄联盟】K/DA官方MV - “FIRESTARTER（燃）”正式上线 | 578582 | 38951 | 32581 | 2308 | 英雄联盟 | 3020945 | 英雄联盟, LOL, 英雄联盟音乐赛季 … |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `video-result` | $0.004 | per video delivered (full stats, tags and uploader followers included) | 100 videos = $0.40; 1,000 videos = $4.00 |
| `comment-result` | $0.0005 | per anonymised comment (only when Include top comments is on) | 100 videos with ~60 comments each ≈ 6,000 comments = $3.00 (+ $0.40 for the videos) |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at up to 1 GB = $0.00005 (charged as one event) |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `searchTerms` | array | no | — | Keyword video search, Chinese or English (e.g. '原神', 'iPhone 17 review'). Each term returns up to Max videos. |
| `videoUrls` | array | no | — | Specific videos: bilibili.com/video/BV… URLs, BV ids or av ids. Unavailable or deleted videos are skipped and never charged. |
| `includePopular` | boolean | no | `false` | Also fetch Bilibili's current popular/trending videos (热门), up to Max videos. |
| `maxVideos` | integer | no | `20` | Stop after this many videos per term (and for the popular feed). You pay per video: 100 videos = $0.40. |
| `sortBy` | string | no | `"totalrank"` | How search results are ordered. |
| `includeComments` | boolean | no | `false` | Attach a sample of top and newest comments with replies (about 60 per video): text, time and likes only. Commenter names and IDs are never returned. $0.50 per 1,000 comments. |

### Limits & honest notes

- Public data only, no login: videos, stats and channel info that any visitor can see.
- Comments are a SAMPLE, not the full thread. Without a login Bilibili shows guests only a few top and newest comment threads, about 60 comments per video including replies. Commenter names, user IDs and avatars are never returned, only text, time and likes.
- Subtitles/CC tracks and the ranking chart (排行榜) need a logged-in account on Bilibili, so they are not included. Use the popular feed for trending videos.
- Keyword search returns up to 1,000 results per term (Bilibili's own cap: 50 pages × 20).
- Search rows are enriched with a per-video detail lookup. If that lookup fails, the video is still delivered with search-level stats (coins, shares and uploader followers are null).
- Deleted, private or region-locked video URLs/BV ids are skipped and never charged.
- Text is returned in its original language (mostly Simplified Chinese) and is not translated.
- Respects your run budget: set a maximum total charge and the actor stops cleanly at the cap.

### Related ActorForge actors

- [China Trending Topics](https://apify.com/actor-forge/china-trending-topics)
- [Weibo Hot Search](https://apify.com/actor-forge/weibo-hot-search)
- [Douyin Trending & Hot Search](https://apify.com/actor-forge/douyin-hot-search)

### Changelog

- **2026-10-18** — Initial release: keyword search with sort, video URLs/BV ids, popular feed, full stats + uploader followers, anonymised top comments.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `searchTerms` (type: `array`):

Keyword video search, Chinese or English (e.g. '原神', 'iPhone 17 review'). Each term returns up to Max videos.

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

Specific videos: bilibili.com/video/BV… URLs, BV ids or av ids. Unavailable or deleted videos are skipped and never charged.

## `includePopular` (type: `boolean`):

Also fetch Bilibili's current popular/trending videos (热门), up to Max videos.

## `maxVideos` (type: `integer`):

Stop after this many videos per term (and for the popular feed). You pay per video: 100 videos = $0.40.

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

How search results are ordered.

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

Attach a sample of top and newest comments with replies (about 60 per video): text, time and likes only. Commenter names and IDs are never returned. $0.50 per 1,000 comments.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "includePopular": false,
  "maxVideos": 20,
  "sortBy": "totalrank",
  "includeComments": false
}
```

# Actor output Schema

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

One row per video: metadata, engagement stats, tags, uploader channel, optional anonymised comments.

# 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 = {
    "searchTerms": [
        "iphone"
    ]
};

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

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

```

## MCP server setup

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