# Bilibili Scraper – Video Search & Stats API (`unnoted/bilibili-video-scraper`) Actor

Search Bilibili (B站) videos by keyword or paste video links. Get title, views, likes, coins, favorites, shares, danmaku and comment counts, duration, upload date and channel for every video, plus tags from search. Export JSON, CSV or Excel, call it by API or schedule it. No login needed. Unofficial.

- **URL**: https://apify.com/unnoted/bilibili-video-scraper.md
- **Developed by:** [Unnoted](https://apify.com/unnoted) (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 $4.50 / 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.

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 – Video Search & Stats API do?

Bilibili Scraper collects public video data from Bilibili (bilibili.com, B站), China's largest video community: search results by keyword, or any video by its link, with views, likes, coins, favorites, shares, danmaku and comment counts in one row per video.

Unofficial, not affiliated with Bilibili.

**Main features:** search by keyword or paste links, up to 10,000 videos per run, no login needed, export to JSON, CSV or Excel, and full API and scheduling support on Apify.

### What data can you get from Bilibili?

Each video is one row with these fields:

| Field | Description |
|---|---|
| `bvid` | Video id (BV…) (always filled) |
| `url` | Video page URL (always filled) |
| `title` | Video title (always filled) |
| `aid` | Numeric video id (av number) |
| `description` | Video description written by the uploader |
| `durationSec` | Length in seconds |
| `publishedAt` | Upload time (ISO 8601, UTC) |
| `uploaderName` | Channel name of the uploader |
| `uploaderMid` | Channel id of the uploader |
| `uploaderUrl` | Channel page URL |
| `views` | Play count |
| `likes` | Like count |
| `coins` | Coins given to the video |
| `favorites` | Times added to favorites |
| `shares` | Share count |
| `danmakuCount` | Danmaku (on-screen bullet comment) count |
| `commentCount` | Comment count (numbers only, no comment text) |
| `tags` | Tags shown in search results (empty for video URLs) |
| `category` | Category (zone) name (empty for video URLs) |
| `coverUrl` | Cover image URL |
| `searchTerm` | The search term that found the video (empty for video URLs) |
| `scrapedAt` | When the video was collected (ISO 8601) |

### How to scrape Bilibili with Bilibili Scraper – Video Search & Stats API

1. Open Bilibili Scraper – Video Search & Stats API on Apify and go to the **Input** tab.
2. In **Search terms**, enter `minecraft`.
3. In **Max items**, enter `20`.
4. Click **Start** and wait for the run to finish. A small run like this one takes under a minute.
5. Open the **Output** tab to see the results, or download them as JSON, CSV, Excel or HTML.

### Input

See the **Input** tab for every option. The fields:

| Field | Name | What it does | Default |
|---|---|---|---|
| `searchTerms` | Search terms | Keywords to search for on Bilibili, in English or Chinese (e.g. minecraft, 原神). Each term is searched separately. |  |
| `videoUrls` | Video URLs | Bilibili video links (https://www.bilibili.com/video/BV…) or BV ids. Each one returns that video with its stats. |  |
| `sort` | Sort search results by | Order of the search results. Has no effect on video URLs. Options: `relevance` (Relevance), `newest` (Newest first), `mostViewed` (Most viewed). | `"relevance"` |
| `maxItems` | Max items | Maximum number of videos in total, shared across search terms and video URLs. You pay only for videos saved. | `100` |

Example input:

```json
{
  "searchTerms": [
    "minecraft"
  ],
  "maxItems": 20
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. One real result:

```json
{
  "bvid": "BV1m5aY69E8D",
  "aid": 117342986110880,
  "url": "https://www.bilibili.com/video/BV1m5aY69E8D",
  "title": "十四年的等待，我的世界终于迎来全新第四维度：筛界 Minecraft Live2026",
  "description": null,
  "durationSec": 531,
  "publishedAt": "2026-09-27T12:29:08.000Z",
  "uploaderName": "籽岷",
  "uploaderMid": 686127,
  "uploaderUrl": "https://space.bilibili.com/686127",
  "views": 1794549,
  "likes": 103910,
  "coins": 14903,
  "favorites": 21922,
  "shares": 28943,
  "danmakuCount": 5139,
  "commentCount": 6036,
  "tags": [
    "筛界",
    "籽岷",
    "方块制片局",
    "新维度",
    "像素风",
    "沙盒游戏",
    "新版本",
    "我的世界",
    "LIVE",
    "MINECRAFT"
  ],
  "category": "单机游戏",
  "coverUrl": "https://i0.hdslb.com/bfs/archive/39e6cfdf143c830aaf3685bb0c2b15e6d51fb030.jpg",
  "searchTerm": "minecraft",
  "scrapedAt": "2026-10-05T14:31:35.373Z"
}
```

### How much does it cost to scrape Bilibili?

Bilibili Scraper – Video Search & Stats API uses pay-per-event pricing: **$4.50 per 1,000 videos** (Video). You pay only for videos saved to the dataset; platform usage is included in the price. Each run also has Apify's standard start fee of a fraction of a cent.

| Videos | Price |
|---|---|
| 100 | $0.45 |
| 1,000 | $4.50 |
| 10,000 | $45.00 |

Set **Max items** (and the run's maximum cost in the run options) to cap what a run can spend. The run stops when either limit is reached.

### Use cases

- **Trend research:** see which games, anime, tech or product topics are growing on Bilibili, in English or Chinese search terms.
- **Brand and campaign tracking:** follow the videos that mention your brand, product or game, and how their views and likes move over time.
- **Creator discovery:** find the channels that publish the most-viewed videos on a topic, for sponsorship and outreach research.
- **Content strategy:** compare titles, lengths, upload times and engagement (likes, coins, favorites per view) of the top videos in your niche.
- **Market research on China:** add Bilibili data to dashboards next to YouTube and other video platforms.

### Tips

- Use **Newest first** with a daily schedule to monitor new uploads on a topic.
- Chinese search terms (e.g. 原神 instead of Genshin Impact) usually return more and closer matches.
- Paste **video URLs** to track the stats of specific videos over time; run it on a schedule and compare the numbers.
- Start with a small **Max items** (20) to check the output, then raise it.
- Coins and favorites relative to views are a good quality signal on Bilibili: viewers give coins only to videos they value.

### FAQ

#### Is it legal to scrape Bilibili?

Bilibili Scraper – Video Search & Stats API collects only data that Bilibili shows publicly to every visitor, and it leaves out personal data such as private profiles and contact details. Our Actors are ethical and do not extract private user data. Results could still contain personal data in titles or descriptions written by uploaders. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You are responsible for how you use the data.

#### Can I use it through an API?

Yes. Every Apify Actor has an API: start runs, pass input and read results over HTTP, or use the JavaScript and Python clients. See the **API** tab on the Actor page for ready-made examples.

#### Can I schedule runs and connect other apps?

Yes. Use Apify **Schedules** to run Bilibili Scraper – Video Search & Stats API every hour, day or week, and integrations (Make, Zapier, Google Sheets, webhooks and more) to send the results where you need them.

#### Why did I get fewer results than expected?

The run stops at **Max items** or at the run's maximum cost, whichever comes first. Bilibili may also return fewer results for rare search terms. Duplicates across search terms are saved once. Check the run's `RUN_SUMMARY` record in the key-value store for the inputs that returned nothing.

#### What if it stops working?

Sites change. We run a daily check of our own and fix breakages quickly. If something looks wrong, open an issue in the **Issues** tab with the run link and we'll look at it.

#### What are coins and danmaku?

Coins are Bilibili's tipping currency: each viewer can give a video one or two coins, so coins show how much viewers value it. Danmaku are the short comments that fly across the video while it plays; the Actor gives their count only.

#### How many videos can I get per search term?

Bilibili's search shows a limited number of pages per term. For broad topics, add several related terms (English and Chinese). Duplicates across terms are saved once.

### Not included

Comment text, danmaku text, viewer data, and user profiles beyond the uploader's channel name, id and link are not included. Video files are not downloaded.

### More Actors from us

- [AliExpress Search Scraper – Products & Prices](https://apify.com/unnoted/aliexpress-product-search)
- [BBB Scraper – Business Ratings & Accreditation](https://apify.com/unnoted/bbb-business-search)
- [Bumeran Jobs Scraper – LATAM Job Listings](https://apify.com/unnoted/bumeran-job-listings)
- [Foundit Jobs Scraper – India Job Listings API](https://apify.com/unnoted/foundit-job-listings)
- [Google Jobs Scraper – Job Listings API](https://apify.com/unnoted/google-jobs-listings)
- [Google Play Reviews Scraper – App Reviews API](https://apify.com/unnoted/google-play-reviews-scraper)
- [Google Trends Scraper – Interest & Related Queries](https://apify.com/unnoted/google-trends-data)
- [Idealo Scraper – Price Comparison Data](https://apify.com/unnoted/idealo-price-search)
- [Kleinanzeigen Scraper – Listings & Prices](https://apify.com/unnoted/kleinanzeigen-listings-scraper)
- [Mercari Japan Scraper – Listings & Prices API](https://apify.com/unnoted/mercari-japan-search)
- [Resident Advisor Scraper – RA Event Listings](https://apify.com/unnoted/resident-advisor-events)
- [Sainsbury's Scraper – UK Grocery Prices](https://apify.com/unnoted/sainsburys-grocery-search)
- [Tokopedia Scraper – Product Search & Prices](https://apify.com/unnoted/tokopedia-product-search)
- [Workday Jobs Scraper – Any Careers Site](https://apify.com/unnoted/workday-jobs-scraper)
- [Yandex Maps Scraper – Places & Business Data](https://apify.com/unnoted/yandex-maps-places)

***

**关键词 (keywords):** B站 视频 数据 · 哔哩哔哩 视频搜索 · 播放量 点赞 投币 收藏 分享 弹幕数 评论数 · UP主 频道 · 导出 JSON CSV Excel

# Actor input Schema

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

Keywords to search for on Bilibili, in English or Chinese (e.g. minecraft, 原神). Each term is searched separately.

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

Bilibili video links (https://www.bilibili.com/video/BV…) or BV ids. Each one returns that video with its stats.

## `sort` (type: `string`):

Order of the search results. Has no effect on video URLs.

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

Maximum number of videos in total, shared across search terms and video URLs. You pay only for videos saved.

## Actor input object example

```json
{
  "searchTerms": [
    "minecraft"
  ],
  "sort": "relevance",
  "maxItems": 20
}
```

# Actor output Schema

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

One item per video.

## `runSummary` (type: `string`):

Items saved, inputs done, and how complete each field was.

# 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": [
        "minecraft"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("unnoted/bilibili-video-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": ["minecraft"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("unnoted/bilibili-video-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": [
    "minecraft"
  ],
  "maxItems": 20
}' |
apify call unnoted/bilibili-video-scraper --silent --output-dataset

```

## MCP server setup

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