Bilibili Scraper
Pricing
from $0.04 / 1,000 result extracteds
Bilibili Scraper
Scrape Bilibili videos, creators, search results, engagement metrics, and optional comments for China social intelligence.
Pricing
from $0.04 / 1,000 result extracteds
Rating
0.0
(0)
Developer
Automation Lab
Maintained by CommunityActor stats
0
Bookmarked
29
Total users
17
Monthly active users
15 days ago
Last modified
Categories
Share
Extract public Bilibili video details by URL or discover videos by keyword, with engagement metrics and optional top-level comments.
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 and categories when exposed by search or detail, 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
| Field | Description |
|---|---|
bvid | Bilibili BV video identifier |
aid | Numeric AV/video id |
title | Public video title |
description | Public video description |
creatorName | Uploader name |
creatorId | Uploader id |
createdAt | Publication timestamp |
durationSeconds | Video length in seconds |
viewCount | View count |
likeCount | Like count |
coinCount | Coin count |
favoriteCount | Favorite count |
shareCount | Share count |
replyCount | Reply/comment count |
danmakuCount | Danmaku/bullet-comment count |
tags | Public tags when available |
comments | Optional 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 size | Start event | FREE result tier | BRONZE result tier | Approx. 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/BV1rpWjevEip" }],"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=oraid=parameters
Search scraping
Use searchQueries to discover public Bilibili videos by keyword.
The actor searches public video results and enriches each with detail metrics when available. If Bilibili blocks the detail API, search metadata is used; unavailable detail-only metrics remain null. If both search routes fail or return a risk-control response, the run fails rather than reporting an empty success when no videos were saved.
Tips:
- Keep
maxResultslow 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:
commentIdauthorNameauthorIdtextcreatedAtlikeCountreplyCount
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
- Open the actor on Apify.
- Add one or more Bilibili video URLs, search keywords, or both.
- Choose
maxResults. - Enable comments only if you need comment samples.
- Start the run.
- 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 ApifyClientimport osclient = 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().itemsprint(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, Cursor, and VS Code use the same JSON MCP server 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.
Transient API errors receive bounded retries, and search has an alternate public endpoint. Direct video URLs with blocked detail responses use an exact-ID search lookup only when the result matches the requested BV/AV ID. Mixed inputs keep successful rows and log partial failures. A run with no useful rows fails explicitly. Search result counts, ranking, comments, tags, and detail-only metrics can vary with Bilibili's public access controls.
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, denied by the public endpoint, or not requested. Enable includeComments and keep maxCommentsPerVideo above zero. Comment fetch errors are logged, but the video row is still saved.
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.
Data handling and dependencies
This actor uses deterministic HTTP requests to public Bilibili endpoints. It does not use AI models, login credentials, paid source APIs, or a separate data store. Search keywords and public video IDs are sent to Bilibili; public creator names/IDs and optional public commenter names/IDs are stored in your run's Apify dataset. Runs and logs follow your Apify account storage retention and deletion settings. Delete run storage using Apify's controls when no longer needed. No separate third-party AI service receives inputs or output. Bilibili is named to identify the source; this independent actor is not affiliated with or endorsed by Bilibili.
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.
Related scrapers
Use these with Bilibili Scraper for broader social intelligence:
- https://apify.com/automation-lab/tiktok-scraper
- https://apify.com/automation-lab/douyin-scraper
- https://apify.com/automation-lab/youtube-scraper
Changelog
See the Actor changelog for release history. Initial release supported 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.