# Bilibili Scraper 哔哩哔哩 B站 - Videos, Trending, UP主 (No Login) (`zlexang/bilibili-scraper-no-login`) Actor

Scrape Bilibili (B站) by keyword, video URL/BV ID, trending board or creator ID. Views, likes, coins, favorites, danmaku, tags, author. No cookies or login. $2 per 1,000 videos.

- **URL**: https://apify.com/zlexang/bilibili-scraper-no-login.md
- **Developed by:** [Lixiang Zhang](https://apify.com/zlexang) (community)
- **Categories:** Social media, Videos
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 Scraper (哔哩哔哩 / B站) — No Login

Get public Bilibili data without cookies, accounts or a browser:

- **Keyword search**: videos for any keyword, sorted by relevance, views, newest, danmaku or favorites
- **Video details**: from a video URL, BV ID (`BV1xx411c7mD`) or av number
- **Trending**: the 综合热门 (popular) board
- **Creators (UP主)**: followers, following, video count, likes received, verification, level

Price: **$0.002 per video or creator ($2 per 1,000 results)**. You only pay for rows you get.

### What you get

Each video row:

| Field | Example |
|---|---|
| `title`, `url`, `bvid`, `aid` | `https://www.bilibili.com/video/BV1y7nm6ZEwx` |
| `views`, `likes`, `coins`, `favorites`, `shares`, `danmaku`, `comments` | `678992`, `10863`, … |
| `authorName`, `authorMid` | `超能搞机`, `1538983470` |
| `publishedAt` | `2026-10-22T17:08:00+08:00` |
| `durationSec`, `category`, `tags`, `description`, `coverUrl` | `3012`, `数码`, `["机械键盘", …]` |
| `source`, `searchKeyword` | `search`, `机械键盘` |

Search rows have the counts the search page shows. Turn on **Enrich search results** to also get coins, shares and the full tag list (one extra request per video, slower).

Each creator row: `mid`, `url`, `name`, `sign`, `avatarUrl`, `sex`, `level`, `verified`, `followers`, `following`, `videoCount`, `likesReceived`.

Sample:

```json
{
  "type": "video",
  "source": "search",
  "searchKeyword": "机械键盘",
  "bvid": "BV1y7nm6ZEwx",
  "url": "https://www.bilibili.com/video/BV1y7nm6ZEwx",
  "title": "【2026年双11键盘推荐】…",
  "authorName": "超能搞机",
  "views": 678992,
  "likes": 10863,
  "favorites": 5976,
  "danmaku": 192,
  "comments": 386,
  "category": "数码",
  "durationSec": 3012
}
```

### Input

```json
{
  "searchKeywords": ["机械键盘", "AI 教程"],
  "maxResultsPerKeyword": 50,
  "searchOrder": "totalrank",
  "videoUrls": ["https://www.bilibili.com/video/BV1y7nm6ZEwx"],
  "includePopular": true,
  "maxPopular": 100,
  "creatorIds": ["2", "https://space.bilibili.com/1538983470"]
}
```

Every section is optional; fill in the ones you need. `searchOrder`: `totalrank` (relevance), `click` (views), `pubdate` (newest), `dm` (danmaku), `stow` (favorites). Max 1,000 results per keyword.

### Use cases

- Track how a product, brand or game is talked about on B站
- Find creators (KOL / UP主) in a niche and compare their reach
- Watch the trending board for content and market research
- Feed Chinese video titles, tags and descriptions into analysis or LLM pipelines

### Limits

- Public data only. No comments, private or member-only content, and no captcha bypass.
- Bilibili rate-limits busy IPs (error `-412` / `-352`). The Actor slows down and retries. On large runs, enable Apify Proxy in the input.
- Bilibili can change its API at any time. If something breaks, open an issue and I'll fix it.
- You are responsible for using the data in line with Bilibili's terms and the laws that apply to you.

### 中文说明

免登录抓取 B站公开数据：关键词搜索视频、视频详情（链接 / BV号 / av号）、综合热门、UP主粉丝等资料。输出播放、点赞、投币、收藏、分享、弹幕、评论数、标签、分区、发布时间。每条 $0.002，即 1000 条 $2。不需要 Cookie，不抓评论和非公开内容。大批量抓取建议开启 Apify Proxy。

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to search Bilibili videos for (Chinese or English).

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

Bilibili returns at most ~1,000 results (50 pages) per keyword.

## `searchOrder` (type: `string`):

Sort order for keyword search: relevance, most viewed, newest, most danmaku, most favorited.

## `enrichSearchResults` (type: `boolean`):

Fetch each video's detail page to add coins, shares and exact counts (slower, same price).

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

e.g. https://www.bilibili.com/video/BV1xx411c7mD or BV1xx411c7mD

## `includePopular` (type: `boolean`):

Include trending (热门) board

## `maxPopular` (type: `integer`):

Max trending videos

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

e.g. https://space.bilibili.com/2 or 2

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

Usually not needed. Use if you see 412/-352 blocks.

## Actor input object example

```json
{
  "searchKeywords": [
    "机械键盘"
  ],
  "maxResultsPerKeyword": 50,
  "searchOrder": "totalrank",
  "enrichSearchResults": false,
  "includePopular": false,
  "maxPopular": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `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 = {
    "searchKeywords": [
        "机械键盘"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zlexang/bilibili-scraper-no-login").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 = { "searchKeywords": ["机械键盘"] }

# Run the Actor and wait for it to finish
run = client.actor("zlexang/bilibili-scraper-no-login").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 '{
  "searchKeywords": [
    "机械键盘"
  ]
}' |
apify call zlexang/bilibili-scraper-no-login --silent --output-dataset

```

## MCP server setup

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

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/qEqOp9akBbapIrsdj/builds/ZPIXPp0gFgdbb11yh/openapi.json
