# Bilibili Video Scraper: Search & Channel Videos (`luzivanlt/bilibili-videos-scraper`) Actor

Bilibili videos from searches or whole channels, each with its full detail page's data. $1.50 per 1,000 videos. Views, likes, coins, saves, parts.

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

## Pricing

from $1.05 / 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.
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?

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 Scraper: Search & Channel Videos

Get Bilibili videos from searches or from whole channels, read to the
channel's last upload, each with what its video page shows: views, likes,
coins, saves, shares, comments and danmaku, chart ranks, every part, the
uploader, and co-creators and the collection when it has them. No Bilibili
account, login or cookies needed.

Tested daily. Latest checks: 20 of 20 videos for one search in 37 seconds;
400 of 400 from a search and a channel (200 each) in 14 minutes.

### What does this Actor do?

You give it searches (the words you would type in Bilibili's search box),
Bilibili search links, or channels. For a search it reads the results page
after page, in Bilibili's order; for a channel it reads every video the
channel uploaded, newest first. It then reads each video and saves one row
per video until it reaches your limit or the end of the list.

Each row comes with:

- the video's ids (`BV…` and the older `av` number), link, title, full
  description, cover, publish and upload dates, length and its place in the
  list (1 = the top result or the newest upload)
- its numbers: views, likes, coins, saves, shares, comments, danmaku (the
  comments shown on the video) and dislikes, plus its rank on Bilibili's
  charts, and honors such as "weekly must-watch" when it has any
- for a search result, its category name and tags (a channel's videos carry
  the category's number only)
- whether it is original or a repost, members-only, a story, or part of a
  paid collection, and its rights (download, reprint, autoplay …)
- every part of a multi-part video: title, length, size and first frame
- when Bilibili shows them: the notice under the video (such as "contains
  AI-generated content"), the uploader's post that came with it and its
  subtitle languages
- the uploader (id, name, picture, link) and, for a joint video, every
  co-creator with their role and followers
- for a video in a collection (合集): the collection, with its totals and the
  list of its videos
- the search or channel it came from, and for a channel its count of videos

### Why use it?

- **Whole channels.** A channel is read to its last upload, and the run's
  status compares what it read with the count Bilibili gives for the channel
  (that count includes deleted and hidden videos, which are skipped).
- **Everything the video page shows.** Coins, saves, shares, danmaku,
  chart ranks, parts, and honors, co-creators and collections where a video
  has them, at no extra cost.
- **Bilibili's own sort and length filters** for searches, or paste a search
  link with the ones you already picked.
- **Use the data anywhere.** Download as JSON, CSV or Excel, or send it to
  your own tools through Apify's API and integrations.

### How to use it

1. Type one or more searches into **Searches**, or paste channel or search
   links into **Channel or search links**.
2. Optionally, set **Max videos per search or channel**, **Sort by** and
   **Length**.
3. Click **Start**. When the run ends, open the **Output** tab to view the
   videos or download them.

Run it with no input to see a sample: up to 20 videos for "minecraft", charged
as usual.

### Input

| Field                                              | What it does                                                                      | Default     |
| -------------------------------------------------- | --------------------------------------------------------------------------------- | ----------- |
| **Searches** (`searchQueries`)                     | Words to search for, one search each                                              | —           |
| **Channel or search links** (`startUrls`)          | `space.bilibili.com/<id>` channel links or ids, and Bilibili search links         | —           |
| **Max videos per search or channel** (`maxVideos`) | Stop each search or channel after this many videos (1 to 5,000)                   | 50          |
| **Sort by** (`sortBy`)                             | `totalrank` (best match), `click` (most played), `pubdate` (newest), `dm`, `stow` | `totalrank` |
| **Length** (`duration`)                            | `any`, `under10`, `10to30`, `30to60` or `over60` (minutes)                        | `any`       |

Give at least one search or one link. Example input:

```json
{
  "searchQueries": ["原神", "minecraft"],
  "startUrls": ["https://space.bilibili.com/2"],
  "maxVideos": 200,
  "sortBy": "pubdate"
}
```

### Output

One row per video. An example, with made-up values:

```json
{
  "bvid": "BV1xx411c7mD",
  "aid": 170001,
  "url": "https://www.bilibili.com/video/BV1xx411c7mD",
  "title": "A video title",
  "description": "The whole description …",
  "description_segments": [{ "text": "The whole description …", "type": 1, "biz_id": 0 }],
  "cover_url": "http://i0.hdslb.com/bfs/archive/….jpg",
  "published_at": "2026-10-01T12:00:00.000Z",
  "uploaded_at": "2026-10-01T11:40:00.000Z",
  "duration_seconds": 754,
  "part_count": 1,
  "parts": [
    {
      "cid": 279786,
      "page": 1,
      "title": "Part one",
      "duration_seconds": 754,
      "width": 1920,
      "height": 1080,
      "first_frame_url": "http://i0.hdslb.com/bfs/storyff/….jpg",
      "uploaded_at": "2026-10-01T11:40:00.000Z",
      "source": "vupload",
      "external_id": null,
      "external_link": null,
      "asr_language": null
    }
  ],
  "category": "Gaming",
  "category_id": 17,
  "category_id_v2": 2001,
  "tags": ["minecraft", "survival"],
  "is_original": true,
  "copyright": 1,
  "state": 0,
  "owner_mid": 2,
  "owner_name": "An uploader",
  "owner_avatar_url": "https://i0.hdslb.com/bfs/face/….jpg",
  "owner_url": "https://space.bilibili.com/2",
  "staff": [],
  "view_count": 123456,
  "like_count": 7890,
  "coin_count": 1234,
  "favorite_count": 2345,
  "share_count": 345,
  "comment_count": 456,
  "danmaku_count": 567,
  "dislike_count": 0,
  "vt": 0,
  "current_rank": 0,
  "highest_rank": 0,
  "honors": [],
  "notice": null,
  "notice_type": 0,
  "notice_link": null,
  "dynamic_text": null,
  "cid": 279786,
  "width": 1920,
  "height": 1080,
  "rotate": 0,
  "subtitles": [],
  "subtitle_submit_open": false,
  "rights": { "download": true, "no_reprint": true, "autoplay": true, "pay": false },
  "is_members_only": false,
  "is_members_preview": false,
  "is_paid_collection": false,
  "is_story": false,
  "premiere": null,
  "mission_id": null,
  "collection": null,
  "position": 1,
  "source": "search",
  "search_keyword": "minecraft",
  "search_total": 1000,
  "channel_mid": null,
  "channel_total": null,
  "source_url": "https://search.bilibili.com/video?keyword=minecraft"
}
```

| Field                  | What it holds                                                                                   |
| ---------------------- | ----------------------------------------------------------------------------------------------- |
| `bvid`                 | The video's id (`BV…`)                                                                          |
| `aid`                  | Its older number id (`av…`)                                                                     |
| `url`                  | A link to the video                                                                             |
| `title`                | The title                                                                                       |
| `description`          | The whole description                                                                           |
| `description_segments` | The description in parts: text, and the people it mentions (`type` 2, their id in `biz_id`)     |
| `cover_url`            | The cover picture                                                                               |
| `published_at`         | When it was published (ISO date and time)                                                       |
| `uploaded_at`          | When it was uploaded                                                                            |
| `duration_seconds`     | Its length in seconds, all parts together                                                       |
| `part_count`           | How many parts it has                                                                           |
| `parts`                | Each part: id, number, title, length, size, first frame, upload date, source                    |
| `category`             | Its category's name (search results only)                                                       |
| `category_id`          | Its category's number                                                                           |
| `category_id_v2`       | Its category's number in Bilibili's newer list                                                  |
| `tags`                 | Its tags (search results only; empty for channel videos)                                        |
| `is_original`          | Whether it is the uploader's own work rather than a repost                                      |
| `copyright`            | 1 = original, 2 = repost                                                                        |
| `state`                | Bilibili's state for it (0 = open)                                                              |
| `owner_mid`            | The uploader's id                                                                               |
| `owner_name`           | The uploader's name                                                                             |
| `owner_avatar_url`     | The uploader's picture                                                                          |
| `owner_url`            | A link to the uploader's channel                                                                |
| `staff`                | For a joint video: every co-creator (id, name, role, picture, followers)                        |
| `view_count`           | Views                                                                                           |
| `like_count`           | Likes                                                                                           |
| `coin_count`           | Coins given                                                                                     |
| `favorite_count`       | Saves (favorites)                                                                               |
| `share_count`          | Shares                                                                                          |
| `comment_count`        | Comments                                                                                        |
| `danmaku_count`        | Danmaku (comments shown on the video)                                                           |
| `dislike_count`        | Dislikes (Bilibili shows 0 for most videos)                                                     |
| `vt`                   | Bilibili's `vt` count, as given                                                                 |
| `current_rank`         | Its place on Bilibili's chart now (0 = not on it)                                               |
| `highest_rank`         | The best place it ever reached (0 = never on it)                                                |
| `honors`               | Honors such as "weekly must-watch" (type, text)                                                 |
| `notice`               | The notice Bilibili shows under the video, such as "contains AI-generated content"              |
| `notice_type`          | That notice's type                                                                              |
| `notice_link`          | That notice's link, when it has one                                                             |
| `dynamic_text`         | The uploader's post that came with the video                                                    |
| `cid`                  | The first part's id                                                                             |
| `width`, `height`      | The video's size                                                                                |
| `rotate`               | 1 when the video is turned on its side                                                          |
| `subtitles`            | Its subtitle languages (id, language code and name, whether AI-made)                            |
| `subtitle_submit_open` | Whether viewers may add subtitles                                                               |
| `rights`               | Its rights as yes/no: download, reprint, autoplay, paid, interactive (`is_stein_gate`) …        |
| `is_members_only`      | Whether only the uploader's paying members may watch                                            |
| `is_members_preview`   | Whether non-members see a preview                                                               |
| `is_paid_collection`   | Whether it is part of a paid collection                                                         |
| `is_story`             | Whether it is a vertical "story" video                                                          |
| `premiere`             | Its premiere, when it has one                                                                   |
| `mission_id`           | The event it was entered in, when it was                                                        |
| `collection`           | The collection (合集) it belongs to: id, title, cover, intro, totals and the list of its videos |
| `position`             | Its place in the search's results or the channel's list, 1 = the first                          |
| `source`               | `search` or `channel`                                                                           |
| `search_keyword`       | The search it came from                                                                         |
| `search_total`         | How many results Bilibili gives for that search (at most 1,000)                                 |
| `channel_mid`          | The channel it came from                                                                        |
| `channel_total`        | That channel's count of videos                                                                  |
| `source_url`           | The search or channel link                                                                      |

Not included: comments, danmaku text, subtitles' text, the video file and a
channel video's tags.

### How much does it cost?

No surcharges and no paid options; an item that fails is not charged.

You pay for what you get:

- **$1.50 per 1,000 videos** ($0.0015 a video). Each video is charged once per run.
- No start fee, and nothing per search or channel.

So 1,000 videos cost $1.50. If you set a maximum cost for a run, the Actor
stops when it reaches it and keeps every video saved so far.

### How long does a run take?

About 40 seconds for 20 videos, then about 2 seconds a video: 400 videos
took 14 minutes. A run's default time limit (1 hour) holds about 1,700
videos; for more, raise **Timeout** under the run's options.

### Good to know

- **A search ends at 1,000 videos.** Bilibili shows at most 50 pages of 20
  results for a search, so a search ends there even with a higher maximum.
  Narrow it with **Length** or several searches to get more.
- **A channel is read newest first**, to its last upload or your maximum.
- **A video found by two searches is saved and charged once**, under the
  search that reached it first.
- **A pasted search link keeps its own sort and length**, which win over the
  fields above it.
- **Check your links first.** A link that is not a Bilibili channel or search
  link (a video page, for example) stops the run before anything is read, and
  the message names it.
- **One search or channel that cannot be read does not stop the run.** The
  others carry on, and the run's status names the ones that could not be read.
- **A deleted, hidden or region-locked video is skipped** and not charged,
  and so is a video Bilibili still refuses after a few tries.

### More Actors from us

- [AliExpress Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/aliexpress-products-scraper): Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- [Amazon Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/amazon-products-scraper): Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- [App Store Reviews Scraper: All Reviews, Not 500](https://apify.com/luzivanlt/app-store-reviews-scraper): Every written App Store review of an app, not just the newest 500.
- [Woolworths Coles ALDI Scraper: AU Grocery Prices](https://apify.com/luzivanlt/au-supermarkets-scraper): Woolworths, Coles and ALDI products for any search in one run, every results page to the end.
- [Career Site Jobs Scraper: Workday, Greenhouse, Lever](https://apify.com/luzivanlt/career-site-jobs-scraper): Every job on Greenhouse, Lever, Ashby, SmartRecruiters and Workday boards, checked against each board's count.
- [Facebook Ads Library Scraper: Meta Ads by Keyword or Page](https://apify.com/luzivanlt/facebook-ads-library-scraper): Meta Ad Library ads by keyword, Page or Ad Library link, with text, images, videos and dates.

### Use it from an AI agent or the API

One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with `POST /v2/acts/…/runs` and read its dataset):

```text
POST https://api.apify.com/v2/acts/luzivanlt~bilibili-videos-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

With the sample input as its JSON body:

```json
{
  "searchQueries": ["minecraft"],
  "maxVideos": 20,
  "sortBy": "totalrank",
  "duration": "any"
}
```

Its inputs, in the order of the input form:

| Input                                          | What it takes                                                                                                                                                                                                                                                    | Default       |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `searchQueries` (Searches)                     | Words to search Bilibili for, one search per line, as you would type them in Bilibili's search box (Chinese or any other language), up to 100 characters each.                                                                                                   | —             |
| `startUrls` (Channel or search links)          | Bilibili channel links (https://space.bilibili.com/\<id>, any of its tabs) or bare channel ids for every video a channel uploaded, newest first; and Bilibili search links (https://search.bilibili.com/video?keyword=…), each keeping its own sort and length. | —             |
| `maxVideos` (Max videos per search or channel) | Stop each search or channel after this many videos.                                                                                                                                                                                                              | `50`          |
| `sortBy` (Sort by)                             | The order Bilibili lists a search's videos in: best match, most played, newest, most comments on screen (danmaku) or most saved.                                                                                                                                 | `"totalrank"` |
| `duration` (Length)                            | Keep only videos of this length: any, under 10 minutes, 10–30 minutes, 30–60 minutes or over 60 minutes.                                                                                                                                                         | `"any"`       |

Apify's MCP server, `https://mcp.apify.com`, lists it as `luzivanlt/bilibili-videos-scraper`. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=luzivanlt/bilibili-videos-scraper"
    }
  }
}
```

The client signs in with OAuth, or add `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`.

Charged per video delivered; the sample input above costs at most $0.01.

### FAQ

**Do I need a Bilibili account or cookies?**
No. The Actor reads what anyone can see on Bilibili without logging in.

**Can I search in Chinese?**
Yes. Type the words as you would on Bilibili; any language works.

**Can I run it from my own code, on a schedule, or with other apps?**
Yes. Like any Apify Actor, you can start it through the Apify API, run it on a
schedule, and connect it to other apps with Apify's integrations and webhooks.

### Is it legal to scrape Bilibili?

This Actor reads only what anyone can see on Bilibili without logging in.
Check Bilibili's terms and the laws that apply to you before you use the
data, and only collect personal data when you have a legitimate reason to. If
you are unsure, ask a lawyer.

### Support

Found a problem or missing a feature? Open an issue on the **Issues** tab and
include the run's link.

***

This Actor is not affiliated with, endorsed by or sponsored by Bilibili.

# Changelog

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

# Actor input Schema

## `searchQueries` (type: `array`):

Words to search Bilibili for, one search per line, as you would type them in Bilibili's search box (Chinese or any other language), up to 100 characters each. Sort by and Length apply to these searches. A link is refused here: paste it under Channel or search links. Give at least one search or one link. Example: 原神

## `startUrls` (type: `array`):

Bilibili channel links (https://space.bilibili.com/<id>, any of its tabs) or bare channel ids for every video a channel uploaded, newest first; and Bilibili search links (https://search.bilibili.com/video?keyword=…), each keeping its own sort and length. Example: https://space.bilibili.com/2

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

Stop each search or channel after this many videos. A search ends on its own after at most 1,000 videos, Bilibili's own limit; a channel after its last upload. Default 50, from 1 to 5,000. It caps what you pay: each video saved costs $0.0015 ($1.50 per 1,000), so 50 per search costs at most $0.075. A video found by two searches is charged once.

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

The order Bilibili lists a search's videos in: best match, most played, newest, most comments on screen (danmaku) or most saved. Default best match. With Max videos set, it decides which videos you get. Applies to the searches above; a pasted search link keeps its own. Example: "pubdate" for the newest first.

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

Keep only videos of this length: any, under 10 minutes, 10–30 minutes, 30–60 minutes or over 60 minutes. Default any. Applies to the searches above; a pasted search link keeps its own. Example: "under10" for videos under 10 minutes.

## Actor input object example

```json
{
  "searchQueries": [
    "minecraft"
  ],
  "maxVideos": 20,
  "sortBy": "totalrank",
  "duration": "any"
}
```

# Actor output Schema

## `videos` (type: `string`):

Every video the run saved, one row each.

## `allFields` (type: `string`):

The same rows with every field.

# 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 = {
    "searchQueries": [
        "minecraft"
    ],
    "maxVideos": 20
};

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

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

```

## MCP server setup

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