# Bilibili Search Scraper (哔哩哔哩 B站): Videos, Trending & Ranking (`siteacs/bilibili-search`) Actor

Bilibili (哔哩哔哩, B站) video search scraper: search videos by keyword and export the trending Popular (热门), Ranking top 100 (排行榜) and Weekly Must-Watch (每周必看) lists. Views, likes, danmaku, comments, coins, shares, uploader (UP主), tags and category. No login, no cookies.

- **URL**: https://apify.com/siteacs/bilibili-search.md
- **Developed by:** [SiteAcs](https://apify.com/siteacs) (community)
- **Categories:** Videos, Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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

## Bilibili Search Scraper (哔哩哔哩 B站): Videos, Trending & Ranking

Search Bilibili (哔哩哔哩, B站) videos by keyword, or read its trending lists (Popular, Ranking top 100, Weekly
Must-Watch, All-Time Must-Watch), and get one row per video with **plays, likes, danmaku, comments, favourites, coins
and shares**, title, link, uploader (UP主), duration, publish date, tags and category. Logged out: no account, no
cookies, no API key.

- **Input:** `keywords` (Chinese or English, e.g. `["露营装备", "DJI"]`), `maxResults` per keyword (up to 1,000), and
  optional `popularLists` (`popular`, `ranking`, `weekly`, `precious`).
- **Output:** one `video` row per result in Bilibili's order, e.g. `{"title": "新手小白第一次露营要买什么装备？...",
  "playCount": 499962, "likeCount": 8787, "url": "https://www.bilibili.com/video/BV1H44y1t7fU"}`, plus one free
  `summary` row per keyword or list.
- **Price:** $1.00 per 1,000 video rows. Summary rows are free; no start fee.

Use it to see what Chinese viewers watch about your brand, product, game or market, to find the Bilibili creators
(UP主) who cover a topic, to track how a launch is received week by week, or to feed Chinese video data into your own
research and dashboards.

- **中文:** B站视频搜索采集：按关键词搜索哔哩哔哩视频，导出标题、链接、UP主、播放量、点赞、弹幕、评论、收藏、投币、分享、时长、发布时间、标签和分区；
  也可采集综合热门、排行榜（全站及各分区 Top 100）、每周必看和入站必刷。无需登录，无需 Cookie。

### Quick start

```json
{
  "keywords": ["露营装备", "DJI"],
  "maxResults": 100,
  "sortBy": "relevance",
  "popularLists": ["ranking"]
}
```

That returns up to 100 videos for each keyword, then the 100 videos of today's Ranking page. Leave `keywords` empty
to read only the lists.

**Search in Chinese for real coverage.** Bilibili matches the words in titles, descriptions and tags, and almost all
of them are Chinese. "camping gear" returns children's English readers and cartoons with "camping" in the title;
露营装备 returns camping gear reviews and buying guides. Brand and product names usually work as written (iPhone 17,
DJI, Tesla, Minecraft). A few common terms:

| You want | Search for |
| --- | --- |
| review, hands-on | 测评, 开箱 (unboxing) |
| tutorial | 教程 |
| mechanical keyboard | 机械键盘 |
| camping | 露营 |
| skincare, makeup | 护肤, 美妆 |
| electric car | 新能源汽车 |
| travel vlog | 旅行vlog |
| recommendations, buying guide | 推荐 |

Each row's `matchedFields` is Bilibili's highlight hint (title, description, tag). It is often empty even for close
matches, so treat it as a hint, not a filter.

### What you get

One row per video, in Bilibili's order. A search row from a test run for 露营装备 (camping gear; description cut short):

```json
{
  "type": "video",
  "source": "search",
  "keyword": "露营装备",
  "position": 1,
  "page": 1,
  "bvid": "BV1H44y1t7fU",
  "aid": 975877790,
  "url": "https://www.bilibili.com/video/BV1H44y1t7fU",
  "title": "新手小白第一次露营要买什么装备？看这个视频，看完保证马上退坑 👍",
  "description": "露营要买的装备非常多，坑也多，新手很容易手足无措 ...",
  "coverUrl": "https://i0.hdslb.com/bfs/archive/04c0b893a2a459e8c495bce60dcfb2c2a79f72b4.jpg",
  "durationSeconds": 376,
  "duration": "6:16",
  "publishedAt": "2021-10-07T04:11:03Z",
  "playCount": 499962,
  "likeCount": 8787,
  "danmakuCount": 777,
  "commentCount": 650,
  "favoriteCount": 10091,
  "coinCount": 2816,
  "shareCount": 3377,
  "statsSource": "video",
  "tags": ["露营", "野营", "旅行", "户外", "生活记录", "露营装备", "帐篷", "野外", "野餐"],
  "category": "出行",
  "categoryId": 250,
  "uploaderId": 18067,
  "uploaderName": "卡叔叔的日常",
  "uploaderUrl": "https://space.bilibili.com/18067",
  "isCoCreation": false,
  "isChargeOnly": false,
  "matchedFields": ["title", "description", "tag"],
  "listReason": null,
  "scrapedAt": "2026-11-13T03:09:23Z"
}
```

| Field | What it is |
| --- | --- |
| `source` | `search`, or the list: `popular`, `ranking`, `weekly`, `precious` |
| `keyword` / `listName` | The keyword searched, or the list (`ranking:tech`, `weekly:398`) |
| `position`, `page` | Place in Bilibili's order, counted on across pages; the page it came on |
| `bvid`, `aid`, `url` | The video's ids and link |
| `title`, `description`, `coverUrl` | As on the video page; search highlights removed |
| `durationSeconds`, `duration`, `publishedAt` | Length, and publish time in UTC |
| `playCount` | Plays (播放) |
| `likeCount` | Likes (点赞) |
| `danmakuCount` | Danmaku (弹幕): the comments that fly across the video |
| `commentCount` | Comments (评论) under the video |
| `favoriteCount`, `coinCount`, `shareCount` | Favourites (收藏), coins (投币: viewers tip a coin to videos they rate), shares (分享) |
| `statsSource` | Where the counters come from: `video`, `search` or `list` (below) |
| `tags` | The video's tags (search rows) |
| `category`, `categoryId` | Bilibili's category (分区) as the site names it, in Chinese, and its id |
| `uploaderId`, `uploaderName`, `uploaderUrl` | The uploader (UP主): user id, name, space page |
| `isCoCreation`, `isChargeOnly` | A video co-created by several uploaders; a video for paying supporters only |
| `matchedFields` | Bilibili's highlight hint (search rows): a hint, not a filter |
| `listReason` | The list's note: "百万播放" (a million plays) on Popular, the editors' line on Weekly and All-Time |

After the videos of each keyword or list comes a free summary row (`type: "summary"`): videos saved, pages read,
Bilibili's own count, paid courses, repeats and deleted or hidden videos skipped, how many rows got live counters, the
filters used (or the list's issue and dates), and a `status` with its `reason` when it ended early. Filter on `type`
(`video` or `summary`) to separate them.

The dataset has three views: **Videos** (the main columns), **Engagement** (every counter, category, tags and
uploader) and **Summaries** (each view shows both kinds of row; filter on `type`).

### Popular lists

| List | Bilibili page | Videos |
| --- | --- | --- |
| `popular` | Popular now (综合热门): what is hot at this moment, updated through the day | up to 500 |
| `ranking` | Ranking (排行榜), top 100 overall or per category, or the Original and Rookie tabs | about 100 |
| `weekly` | Weekly Must-Watch (每周必看): the editors' weekly pick, every Friday; the latest issue or any number back to 2019 | 30 to 60 |
| `precious` | All-Time Must-Watch (入站必刷): the site's classics | about 100 |

List rows carry the list's own counters, which are the video's live figures (`statsSource: list`).

### Live counters

Bilibili's search index updates plays, danmaku, comments and favourites, but its like count lags behind and it has
no coins or shares. With **Live like, coin and share counts** on (the default), each search result's counters are read
from the video's own data, the numbers its page shows, and `statsSource` is `video`. In the test of 50 videos over 10
keywords, the actor's plays, likes and danmaku equalled the video page for all 50 (in an earlier pass, 48 of 50: two
had gained a few plays or likes in the seconds between the two reads). The search index's like count equalled the page
for only 27 of the 50. Turn it off for speed; the price is the same.

### Filters

- **Sort by:** relevance (default), most played, newest, most danmaku, most favourited, most commented: the search
  page's own sorts.
- **Duration:** under 10, 10 to 30, 30 to 60, over 60 minutes.
- **Category:** one of Bilibili's main categories: anime, music, dance, gaming, knowledge, tech, sports, cars, life,
  food, animals, kichiku (remix), fashion, entertainment, film and TV.
- **Published on or after / before:** a date range, in China time as the site counts days.

### Pricing

$1.00 per 1,000 video rows, charged as each row is saved. Summary rows, refused calls and retries cost nothing. Set a
maximum cost per run and the run stops at the last row within it; the open keyword's summary says `capped` and the
rest say `not_started`.

### Limits

- Bilibili's search stops at 1,000 results per keyword (24 pages of 42). For more, split the keyword or use the sort
  and date filters: each combination is its own 1,000.
- Logged-out results, the same for everyone; a signed-in user's search can be personalised.
- Paid courses (课堂) that Bilibili mixes into some results are not videos and are skipped (counted in the summary's
  `coursesSkipped`). With live counters on, a result whose video Bilibili answers as deleted or hidden is skipped and
  not charged (`unavailableSkipped`).
- Bilibili's order moves a little from minute to minute. The actor reads a keyword's pages back to back so that a
  video is not lost or repeated between pages; one that does come again is saved once (`repeatsSkipped`).
- Category names are Bilibili's Chinese names.
- No comments, danmaku text, avatars or user profiles: only the public video data and its uploader's public name, id
  and page.

### How it works

The actor fetches what Bilibili's logged-out pages fetch: a visit to the homepage for the visitor cookie every page
gets, then the search call the search page uses (42 videos per page, all pages of a keyword read back to back), then each
video's data for its counters, and the
Popular, Ranking and Must-Watch lists as their pages load them. It does not log in, sign requests or solve captchas.
When Bilibili refuses a call, the call is tried again on another datacenter IP with a new visitor cookie, then through
residential proxy (at no extra charge to you); if Bilibili still refuses, the keyword's summary says `blocked`.

### FAQ

**Can I search in English?** Yes, and brand or product names work well. For topics, Chinese words find far more
(see Quick start).

**How do I track a topic over time?** Save the input as a task and schedule it (Apify Schedules), for example sorted
by newest with a publish-date range, or the Weekly Must-Watch list every Friday.

**Can I get the comments?** No. The row has the comment count; comment text and commenters are not collected.

**Can I paste a Bilibili link?** A search link (search.bilibili.com/all?keyword=... or m.bilibili.com/search?keyword=...)
is read for its keyword. Video links are not looked up one by one: this actor searches and reads lists.

**Other video sites?** [YouTube Rank Checker & Search Scraper](https://apify.com/siteacs/youtube-search-scraper) does
the same search for YouTube, [YouTube Video Details](https://apify.com/siteacs/youtube-video-details) reads the
figures of known YouTube videos, and [TikTok Video Details](https://apify.com/siteacs/tiktok-video-details) reads
TikTok videos.

# Changelog

This Actor's version history is a separate document: https://apify.com/siteacs/bilibili-search/changelog.md

# Actor input Schema

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

Words to search Bilibili's videos for, one per line, as you would type them into Bilibili's search box. Chinese words find far more: 机械键盘 (mechanical keyboard), 露营 (camping), 原神 (Genshin Impact), 测评 (review). Brand and product names work in English too (iPhone 17, Tesla, DJI). A Bilibili search link (search.bilibili.com/all?keyword=... or m.bilibili.com/search?keyword=...) is read for its keyword. Duplicates are searched once. Leave empty to read only the lists below.

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

How many videos to save for each keyword, in Bilibili's order. A search page holds 42 videos; Bilibili's search stops at 1,000 results (24 pages).

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

The search page's own sort options.

## `duration` (type: `string`):

The search page's duration filter.

## `category` (type: `string`):

Only videos in one of Bilibili's main categories (分区).

## `publishedAfter` (type: `string`):

Only videos published on or after this day (China time, UTC+8, as the site counts days). Format YYYY-MM-DD.

## `publishedBefore` (type: `string`):

Only videos published on or before this day (China time). Format YYYY-MM-DD.

## `popularLists` (type: `array`):

Bilibili's own trending and editor lists, read as their pages load them. Each video row is charged like a search row; each list ends with a free summary row.

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

Which tab of the Ranking page to read (about 100 videos each).

## `weeklyIssue` (type: `integer`):

0: the latest issue. Or an issue number (398 was the week of 30 Oct to 5 Nov 2026; issues go back to number 1 in March 2019).

## `maxListResults` (type: `integer`):

How many videos to save from each list. Popular holds up to 500; Ranking about 100; All-Time Must-Watch about 100; a Weekly issue 30 to 60.

## `liveStats` (type: `boolean`):

On: each search result's counters are read from the video's own data, as its page shows them: likes are current and coins and shares are filled. Off: Bilibili's search index figures only, which is faster; plays, danmaku, comments and favourites match the page, likes can lag behind, coins and shares are empty. Same price either way. List rows always carry live counters.

## `maxConcurrency` (type: `integer`):

How many keywords and lists are read in parallel. The pages of one keyword are read in order.

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

Apify datacenter proxy (the default) works for Bilibili; a call Bilibili refuses is tried again on another IP with a new visitor cookie.

## `residentialFallback` (type: `boolean`):

On: a call Bilibili still refuses after 6 datacenter IPs is tried through Apify residential proxy, at no extra charge to you. Off: the keyword ends there and its summary row says why.

## Actor input object example

```json
{
  "keywords": [
    "露营装备",
    "DJI"
  ],
  "maxResults": 100,
  "sortBy": "relevance",
  "duration": "any",
  "category": "all",
  "rankingCategory": "all",
  "weeklyIssue": 0,
  "maxListResults": 100,
  "liveStats": true,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `overview` (type: `string`):

One item per video in Bilibili's order: keyword or list, position, link, title, uploader, plays, likes, danmaku, comments, duration and publish time (every field in the full item), plus one summary item per keyword or list.

## `engagement` (type: `string`):

Plays, likes, danmaku, comments, favourites, coins and shares per video, with category, tags and uploader.

## `summaries` (type: `string`):

How each keyword or list ended: videos saved, pages read, Bilibili's own count, status and reason.

# 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": [
        "露营装备",
        "DJI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("siteacs/bilibili-search").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": [
        "露营装备",
        "DJI",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("siteacs/bilibili-search").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": [
    "露营装备",
    "DJI"
  ]
}' |
apify call siteacs/bilibili-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siteacs/bilibili-search"
        }
    }
}
```

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/zXG4Vin4L43aVEPRU/builds/c9h5gNKNScxsteiYO/openapi.json
