# Bilibili Scraper — Trending Videos, Views & Engagement (`logiover/bilibili-video-scraper`) Actor

Scrape Bilibili, China's largest video community. Extract video title and description, uploader and channel ID, publish date, duration, and the full engagement set: views, likes, coins, favourites, comments, shares and danmaku count.

- **URL**: https://apify.com/logiover/bilibili-video-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (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 $2.10 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bilibili Scraper — Trending Videos, Views & Engagement

China's largest video community in rows: title and description, uploader and channel ID, publish date, duration, and the full engagement set — views, likes, coins, favourites, comments, shares and danmaku.

### What does the Bilibili Scraper do?

This Actor collects videos from **Bilibili**, the video community at the centre of Chinese youth internet culture — anime, gaming, technology, music and study content, with a user base that behaves nothing like a western platform's.

That difference is why this Actor collects the metrics it does. Bilibili counts **coins**: a limited daily token a viewer spends on a video they think deserves it. Spending one costs the viewer something, so the coin count is a far better signal of how well a video actually landed than views. It also counts **danmaku** — the comments that scroll across the frame — which measures live engagement rather than after-the-fact commenting. Both are collected alongside the usual views, likes, favourites, comments and shares.

### Who is it for?

- **Social media analysts** tracking what trends in the Chinese market.
- **Brand and agency teams** identifying creators to work with on Bilibili.
- **Market researchers** studying Chinese consumer and youth culture.
- **Games and anime publishers** watching reception of a title in China.
- **Creator-economy platforms** benchmarking channel performance.
- **Academics** studying engagement on a non-western social platform.

### Use cases

- Track what is trending on Bilibili day by day.
- Rank videos by coins rather than views to find genuinely well-received content.
- Find high-performing creators in a category for outreach.
- Compare danmaku volume against comment count to measure live engagement.
- Measure how quickly a video accumulates engagement after publishing.
- Build a dataset of Chinese video titles and descriptions for text analysis.
- Feed an AI agent trending Chinese video data for market questions.

### Why use this Bilibili Scraper?

- **The full engagement set** — views, likes, coins, favourites, comments, shares and danmaku — not just views.
- **Uploader name and channel ID**, so creators can be tracked across runs.
- **Publish dates converted to ISO** from Bilibili's unix timestamps.
- **Duration in seconds**, ready for engagement-per-minute analysis.
- **Fast and proxy-free** — the whole popular feed in about ten seconds.
- **Keyless and login-free.**

### What data can you extract?

One row per video. Anything the source left blank comes back as `null`.

| Field | Description |
| --- | --- |
| `bvid` | Bilibili video ID |
| `url` | Link to the video |
| `title` | Video title |
| `description` | Video description |
| `uploader` | Uploader display name |
| `uploaderId` | Uploader channel ID (mid) |
| `publishedAt` | Publish date as ISO |
| `durationSec` | Duration in seconds |
| `views` | View count |
| `likes` | Like count |
| `coins` | Coins spent on the video |
| `favourites` | Times saved to a favourites list |
| `comments` | Comment count |
| `shares` | Share count |
| `danmaku` | Scrolling on-screen comments |
| `category` | Bilibili category name |
| `thumbnail` | Thumbnail image |
| `scrapedAt` | ISO timestamp of collection |

#### Sample output

```json
{
  "bvid": "BV1G48M6XEBt",
  "url": "https://www.bilibili.com/video/BV1G48M6XEBt",
  "title": "\"复活吧！我的（ ）\"",
  "description": "致准星上的微光，重逢的微风和那个夏天。 2026.8.21",
  "uploader": "HL-Flame",
  "uploaderId": "3546883796503085",
  "publishedAt": "2026-08-21T04:30:45.000Z",
  "durationSec": 250,
  "views": 2799365,
  "likes": 350110,
  "coins": 221412,
  "favourites": 177810,
  "comments": 12190,
  "shares": 27232,
  "danmaku": 2482,
  "category": "网络游戏",
  "thumbnail": "http://i0.hdslb.com/bfs/archive/32bd89a388d516e86c9aef366921.jpg",
  "scrapedAt": "2026-08-22T08:30:28.040Z"
}
```

### How to use the Bilibili Scraper

#### Option A — the popular feed

Leave **Feed** on *Popular*, set **Maximum results** and run. The feed is a rolling window of several hundred videos and a run collects the lot in seconds.

#### Option B — the top chart

Set **Feed** to *Top ranking chart* for Bilibili's fixed ranking. It is a single chart rather than a paged feed, so it returns a set number of videos.

#### Option C — a daily trend series

Schedule a daily run on the popular feed and keep the results; diffing by `bvid` shows what entered and left the feed.

