# Bilibili Videos Scraper (`parseforge/bilibili-video-scraper`) Actor

Scrape Bilibili videos by keyword, popular feed, ranking, or video URL. Get title, views, likes, danmaku, duration, uploader, and publish date. Export to CSV, JSON, Excel, or XML.

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

## Pricing

from $4.53 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 📺 Bilibili Videos Scraper

> 🚀 **Export Bilibili videos in seconds.** Up to 1,000 videos per keyword, 100 from the ranking, the whole popular feed, or any single video page. 23 fields per row: cover, title, views, danmaku, likes, favorites, comments, duration, category, uploader, and publish date.

Bilibili Videos Scraper collects public video metadata from Bilibili (bilibili.com), the largest Chinese video community, through the same JSON endpoints its own web app calls. No login, no browser rendering, no Bilibili API key. Give it a keyword, a video URL, the popular feed, or the ranking, and every video comes back as one flat row you can export to CSV, JSON, Excel, or XML.

Coverage in numbers: 50 videos per search page, at most 1,000 results per keyword (Bilibili's own search cap), 100 videos in the ranking, several hundred in the popular feed, and 23 fields per video including an exact ISO publish date instead of the relative "3 days ago" shown on the page.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Market and trend analysts | Track what is trending on Bilibili's popular feed and ranking every day |
| Video marketers and agencies | Benchmark competitor channels by keyword, views, likes, and favorites |
| Researchers and journalists | Study Chinese online video culture with exact publish dates and categories |
| Creators and MCNs | Find low-competition keywords and fast-rising uploaders |

### 📋 What the Bilibili Videos Scraper does

- Searches Bilibili by keyword (Chinese or English), with the same sort (relevance, views, newest, danmaku, favorites) and duration filters the site offers.
- Collects the popular feed (`/v/popular/all`) and the all-category ranking (`/v/popular/rank/all`).
- Reads any single video page (`/video/BV...`, `/video/av...`, or a `b23.tv` short link).
- Returns cover image, title, URL, BV id, views, danmaku, likes, favorites, comments, duration (formatted and in seconds), category, uploader name, id, URL and avatar, publish date, and description.
- Deduplicates by BV id across every source in the run, so a video that appears in two searches is exported and billed once.

> 💡 **Why it matters:** Bilibili shows counts as "797.9万" and dates as "03-24". This Actor gives you both the display text and the exact number (7,978,531) and the exact timestamp (2026-03-24T05:53:12Z), so spreadsheets and dashboards work without manual cleanup.

### 🎬 Full Demo (🚧 Coming soon)

A short walkthrough video will be added here.

### 📊 Output

Each video is one flat row with these fields, in this order:

| Field | Description |
|---|---|
| 🖼 `imageUrl` | Video cover image |
| 📌 `title` | Video title, HTML highlighting removed |
| 🔗 `url` | Canonical video URL |
| 🆔 `videoId` | BV id |
| 👁 `views` | Play count as a number |
| 👁 `viewsText` | Play count in Bilibili's short form (万 / 亿) |
| 💬 `danmakuCount` | Danmaku (on-screen comment) count |
| 💬 `danmakuText` | Danmaku count in short form |
| 👍 `likes` | Likes |
| ⭐ `favorites` | Favorites (collections) |
| 🗨 `comments` | Comment (reply) count |
| ⏱ `duration` | Length as H:MM:SS |
| ⏱ `durationSeconds` | Length in seconds |
| 🏷 `category` | Bilibili category name |
| 👤 `author` | Uploader name |
| 👤 `authorUrl` | Uploader space URL |
| 👤 `authorId` | Uploader numeric id |
| 👤 `authorAvatar` | Uploader avatar image |
| 📅 `publishedAt` | Publish date, ISO 8601 |
| 📝 `description` | Video description, `Not Disclosed` when empty |
| 📍 `source` | Where the row came from: `search`, `popular`, `ranking`, or `video` |
| 🕒 `scrapedAt` | Collection timestamp |
| ❌ `error` | `null` on a good row; error rows carry only this field and are never billed |

Three records from a real run:

```json
[
  {
    "imageUrl": "https://i0.hdslb.com/bfs/archive/c3ba106604affe3e5ff608af7cf62b3d318243eb.jpg",
    "title": "2026网络最好听100首热门歌曲，每一首都好听 🎧",
    "url": "https://www.bilibili.com/video/BV1ANQqBTEVU/",
    "videoId": "BV1ANQqBTEVU",
    "views": 7978760,
    "viewsText": "797.9万",
    "danmakuCount": 566,
    "danmakuText": "566",
    "likes": 9587,
    "favorites": 17447,
    "comments": 211,
    "duration": "6:17:29",
    "durationSeconds": 22649,
    "category": "音乐综合",
    "author": "那首你最爱的歌谣啊",
    "authorUrl": "https://space.bilibili.com/1755991590",
    "authorId": "1755991590",
    "authorAvatar": "https://i0.hdslb.com/bfs/face/7d99aee1ac0c6b5586c976b30058df379cbdb061.jpg",
    "publishedAt": "2026-03-24T05:53:12.000Z",
    "description": "Not Disclosed",
    "source": "search",
    "scrapedAt": "2026-09-08T01:14:02.121Z",
    "error": null
  },
  {
    "imageUrl": "https://i2.hdslb.com/bfs/archive/3b46b0c992cf8127797e4e7ca51c932ecbee33c1.jpg",
    "title": "一口气跳完八月热门摇！！",
    "url": "https://www.bilibili.com/video/BV1VztV6wEA2/",
    "videoId": "BV1VztV6wEA2",
    "views": 265114,
    "viewsText": "26.5万",
    "danmakuCount": 31,
    "danmakuText": "31",
    "likes": 5435,
    "favorites": 13467,
    "comments": 35,
    "duration": "2:51",
    "durationSeconds": 171,
    "category": "舞蹈综合",
    "author": "小透明----",
    "authorUrl": "https://space.bilibili.com/407830677",
    "authorId": "407830677",
    "authorAvatar": "https://i0.hdslb.com/bfs/face/05b4dea102bbd1e41a3a3106138358215c505998.jpg",
    "publishedAt": "2026-09-01T12:42:34.000Z",
    "description": "-",
    "source": "search",
    "scrapedAt": "2026-09-08T01:14:02.121Z",
    "error": null
  },
  {
    "imageUrl": "https://i2.hdslb.com/bfs/archive/98b76fc60839f2d03c6a9578d6a48e363789032d.jpg",
    "title": "九月份主播热门国标盘点，普通人最难拿热门大国标的一个月！",
    "url": "https://www.bilibili.com/video/BV1HXtR6YEvw/",
    "videoId": "BV1HXtR6YEvw",
    "views": 91245,
    "viewsText": "9.1万",
    "danmakuCount": 33,
    "danmakuText": "33",
    "likes": 282,
    "favorites": 244,
    "comments": 53,
    "duration": "6:11",
    "durationSeconds": 371,
    "category": "电子竞技",
    "author": "山谷游戏解说",
    "authorUrl": "https://space.bilibili.com/389004044",
    "authorId": "389004044",
    "authorAvatar": "https://i2.hdslb.com/bfs/face/3021b7f02e985158db2da9d5d076f1840697a1b2.jpg",
    "publishedAt": "2026-09-03T08:21:06.000Z",
    "description": "九月份主播热门国标盘点，普通人最难拿热门大国标的一个月！",
    "source": "search",
    "scrapedAt": "2026-09-08T01:14:02.121Z",
    "error": null
  }
]
```

Values the source withholds come back as `Not Disclosed`; a value that does not apply comes back as `N/A`. A row never contains `null` outside the `error` column.

### ✨ Why choose this Actor

- **Talks to Bilibili's JSON APIs, not the page.** No headless browser, no captcha page, no 4 GB of memory. A 1,000-video keyword run is 20 requests.
- **Exact numbers and dates.** Play, danmaku, like, favorite and comment counts as integers, publish time as ISO 8601, next to the Chinese short forms the site displays.
- **Search filters that match the site.** Sort by relevance, views, newest, danmaku or favorites, and filter by duration bucket, the same way the Bilibili search page does.
- **Four sources in one Actor.** Keyword search, popular feed, ranking, and single video pages, mixed freely in one run and deduplicated by BV id.
- **Honest ceilings.** Bilibili caps search at 1,000 results per keyword; the log tells you the total Bilibili reports and how many pages exist.
- **Proxy optional.** Direct requests work; switch on Apify Proxy for high-volume runs, and the Actor falls back to it on its own if Bilibili refuses a direct call.

### 📈 How it compares to alternatives

| | Bilibili Videos Scraper | Browser-based Bilibili scrapers | Build it in-house | By hand |
|---|---|---|---|---|
| Setup | Run it now, zero config | Often need residential proxies to pass the captcha | Days of engineering (WBI signing, cookies) | None, but hours per pull |
| Speed and memory | 20 requests per 1,000 videos, 1 GB | Full page renders, 4 GB | Depends | Slow |
| Fields | 23 per video, exact counts and ISO dates | Usually what the card shows | Whatever you build | Copy-paste |
| Sources | Search, popular, ranking, video page | Usually search only | Whatever you build | One page at a time |
| When Bilibili changes | Maintained for you | Varies | You fix it | You re-learn the page |
| Output | Fixed JSON schema, CSV/Excel export | Varies | Whatever you build | Spreadsheet |

### 🚀 How to use

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open [Bilibili Videos Scraper](https://apify.com/parseforge/bilibili-video-scraper?fpr=vmoqkp) in the Apify Store.
3. Enter one or more search keywords, or paste Bilibili URLs (video page, search page, `/v/popular/all`, `/v/popular/rank/all`). Leave both empty to collect the popular feed.
4. Optionally pick a sort order and a duration filter for the searches, and set **Max Items**.
5. Click **Start**. When the run finishes, open the **Dataset** tab and export as CSV, Excel, JSON, or XML, or read it through the API.

A first run with the defaults:

```json
{
  "searchKeywords": ["热门"],
  "maxItems": 10
}
```

### 💼 Business use cases

#### 📊 Trend monitoring

Schedule a daily run on `https://www.bilibili.com/v/popular/rank/all` and keep the 100 ranked videos with their counts. A week of snapshots shows which categories and uploaders are climbing.

#### 🏁 Competitor benchmarking

Search your product category ("机械键盘", "护肤"), sort by views, and compare the top 200 videos' likes-to-views and favorites-to-views ratios to see which content formats convert attention into saves.

#### 🤝 Creator and MCN sourcing

Sort a niche keyword by newest and filter to videos under 10 minutes to find active uploaders early. `authorUrl` and `authorId` go straight into an outreach sheet.

#### 🎯 Campaign reporting

Paste the BV links of a sponsored campaign as start URLs and pull views, likes, favorites, comments and danmaku for each video at the same time every day.

### 🔌 Automating Bilibili Videos Scraper

- **Make / Zapier:** trigger a run on a schedule, then send new rows to Google Sheets, Airtable or Notion.
- **Slack:** post the top 10 ranking videos to a channel every morning through the Apify Slack integration.
- **Airbyte:** load the dataset into your warehouse with the Apify source connector.
- **GitHub Actions:** call the run endpoint from a workflow and commit the CSV to a data repo.
- **Google Drive:** export the dataset as Excel to a shared folder after every run.

### 🌟 Beyond business use cases

- **Research:** study how Chinese internet culture spreads by tracking keyword volume, category mix and publish times over months.
- **Personal:** keep a list of everything an uploader you follow publishes, with exact dates, in a spreadsheet.
- **Non-profit:** monitor public-interest topics (health, education, disaster response) and how much attention they get on Bilibili.
- **Experimentation:** feed titles, categories and engagement ratios into a model that predicts which formats travel.

### 🤖 Ask an AI assistant about this scraper

Give an AI agent live access to Bilibili through the Model Context Protocol:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/bilibili-video-scraper"
```

Then ask the agent in plain language, for example "find the 20 most viewed Bilibili videos about 原神 published this week and list uploader names", and it will run the Actor and read the results back.

### ❓ Frequently Asked Questions

#### ❓ Do I need a Bilibili account or API key?

No. The Actor reads public endpoints without any login.

#### ❓ How many videos can one keyword return?

Bilibili caps search at 1,000 results per keyword (20 pages of 50). The log prints the total Bilibili reports. Use several keywords or the duration filter to widen coverage.

#### ❓ Which URLs are accepted as start URLs?

Video pages (`/video/BV...`, `/video/av...`, `b23.tv` short links), search pages (`search.bilibili.com/all?keyword=...`, `order` and `duration` parameters are honoured), the popular feed (`/v/popular/all`) and the ranking (`/v/popular/rank/all`). Other pages produce an error row and are not billed.

#### ❓ Can I search in English?

Yes. Bilibili's search accepts any text; results depend on what uploaders wrote in titles and tags.

#### ❓ Why is `category` or `description` sometimes `Not Disclosed`?

Bilibili returns an empty value for some videos, mostly when reading a single video page. The Actor never invents a value.

#### ❓ Do I need a proxy?

Not by default. Turn on Apify Proxy for very large runs; the Actor also switches to it on its own if Bilibili refuses a direct request.

#### ❓ Does it collect comments or danmaku text?

No. It returns the danmaku and comment counts, not their text.

#### ❓ Can I scrape a specific uploader's video list?

Not directly. Search the uploader's name and sort by newest, or paste the BV links of their videos.

#### ❓ Are rows ever duplicated?

No. Videos are deduplicated by BV id across every source in the run, and you are billed once per video.

#### ❓ What is the free plan limit?

Free accounts get up to 10 videos per run as a preview. Paid plans can request up to 1,000,000 per run.

#### ❓ How fresh are the counts?

They are read at run time from the same endpoints the Bilibili web app uses, so they match what a visitor sees at that moment.

#### ❓ Is this an official Bilibili product?

No. It is an independent tool that reads publicly available data.

### 🔌 Integrate with any app

Run the Actor and fetch results from the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or with the [Apify client](https://docs.apify.com/api/client/js) for JavaScript and Python. Datasets export to CSV, JSON, Excel, XML, RSS and HTML, and webhooks can notify your app when a run finishes.

### 🔗 Recommended Actors

- [YouTube Comments Scraper](https://apify.com/parseforge/youtube-comments-scraper?fpr=vmoqkp)
- [TikTok Hashtag Analytics Scraper](https://apify.com/parseforge/tiktok-hashtag-analytics-scraper?fpr=vmoqkp)
- [Twitch Live Streams Scraper](https://apify.com/parseforge/twitch-live-streams-scraper?fpr=vmoqkp)
- [Instagram Profile Scraper](https://apify.com/parseforge/instagram-profile-scraper?fpr=vmoqkp)

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

**🆘 Need Help?** [Open our contact form](https://tally.so/r/BzdKgA) with your run ID, your input, and what you expected.

> **⚠️ Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Bilibili Inc. It collects only publicly available data. You are responsible for using the data in compliance with Bilibili's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL.

# Actor input Schema

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

Keywords to search on Bilibili, in Chinese or English. Each keyword returns up to 1,000 videos (Bilibili's own search cap), 50 per page.

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

Bilibili pages to collect: a video page (https://www.bilibili.com/video/BV...), a search page (https://search.bilibili.com/all?keyword=...), the popular feed (https://www.bilibili.com/v/popular/all) or the ranking (https://www.bilibili.com/v/popular/rank/all). Leave both this and the keywords empty to collect the popular feed.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

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

Order of the search results, mirroring the sort options on the Bilibili search page.

## `videoDuration` (type: `string`):

Length filter of the search results, mirroring the duration filter on the Bilibili search page.

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

Apify Proxy or custom proxies for the API requests. The actor switches to the Apify proxy on its own if Bilibili refuses a direct request.

## Actor input object example

```json
{
  "searchKeywords": [
    "热门"
  ],
  "maxItems": 10,
  "sortBy": "totalrank",
  "videoDuration": "0",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Key fields of every video

## `fullData` (type: `string`):

Complete dataset with all 23 fields

# 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": [
        "热门"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/bilibili-video-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 = {
    "searchKeywords": ["热门"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/bilibili-video-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 '{
  "searchKeywords": [
    "热门"
  ],
  "maxItems": 10
}' |
apify call parseforge/bilibili-video-scraper --silent --output-dataset

```

## MCP server setup

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