# Bilibili Scraper: Video Search, Stats & Creator Profiles (`themineworks/bilibili-scraper`) Actor

Scrape Bilibili (China's dominant video platform) by keyword, video URL or creator ID: views, danmaku, likes, coins, favorites, shares, duration and creator stats. Public API, no login, no browser needed.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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: Video Search, Stats & Creator Profiles

> Public API only. No login, no browser, no proxy required.

> You are only charged for a video or profile that actually lands in your dataset. Blocked or empty lookups are never billed.

### Overview

Bilibili is China's dominant long-form video platform, the closest equivalent to YouTube in that market, and it is where a huge share of Chinese product reviews, unboxings, gaming content, and creator-economy activity actually lives. This actor turns a keyword, a video link or a creator ID into structured rows: views, danmaku (live bullet comments), replies, favorites, coins, shares, likes, duration and creator stats.

It runs three independent lookups, and you can use any combination of them in a single run:

**Keyword search.** Give it a search term and get back a ranked page of videos with title, description, author, publish date and full engagement stats, exactly as Bilibili's own search ranks them.

**Video detail.** Give it a video URL or a bare BV ID and get back the complete stat block for that one video, including coin count and share count, which the search results do not carry.

**Creator profile.** Give it a numeric Bilibili user ID (the number in a `space.bilibili.com/<uid>` URL) and get back that creator's public profile: name, follower count, level, verification status and bio.

✅ Keyword search, direct video lookup, or creator profile, in one actor · ✅ Full engagement stats, not just view count · ✅ No login, no API key · ✅ MCP-ready for AI agents

### Why this is cheap and reliable

Most Bilibili scrapers on the market run a full headless browser because Bilibili's *web pages* are heavily client-rendered. This actor does not scrape the web pages at all. It talks directly to Bilibili's own public JSON API, the same one the Bilibili apps and web client call internally, over a plain HTTP request. Verified in production: search, video-detail and creator-card lookups all return complete JSON to an ordinary request with a browser user agent and a `Referer` header, no proxy and no geo-restriction. That is also why pricing on this actor is well below scrapers built on a browser, and why runs finish in seconds rather than tens of seconds per video.

If Bilibili ever starts rejecting unsigned requests to these endpoints, the actor is built to notice: a Bilibili risk-control response code stops the run immediately rather than silently returning nothing, and nothing is ever charged for a lookup that did not deliver.

### Input

```json
{
  "keywords": ["cooking"],
  "maxResultsPerKeyword": 10,
  "videoUrls": ["https://www.bilibili.com/video/BV1xx411c7mD"],
  "creatorIds": ["546195"]
}
```

| Field | What it takes |
| --- | --- |
| `keywords` | Search terms, in Chinese or English. Each keyword returns a page of ranked video results. |
| `maxResultsPerKeyword` | Cap per keyword. About 20 results per page, so this also controls how many search pages are fetched. |
| `videoUrls` | Full video links or bare BV IDs. Each one returns the complete stat block for that video. |
| `creatorIds` | Numeric UP主 (creator) user IDs, the number in a `space.bilibili.com/<uid>` link. Each one returns that creator's public profile. |

Leave any field empty or omit it entirely; the actor only runs the lookups you actually provide.

### Output

Three record shapes land in the same dataset, distinguished by `record_type`.

**Search result:**

```json
{
  "record_type": "video-search-result",
  "bvid": "BV1Xvut6sEjU",
  "title": "A home-cooked noodle recipe",
  "author_name": "food.creator",
  "author_uid": 392336778,
  "duration_seconds": 748,
  "published_at": "2026-08-04T20:07:14.000Z",
  "view_count": 873620,
  "danmaku_count": 1225,
  "reply_count": 532,
  "favorite_count": 11813,
  "like_count": 30002,
  "thumbnail_url": "https://i0.hdslb.com/bfs/archive/....jpg",
  "video_url": "https://www.bilibili.com/video/BV1Xvut6sEjU",
  "tags": "cooking, home recipes",
  "keyword": "cooking",
  "scraped_at": "2026-08-14T09:12:03.000Z"
}
```

**Video detail** (via `videoUrls`) adds `coin_count` and `share_count`, which search results do not carry.

**Creator profile** (via `creatorIds`):

```json
{
  "record_type": "creator-profile-result",
  "uid": 546195,
  "name": "example_creator",
  "gender": "male",
  "level": 6,
  "fans_count": 228344,
  "following_count": 7,
  "bio": "Cooking channel, new video every week",
  "vip_status": true,
  "avatar_url": "https://i1.hdslb.com/bfs/face/....jpg",
  "profile_url": "https://space.bilibili.com/546195",
  "scraped_at": "2026-08-14T09:12:07.000Z"
}
```

| Field | Description |
| --- | --- |
| 🆔 `bvid` / `aid` | Bilibili's current and legacy video IDs |
| 📄 `title` / `description` | Video title and description |
| 👤 `author_name` / `author_uid` | The creator who posted the video |
| ⏱️ `duration_seconds` | Video length |
| 📅 `published_at` | ISO publish timestamp |
| 👁️ `view_count` | Total plays |
| 💬 `danmaku_count` | Live bullet-comment count, a Bilibili-specific engagement signal |
| 💭 `reply_count` | Comment count |
| ⭐ `favorite_count` | Times saved to a watch-later or favorites list |
| 🪙 `coin_count` | Bilibili coins gifted (video detail only) |
| 🔁 `share_count` | Share count (video detail only) |
| 👍 `like_count` | Like count |
| 🏷️ `tags` | Video tags (search results only) |
| 👥 `fans_count` / `following_count` | Creator follower and following counts |
| 🎚️ `level` | Bilibili account level, 0 to 6 |

### Common use cases

**Brand and campaign monitoring.** Track how a product or brand name is performing on Bilibili week over week: view growth, like rate, danmaku volume.

**Creator research and outreach.** Pull a creator's public stats before reaching out for a collaboration, or benchmark a shortlist of creators against each other.

**Competitive content research.** See what is actually ranking for a category keyword right now, not just what a competitor claims performs well.

**Market research into Chinese consumer video.** Bilibili skews younger and more product-review-heavy than most Chinese platforms, making it a strong signal source for launches aimed at Gen Z / Gen Alpha Chinese consumers.

**AI agents.** Feed structured Bilibili engagement data into an agent answering "what is trending in this category on Chinese video right now?"

### Pricing

| Event | Price | You pay when |
| --- | --- | --- |
| Video search result | $0.004 | A video from a keyword search lands in your dataset |
| Video detail result | $0.006 | A direct video lookup lands in your dataset |
| Creator profile result | $0.005 | A creator profile lands in your dataset |

Searches or lookups that return nothing cost nothing.

### Run it on a schedule

1. Run once with the keywords, videos or creators you want tracked, then click **Save as a task**.
2. In the Apify Console go to **Schedules → Create new**.
3. Pick a frequency and attach the saved task.
4. Wire the dataset to Sheets, Slack or a webhook from the **Integrations** tab.

### FAQ

**Do I need a Bilibili account?**
No. Every field this actor returns is public.

**Why is this cheaper than other Bilibili scrapers?**
Because it never opens a browser. It calls Bilibili's own public JSON API directly, which is faster and far lower-cost than rendering pages with Chromium. And that saving is passed on in the price.

**Can I search in English?**
Yes, though results are strongest for Chinese-language queries since that is the vast majority of Bilibili's content.

**What if Bilibili starts blocking these endpoints?**
The actor is built to detect a genuine risk-control response from Bilibili and stop immediately rather than deliver junk. You will see a clear `blocked_note` in the summary row, and nothing is charged for the failed attempt.

### Use from Claude, ChatGPT and any MCP agent

```
https://mcp.apify.com/?tools=themineworks/bilibili-scraper
```

Or call it programmatically:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/bilibili-scraper').call({
  keywords: ['cooking'],
  maxResultsPerKeyword: 10,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Questions, or need a field we don't return yet? Reach out through the Apify profile.

# Actor input Schema

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

Video keywords to search on Bilibili, e.g. "美食" or an English term. Each keyword returns a page of ranked video results with full stats.

## `maxResultsPerKeyword` (type: `integer`):

How many videos to return per keyword search. About 20 per page, so this also controls how many search pages are fetched.

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

Direct Bilibili video links (e.g. https://www.bilibili.com/video/BV1xx411c7mD) or bare BV IDs. Returns full video detail: view/danmaku/reply/favorite/coin/share/like counts, duration, parts and creator.

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

Numeric Bilibili user IDs (the number in a space URL like space.bilibili.com/546195). Returns the creator's public profile: name, fans, follows, level, verification and bio.

## Actor input object example

```json
{
  "keywords": [
    "cooking"
  ],
  "maxResultsPerKeyword": 10,
  "videoUrls": [],
  "creatorIds": []
}
```

# 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": [
        "cooking"
    ],
    "maxResultsPerKeyword": 10,
    "videoUrls": [],
    "creatorIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/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": ["cooking"],
    "maxResultsPerKeyword": 10,
    "videoUrls": [],
    "creatorIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/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": [
    "cooking"
  ],
  "maxResultsPerKeyword": 10,
  "videoUrls": [],
  "creatorIds": []
}' |
apify call themineworks/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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