### Input parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `feed` | select | `popular` | `popular` (paged) or `ranking` (fixed chart) |
| `maxResults` | integer | 1000 | Stop after this many videos (max 20,000) |
| `proxyConfiguration` | object | *(off)* | Optional; the public API answers without one |

### Tips for best results

- **Rank by coins, not views.** A coin costs the viewer a limited daily token, so it separates genuine enthusiasm from passive watching.
- **Normalise by duration.** `views / durationSec` and `danmaku / durationSec` compare a three-minute clip to a half-hour video fairly.
- **`uploaderId` is the stable creator key**; display names change, the mid does not.
- **The popular feed is a window, not an archive.** It holds a few hundred videos at any moment, so schedule daily runs if you want a trend series rather than a single snapshot.
- **Turn on a proxy only if you see rate limiting** — the API normally answers fine without one.

### Integrations

Connect the dataset to Make, Zapier, Airbyte, Google Sheets, Slack, GitHub or any HTTP endpoint through Apify integrations, or schedule a run and push results into a warehouse with a webhook.

### API usage

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("logiover/bilibili-video-scraper").call(run_input={
    "feed": "popular",
    "maxResults": 2000,
})
rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
best = sorted(rows, key=lambda r: (r["coins"] or 0) / max(r["views"] or 1, 1), reverse=True)
print("highest coin rate:", best[0]["title"], best[0]["uploader"])
```

### Use with AI agents (MCP)

The Actor is callable from the Apify MCP server, so an assistant can pull trending Bilibili videos directly and answer questions about Chinese video trends and creators.

### FAQ

#### Do I need a Bilibili account or API key?

No. This Actor reads Bilibili's public web interface; there is nothing to register.

#### How many videos can one run return?

The popular feed is a rolling window rather than an archive: it holds roughly 600-700 videos at a time, twenty per page, and a run collects all of them in about ten seconds. Setting a higher maximum does no harm — the run simply stops when the feed is exhausted. The ranking chart is a fixed list and returns however many videos Bilibili puts on it.

#### What are coins, and why do they matter?

A coin is a limited daily token a Bilibili user can spend on a video they rate highly. Because spending one has a real cost to the viewer, the coin count is the platform's strongest quality signal — much stronger than views, which cost nothing.

#### What is danmaku?

Comments that scroll across the video as it plays, rather than sitting underneath it. The count measures engagement during viewing, which is a different thing from the comment count.

#### Are titles and descriptions in Chinese?

Yes. Bilibili is a Chinese-language platform, so titles, descriptions and category names come back in Chinese, exactly as published.

#### Can I scrape a specific creator's channel?

Not with this Actor. It collects the trending and ranking feeds, which is where discovery happens. Every row carries the `uploaderId`, so creators found here can be tracked across runs.

#### Do I need a proxy?

Usually not — the public API answers directly. Enable one if you are running very large exports and start seeing rate limiting.

#### Can I export to CSV or Excel?

Yes — every run's dataset exports to JSON, CSV, Excel, XML or JSONL.

#### How fresh is the data?

Each run reads the feed live, so engagement counts are as current as Bilibili's own at the moment you run it.

#### Why did my run return zero videos?

Usually rate limiting from the exit you are running on. Enable a proxy and try again; the Actor logs Bilibili's own error code when that happens.

### Is it legal to scrape Bilibili?

This Actor reads Bilibili's public web interface — no accounts, no logins, no private content. Video titles, engagement counts and public channel names are information published for public view. Uploader names are public identities but may still be personal data, so you remain responsible for how you use the results, including under the GDPR, and for respecting the platform's terms in your own jurisdiction.

### Related scrapers

- **YouTube Scraper suite** — video, channel and transcript data.
- **TikTok Scraper suite** — video and hashtag data.
- **Threads Scraper** — posts and engagement.
- **Bluesky Historical Archive Scraper** — full-feed social archives.

# Actor input Schema

## `feed` (type: `string`):

The rolling popular feed, which pages deeply, or the fixed top chart.

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

Stop after this many videos. Each page returns 20.

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

Bilibili's public API answers without a proxy. Enable one if you hit rate limiting on large runs.

## Actor input object example

```json
{
  "feed": "popular",
  "maxResults": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every record collected in this run. Open the Dataset tab to browse, filter or export as JSON, CSV or Excel.

# 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 = {
    "feed": "popular",
    "maxResults": 1000,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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 = {
    "feed": "popular",
    "maxResults": 1000,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/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 '{
  "feed": "popular",
  "maxResults": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call logiover/bilibili-video-scraper --silent --output-dataset

```

## MCP server setup

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