Bilibili Scraper avatar

Bilibili Scraper

Pricing

Pay per event

Go to Apify Store
Bilibili Scraper

Bilibili Scraper

Scrape Bilibili videos, creators, search results, engagement metrics, and optional comments for China social intelligence.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Scrape public Bilibili videos, creators, search results, engagement metrics, and optional comments from China's major social video platform.

What does Bilibili Scraper do?

Bilibili Scraper turns public Bilibili pages and search keywords into structured Apify dataset rows.

It can collect:

  • 🎬 Video titles and descriptions
  • 👤 Creator names and creator IDs
  • 📈 Views, likes, coins, favorites, shares, replies, and danmaku counts
  • 🏷️ Tags, categories, cover images, and publish dates
  • 🔎 Search result videos for a keyword
  • 💬 Optional top-level comment samples

Who is it for?

This actor is useful for teams that monitor Chinese social video content. Common personas include:

📣 Brand and agency teams

  • Track campaign visibility for product, game, entertainment, or creator keywords.
  • Compare public engagement across branded videos and competitor content.

🧭 Market research and competitive intelligence teams

  • Study creator performance, content themes, and audience response in China-focused research.
  • Build repeatable keyword monitors for launches, categories, and cultural moments.

🧪 Data, AI, and analytics teams

  • Create structured public video datasets for dashboards, enrichment, and internal models.
  • Combine video metrics with comment samples for social listening and trend analysis.

🛍️ E-commerce and creator partnership teams

  • Discover creators and videos that mention product categories or target brands.
  • Score potential KOL opportunities using public views, likes, coins, favorites, and replies.

Why use it?

Bilibili has unique engagement signals such as coins, favorites, danmaku counts, and active comment threads.

This actor helps you collect those public signals without building your own Bilibili API integration.

Common use cases

  • Find Bilibili videos for a keyword such as a product, game, brand, or topic
  • Monitor creator performance and video engagement over time
  • Collect comment samples for qualitative social listening
  • Build lead lists of creators for KOL discovery
  • Compare competitor content traction in China-focused campaigns

Data you can extract

FieldDescription
bvidBilibili BV video identifier
aidNumeric AV/video id
titlePublic video title
descriptionPublic video description
creatorNameUploader name
creatorIdUploader id
createdAtPublication timestamp
durationSecondsVideo length in seconds
viewCountView count
likeCountLike count
coinCountCoin count
favoriteCountFavorite count
shareCountShare count
replyCountReply/comment count
danmakuCountDanmaku/bullet-comment count
tagsPublic tags when available
commentsOptional top-level comment sample

How much does it cost to scrape Bilibili videos?

The actor uses pay-per-event pricing.

  • A small start event is charged once per run: $0.005.
  • A result event is charged for each Bilibili video row saved.
  • Optional comment samples are included in the same video row charge.

Example gross estimates before Apify plan discounts:

Run sizeStart eventFREE result tierBRONZE result tierApprox. total on BRONZE
10 videos$0.005$0.000078287 each$0.000068075 each~$0.0057
100 videos$0.005$0.000078287 each$0.000068075 each~$0.0118
1,000 videos$0.005$0.000078287 each$0.000068075 each~$0.0731

Higher Apify usage tiers receive lower per-result prices: SILVER, GOLD, PLATINUM, and DIAMOND are progressively cheaper. Apify shows the exact estimated cost before you start a run.

Input options

You can use video URLs, search keywords, or both.

{
"videoUrls": [
{ "url": "https://www.bilibili.com/video/BV1xx411c7mD" }
],
"searchQueries": ["Python"],
"maxResults": 10,
"includeComments": false,
"maxCommentsPerVideo": 3
}

Video URL scraping

Use videoUrls when you already know which Bilibili pages you need.

The actor supports common Bilibili video formats:

  • https://www.bilibili.com/video/BV...
  • https://www.bilibili.com/video/av...
  • URLs with bvid= or aid= parameters

Search scraping

Use searchQueries to discover public Bilibili videos by keyword.

The actor searches Bilibili video results and then enriches each result with detail metrics.

Tips:

  • Keep maxResults low for quick tests.
  • Use Chinese keywords when your target market is China-specific.
  • Run separate keywords if you want easier dataset filtering.

Comments

Set includeComments to true to include top-level comment samples.

Each comment object can include:

  • commentId
  • authorName
  • authorId
  • text
  • createdAt
  • likeCount
  • replyCount

