# Bilibili Search Scraper — Full Stats · No Login · $0.01 (`gio21/bilibili-scraper`) Actor

Search Bilibili by keyword and get full video stats in one record: views, danmaku, likes, favorites, comments, uploader and tags. No login. $0.01 per video, no separate charge for stats.

- **URL**: https://apify.com/gio21/bilibili-scraper.md
- **Developed by:** [Gio](https://apify.com/gio21) (community)
- **Categories:** Social media, Videos, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 video scrapeds

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 — Full Stats · No Login · $0.01

Search Bilibili, China's largest video and streaming platform, by keyword and get back one record per video with full engagement stats: views, danmaku, likes, favorites, comments, duration, cover image, uploader and tags. No Bilibili account, no login and no cookies required.

### Why use this scraper

Bilibili has no public search API for third parties, and its engagement metrics (danmaku count, favorites, coins) are unique to the platform and not replicated by any general video search tool. Brands running Chinese social listening, researchers tracking gaming and anime content trends, and creators scouting competing channels all need these numbers, but pulling them by hand from the site does not scale past a handful of searches.

This actor reads the same public search results Bilibili serves to any visitor, with no login wall in the way, and returns a clean, structured record per video including every stat Bilibili shows on the result card. Search by any keyword, in English or Chinese, and sort the results the way Bilibili itself allows.

### Overview

Input is a search keyword plus an optional sort order. The actor queries Bilibili's public search and returns one JSON record per video: identifiers (bvid, aid), title, description, duration, publish date, cover image, category, uploader name and profile URL, and the engagement numbers (views, danmaku, likes, favorites, comments) and tags. A search for 30 videos typically finishes in under a minute.

### Supported inputs

- **Search keyword (`keyword`)** — any search term, in English or Chinese, e.g. `"genshin impact"` or `"美食"`.
- **Sort order (`sortBy`)** — `relevance` (default), `click` (most viewed), `pubdate` (newest), `danmaku` (most danmaku), `favorites` (most favorited) or `comments` (most commented).
- **Max videos (`maxItems`)** — caps how many videos are returned for the search (default 30, up to 300).
- **Proxy configuration** — Apify Proxy is enabled by default and recommended, since Bilibili rate-limits by IP; most users can leave this at its default.

### Use cases

- **Social listening and brand monitoring teams** — track how a brand, game or show is being covered on Bilibili by searching its name and sorting by newest or most viewed.
- **Gaming and anime marketing teams** — scout which creators are already covering a title and how much engagement (danmaku, favorites) their videos draw.
- **Market researchers** — measure relative interest in a topic on Bilibili by comparing view counts and danmaku density across search results.
- **Competitive content research** — pull a competitor channel's best-performing videos on a topic by keyword and sort order, without opening Bilibili manually.
- **Trend and content-calendar teams** — run a recurring search on a topic to spot emerging videos before they peak in views.

### How it works

The actor queries the same public search endpoint Bilibili's own search page uses, with no login required, and reads each result's metadata and engagement stats directly from that response. Because this is the public search surface rather than a logged-in API, there is no Bilibili account on your side that can be rate-limited or banned; the built-in proxy support exists purely to spread request volume and avoid IP-based throttling on larger searches.

### Input configuration

**Simple keyword search:**

```json
{
  "keyword": "genshin impact",
  "maxItems": 30
}
```

**Most-viewed videos on a topic:**

```json
{
  "keyword": "美食",
  "sortBy": "click",
  "maxItems": 50
}
```

**Newest videos with heavy proxy use for a larger pull:**

```json
{
  "keyword": "unboxing",
  "sortBy": "pubdate",
  "maxItems": 200,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output sample

Real output from a live run:

```json
[
  {
    "bvid": "BV1zqW765EJ9",
    "aid": 117579762961393,
    "title": "Genshin Impact 7.3 Weekly Boss Gameplay Full Walkthrough Demo",
    "url": "https://www.bilibili.com/video/BV1zqW765EJ9",
    "description": "Check out the new Version 7.3 Weekly Boss gameplay in Genshin Impact!...",
    "durationText": "4:7",
    "publishedAt": "2026-11-08T08:07:46.000Z",
    "coverUrl": "https://i1.hdslb.com/bfs/archive/3292e3b969fe1b65598f70e4747ddeafec0a16cc.jpg",
    "category": "手机游戏",
    "keyword": "genshin impact",
    "authorName": "tsaritsadaily",
    "authorMid": 1551566300,
    "authorUrl": "https://space.bilibili.com/1551566300",
    "views": 18621,
    "danmaku": 100,
    "likes": 193,
    "favorites": 124,
    "comments": 140,
    "tags": ["genshin", "genshin impact", "genshin 7.3", "genshin news"],
    "scrapedAt": "2026-11-09T09:18:35.670Z"
  }
]
```

### Key output fields

| Field | Type | Description |
|---|---|---|
| `bvid` | string | Bilibili's video identifier (the one shown in the video URL) |
| `aid` | number | Bilibili's numeric legacy video ID |
| `title` | string | Video title |
| `url` | string | Canonical Bilibili video URL |
| `description` | string | Video description as written by the uploader |
| `durationText` | string | Video duration as shown on the result card |
| `publishedAt` | string | ISO publish timestamp |
| `coverUrl` | string | Thumbnail/cover image URL |
| `category` | string | Bilibili's content category (often in Chinese) |
| `keyword` | string | The search keyword that returned this video |
| `authorName` | string | Uploader's display name |
| `authorMid` | number | Uploader's numeric Bilibili user ID |
| `authorUrl` | string | Uploader's channel URL |
| `views` | number | View count at scrape time |
| `danmaku` | number | Danmaku (floating comment) count at scrape time |
| `likes` | number | Like count at scrape time |
| `favorites` | number | Favorite (collection) count at scrape time |
| `comments` | number | Comment count at scrape time |
| `tags` | array of strings | Tags attached to the video by its uploader |
| `scrapedAt` | string | ISO timestamp of the scrape |

### Pricing

Pay-per-event, charged only for videos actually returned:

| Event | Price |
|---|---|
| Video scraped | $0.01 per video |

At $0.01/video, 1,000 videos cost $10.00. One flat price for the full stat set above, no separate charge for any of the included fields.

### What makes this richer than the competition

`zhorex/bilibili-scraper`, the highest-traffic Bilibili actor on the Store, charges $0.02/item, double this actor's $0.01, and additionally charges $0.05 per video as a separate "danmaku reaction profile" event if a buyer wants danmaku detail beyond a raw count. This actor includes the raw `danmaku` count in every video record at no extra charge, so a buyer who just needs the danmaku volume alongside the other stats does not need to opt into and pay for a second event type. `lofomachines/bilibili-scraper`, the second-highest-traffic actor in the category, covers a broader feature set (profiles, comments, search) across multiple actors or modes; this actor stays scoped to search results with full stats in a single call, which keeps the input simple for the common case of "search a keyword, get ranked videos with their numbers."

### Notes & limitations

- `description` can be truncated by Bilibili itself on the search result card rather than by this actor; the full description is only visible on the video's own page.
- `category` and some text fields come back in Chinese even for an English-language search keyword, reflecting how Bilibili itself labels the content; this is not translated by the actor.
- The actor searches and returns videos only; it does not fetch comments, danmaku text content or uploader channel statistics beyond what is shown on the search card.
- Engagement numbers (`views`, `likes`, `favorites`, `comments`, `danmaku`) reflect the moment of the scrape and will differ from a later check, since they change continuously on Bilibili.
- A very niche keyword with few matching videos on Bilibili returns fewer items than `maxItems`; this reflects actual search volume, not a scraping shortfall.
- Live streams and some member-exclusive content are not indexed by Bilibili's public search and will not appear in results.

### FAQ

**Does this need a Bilibili account or login?**
No. The actor queries the same public search any visitor can use without signing in.

**Can I search with a Chinese keyword?**
Yes, the actor accepts any keyword in any language Bilibili's search supports, including Chinese.

**Does it return the actual danmaku comments, or just the count?**
Just the count. This actor returns the `danmaku` number shown on the search card; scraping the individual danmaku comment text is out of scope.

**Can I sort by most-commented instead of most-viewed?**
Yes, set `sortBy` to `comments` for that order, or `click` for most-viewed, `favorites` for most-favorited, and `danmaku` for most danmaku.

**Does it work for live-stream search?**
No, this actor is scoped to regular uploaded videos as returned by Bilibili's video search, not live streams.

**How many videos can I pull in one run?**
Up to 300 per run via `maxItems`; for more, run the actor again with a different keyword or sort order to cover a broader slice of the topic.

**Does the price change based on my Apify plan?**
No. This actor charges a flat $0.01 per video regardless of your Apify plan tier.

### For AI Agents & LLM Apps

This actor is available over the Apify MCP server (`mcp.apify.com`) for direct use from Claude, Cursor or any MCP-compatible agent, and over the plain REST API for scripted pipelines.

Synchronous call that returns dataset items directly, no polling required:

```bash
curl "https://api.apify.com/v2/acts/gio21~bilibili-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"keyword": "genshin impact", "maxItems": 30}'
```

A single keyword with `maxItems` around 30 to 50 is the sweet spot for most social-listening checks, keeping runtime short while still covering a representative slice of a topic's coverage on Bilibili.

### Disclaimer

This actor is an independent tool that extracts publicly available Bilibili search data. It is not affiliated with, endorsed by or sponsored by Bilibili Inc. "Bilibili" is a trademark of its respective owner. Use it in line with Bilibili's own terms and any applicable data protection law in your jurisdiction.

### SEO Keywords

Bilibili scraper, Bilibili search API, Bilibili video data, Bilibili danmaku scraper, Chinese video platform scraper, no-login Bilibili scraper.

# Actor input Schema

## `keyword` (type: `string`):

What to search for on Bilibili, e.g. "genshin impact", "美食", "unboxing".

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

Order of the search results.

## `maxItems` (type: `integer`):

Maximum number of videos to return.

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

Proxy used for requests. Apify Proxy is enabled by default and recommended (Bilibili rate-limits by IP).

## Actor input object example

```json
{
  "keyword": "genshin impact",
  "sortBy": "relevance",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped Bilibili videos - title, uploader, views, danmaku, likes, favorites, comments, duration and URL.

# 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 = {
    "keyword": "genshin impact"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gio21/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 = { "keyword": "genshin impact" }

# Run the Actor and wait for it to finish
run = client.actor("gio21/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 '{
  "keyword": "genshin impact"
}' |
apify call gio21/bilibili-scraper --silent --output-dataset

```

## MCP server setup

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