# Bilibili Scraper - Video Search, Details & Creators, No Login (`headply/bilibili-scraper`) Actor

Scrape Bilibili (哔哩哔哩) videos by keyword, video URL or creator: views, likes, coins, favorites, danmaku count, tags, parts and creator profiles. Up to 1,000 results per keyword. No login, no API key.

- **URL**: https://apify.com/headply/bilibili-scraper.md
- **Developed by:** [Mayowa Ogedengbe](https://apify.com/headply) (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.80 / 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 Scraper: Video Search, Details & Creators (No Login)

Scrape **Bilibili (哔哩哔哩)** without an account or API key: search videos by keyword, get full details for any video
link, or pull a creator's profile and their whole upload list. Views, likes, coins, favorites, shares, danmaku count,
tags, parts, cover and publish time in clean JSON, CSV or Excel.

- **Search by keyword:** up to **1,000 videos per keyword** (Bilibili's own limit), Chinese or English, five sort orders.
- **Video details:** any `bilibili.com/video/...` link, `b23.tv` short link, BV id or av id.
- **Creators:** profile (followers, total likes, level, verification) plus their videos, newest first, thousands deep.
- **Only new videos:** schedule it and get only videos you have not received before, for keyword alerts or creator tracking.
- **No login, no cookies, no API key.** Bilibili has no public API for this; the Actor reads what the website shows logged-out visitors.

### Why this one

Many Bilibili scrapers quietly return empty pages when Bilibili pushes back. This one is built for reliability: a run
delivers the data or tells you exactly what failed, it never hands you an empty result without saying why.

Tested on the platform: 4 keywords × 1,000 = **3,997 videos in 156 seconds**, 99.5% of requests succeeding on the first
try, every input delivered.

### Input examples

Search, newest first, with full details:

```json
{ "mode": "search", "searchQueries": ["露营", "camping vlog"], "maxResultsPerQuery": 200, "sortBy": "newest", "includeDetails": true }
```

Details for specific videos:

```json
{ "mode": "videos", "videoUrls": ["https://www.bilibili.com/video/BV1xx411c7XX", "https://b23.tv/AbCdEf1", "av170001"] }
```

Creators and their latest 100 videos:

```json
{ "mode": "creators", "creatorUrls": ["https://space.bilibili.com/946974"], "maxVideosPerCreator": 100 }
```

Sort options: `relevance`, `newest`, `views`, `danmaku`, `favorites`. `includeDetails` adds coins, shares, exact likes, parts
and the full tag list to search results (one extra request per video).

### Output sample

A video (search with details):

```json
{
  "type": "video",
  "bvid": "BV18hhq6vES4",
  "aid": 117309465171557,
  "url": "https://www.bilibili.com/video/BV18hhq6vES4",
  "title": "连续四天暴雨露营 | 自然ASMR",
  "publishedAt": "2026-09-21T14:45:40Z",
  "durationSeconds": 8685,
  "category": "出行",
  "categoryId": 250,
  "tags": ["暴雨", "治愈", "露营", "雨", "户外"],
  "copyrightCode": 1,
  "author": { "mid": 542603664, "name": "쏘베리Ssoberry", "avatarUrl": "https://i0.hdslb.com/bfs/face/....jpg" },
  "stats": { "views": 28354, "danmaku": 115, "comments": 29, "favorites": 411, "coins": 169, "shares": 52, "likes": 485 },
  "parts": [{ "cid": 42062580402, "part": 1, "title": "连续四天暴雨露营 | 自然ASMR", "durationSeconds": 8685 }],
  "width": 3840, "height": 2160,
  "source": "search", "searchKeyword": "露营", "searchRank": 1,
  "scrapedAt": "2026-10-12T08:00:00Z"
}
```

A creator:

```json
{
  "type": "creator", "mid": 946974, "url": "https://space.bilibili.com/946974", "name": "影视飓风",
  "followers": 18627708, "following": 686, "videoCount": 948, "totalLikes": 128702162, "level": 6,
  "verified": true, "verifiedTitle": "...", "bio": "...", "scrapedAt": "2026-10-12T08:00:00Z"
}
```

Field names are stable: new fields may be added, existing ones are never renamed or removed. Times are ISO-8601 UTC and
missing values are explicit `null`. Every run also writes a `SUMMARY` record (counts, anything skipped and why, request
success ratio).

### Pricing

Pay only for rows delivered. No monthly fee.

| Event | Price per 1,000 |
|---|---|
| Video | $4.00 |
| Creator profile | $4.00 |
| Run start | $0.001 per run |

Higher Apify plans get automatic discounts. Examples: **1,000 search results ≈ $4.00**; a daily alert that finds 30 new
videos ≈ $0.12 a day. Not charged: videos skipped by "only new", inputs that are not Bilibili links, videos that no longer exist.

### Schedule it: new-video alerts

1. Set `"onlyNew": true` and `"sortBy": "newest"` (relevance ranking reshuffles between sessions, newest does not).
2. Save as a task and add a schedule (e.g. every 6 hours) in Apify Console → Schedules.
3. Each run returns only videos the monitor has not returned before. Use different `monitorName` values for separate watch lists.

### Use it from code, n8n or Make

API (returns the dataset when the run finishes):

```bash
curl -X POST "https://api.apify.com/v2/acts/headply~bilibili-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"search","searchQueries":["露营"],"maxResultsPerQuery":50,"sortBy":"newest"}'
```

**n8n:** add the *Apify* node → *Run actor and get dataset*, actor `headply/bilibili-scraper`, paste the input JSON, then
connect Google Sheets, Slack or a database node. Same with Make's Apify module.

### FAQ and limits

- **Do I need a Bilibili account or cookie?** No.
- **How many results per keyword?** Bilibili shows at most 1,000 (50 pages × 20); the Actor reaches all of them.
- **Comments?** Not included: Bilibili shows only 3 comments per video to logged-out visitors, and this Actor does not
  deliver partial data. Danmaku (bullet comments) are complete: see the sibling Actor below.
- **Category names** come from search results; for `videos` and `creators` modes Bilibili returns only `categoryId`.
- **Private, deleted or region-locked videos** are listed in the run summary and not charged.
- **Speed:** about 25 videos per second in search mode; `includeDetails` is slower (two requests per video).

### Related

- [Bilibili Danmaku Scraper](https://apify.com/headply/bilibili-danmaku-scraper): the complete danmaku (bullet comment) track of any video.

# Actor input Schema

## `mode` (type: `string`):

One job per run. Each job uses the matching inputs below.

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

Mode 'search': keywords, Chinese or English. Each returns up to 1,000 videos.

## `maxResultsPerQuery` (type: `integer`):

Mode 'search'. Bilibili shows at most 1,000 results per keyword (50 pages x 20).

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

Mode 'search'.

## `includeDetails` (type: `boolean`):

Mode 'search': adds coins, shares, exact likes, parts and the full tag list (one extra request per video, slower).

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

Modes 'videos', 'danmaku': bilibili.com/video URLs, b23.tv short links, BV ids or av ids. Add ?p=2 to a URL to take danmaku from that part only.

## `creatorUrls` (type: `array`):

Mode 'creators': space.bilibili.com/<id> URLs or numeric user ids.

## `maxVideosPerCreator` (type: `integer`):

Mode 'creators': newest first. 0 = profile only.

## `maxDanmakuPerVideo` (type: `integer`):

Mode 'danmaku': in video-time order.

## `onlyNew` (type: `boolean`):

Modes 'search' and 'creators': for scheduled runs, deliver only videos this monitor has not returned before.

## `monitorName` (type: `string`):

Keeps separate memories for different schedules.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "露营"
  ],
  "maxResultsPerQuery": 50,
  "sortBy": "relevance",
  "includeDetails": false,
  "videoUrls": [],
  "creatorUrls": [],
  "maxVideosPerCreator": 30,
  "maxDanmakuPerVideo": 5000,
  "onlyNew": false,
  "monitorName": "default"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "searchQueries": [
        "露营"
    ],
    "videoUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("headply/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 = {
    "searchQueries": ["露营"],
    "videoUrls": [],
}

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

```

## MCP server setup

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