For large-scale comment exports, keep maxCommentsPerVideo modest to avoid unnecessary runtime.

Output example

{
"sourceType": "search",
"searchKeyword": "Python",
"bvid": "BV1rpWjevEip",
"aid": 113006243481679,
"title": "Python tutorial",
"creatorName": "Python官方课程",
"viewCount": 16890907,
"likeCount": 320000,
"coinCount": 12000,
"favoriteCount": 670203,
"replyCount": 1000,
"pageUrl": "https://www.bilibili.com/video/BV1rpWjevEip",
"comments": []
}

How to run

  1. Open the actor on Apify.
  2. Add one or more Bilibili video URLs, search keywords, or both.
  3. Choose maxResults.
  4. Enable comments only if you need comment samples.
  5. Start the run.
  6. Export the dataset as JSON, CSV, Excel, or via API.

Tips for best results

  • Start with 5-10 results when testing a new keyword.
  • Use exact brand names and creator names for cleaner search results.
  • Use direct URLs for known videos because they avoid search ambiguity.
  • Enable comments only when comments are part of your analysis.
  • Re-run the same input periodically to track metric changes.

Integrations

You can connect the dataset to many workflows:

  • Send rows to Google Sheets for analyst review.
  • Push results to a warehouse for time-series tracking.
  • Feed creator and engagement data into lead scoring.
  • Use comments as public social listening samples.
  • Trigger alerts when a keyword produces high-engagement videos.

API usage with Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/bilibili-scraper').call({
searchQueries: ['Python'],
maxResults: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

API usage with Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/bilibili-scraper').call(run_input={
'searchQueries': ['Python'],
'maxResults': 10,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

API usage with cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~bilibili-scraper/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"searchQueries":["Python"],"maxResults":10}'

MCP integration

Use this actor from Claude Desktop, Claude Code, and other MCP-compatible tools through Apify MCP.

MCP server URL:

https://mcp.apify.com/?tools=automation-lab/bilibili-scraper

Add it with Claude Code:

$claude mcp add --transport http apify-bilibili-scraper https://mcp.apify.com?tools=automation-lab/bilibili-scraper

Claude Desktop JSON configuration:

{
"mcpServers": {
"apify-bilibili-scraper": {
"url": "https://mcp.apify.com/?tools=automation-lab/bilibili-scraper"
}
}
}

Example prompts:

  • "Scrape the top 10 Bilibili videos for this keyword and summarize creator engagement."
  • "Collect public metrics for these Bilibili video URLs."
  • "Find Bilibili videos about this game launch and rank by likes."

What the actor does not do

  • It does not download videos or audio.
  • It does not bypass login-only or private data.
  • It does not scrape private user information.
  • It does not guarantee Bilibili search ranking remains identical over time.
  • It does not provide a full historical metric archive unless you schedule repeated runs.

Reliability notes

The actor uses public Bilibili HTTP endpoints with browser-like headers.

If Bilibili temporarily rate-limits or changes an endpoint, retry later or reduce run size.

FAQ

I got fewer results than requested. Why?

Bilibili may return fewer public results for a keyword, duplicate videos may be skipped, or some detail pages may be unavailable.

Why are comments empty?

Comments can be disabled, unavailable, removed, or not requested. Enable includeComments and keep maxCommentsPerVideo above zero.

Why is a field null?

Some videos do not expose every metric or metadata field through the public API. Null values mean the field was not available for that video.

Scheduling

Schedule the actor to run daily or weekly to track engagement changes for keywords or known videos.

Use the same input to create a consistent monitoring dataset.

Legality

This actor extracts publicly available data from Bilibili. You are responsible for using the data in accordance with Bilibili terms, applicable privacy laws, and your own compliance requirements.

Do not use the actor for spam, harassment, or attempts to access private data.

Use these with Bilibili Scraper for broader social intelligence:

Changelog

0.1

Initial release with video URL scraping, keyword search, engagement metrics, creator fields, and optional comments.

Support

If a run fails or output looks wrong, open an issue with:

  • The input you used
  • The run ID
  • A short description of the expected result
  • A sample URL or keyword

Field reference

The dataset schema is optimized for video intelligence analysis.

All count fields are numbers when available.

All timestamps are ISO strings when available.

URLs are normalized to HTTPS when possible.

Performance guidance

HTTP runs are lightweight.

For quick checks, use 5-10 results.

For realistic monitoring, use 50-200 results per keyword group.

For comment sampling, keep comment limits low unless comments are central to your use case.