Bilibili Scraper — Video, UP主, Comments & Search
Pricing
from $1.00 / 1,000 video danmakus
Bilibili Scraper — Video, UP主, Comments & Search
Bilibili scraper for video data, UP主 profiles, comments, danmaku (bullet chats), AI subtitle metadata & keyword search. KOL discovery, view/like/coin/favorite counts, creator analytics for China market research. Eight operations, one clean dataset per run. No API key.
Pricing
from $1.00 / 1,000 video danmakus
Rating
0.0
(0)
Developer
SIÁN OÜ
Maintained by CommunityActor stats
1
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Bilibili Video Scraper — Videos, UP主, Comments, Danmaku & AI Subtitles 🚀
🎉 Eight scrapers in one — video data, UP主 profiles, follower stats, comments, danmaku (bullet chats), AI subtitle URLs & keyword search on Bilibili (B站)
Built for China-market researchers, KOL agencies, gaming/anime/tech analysts, and AI training-data teams who need clean Bilibili datasets without scraping the player UI
📋 Overview
Scrape Bilibili (B站) into clean structured datasets — without an account, an API key, or a single Python script. This Bilibili scraper turns China's leading long-form video platform for gaming, anime, tech and youth culture into a JSON / CSV / Excel feed your team can query, monitor, and pipe into BI.
Why thousands of China-market professionals choose us:
- ✅ 8 operations in one actor: video detail, UP主 profile, follower stats, user video catalog, comments, danmaku, AI subtitle URLs, keyword search — pick what you need per run
- ⚡ BigInt-safe IDs — Bilibili
aid/cid/rpidIDs routinely exceed 16 digits and break naive JSON parsers. We parse them withjson-bigintso every ID survives the round-trip as a clean string. No silent precision loss. - 🎯 Danmaku (bullet chat) extraction — pull Bilibili's signature overlay comments (弹幕) with timestamps, text, mode, color, font size, and user hash. The only Bilibili actor on Apify exposing this dataset.
- 💰 Best price on the market: pay-per-result, no subscriptions. Headline
searchVideoruns at $0.004 per row at BRONZE — cheaper than building it in-house. - 💎 AI subtitle URLs for ML pipelines — fetch Bilibili's auto-generated
ai-zh/ai-ensubtitle JSON URLs for any video. Feed them directly into translation, summarization, or video-search pipelines without scraping the player. - ✨ NEW: silent backup data source — if the primary feed hiccups, we transparently failover so your runs don't break
✨ Features
- 📺 Video Detail — full BV-ID lookup: title, description, view/like/coin/favorite/share/comment counts, cover, creator, tags, multi-part
videoPages[] - 👤 User Profile — UP主 deep-dive: bio, level, VIP status, official verification, live room, school, profession, join date
- 📈 User Relation Stat — fast follower / following / whisper counts when you don't need the full profile (cheaper)
- 🎞️ User Videos — paginated complete video catalog for any UP主 (~30 videos/page)
- 💬 Video Comments — paginated comments with reply samples, reviewer level, VIP status, and like counts
- 🎯 Video Danmaku (弹幕) — bullet-chat overlay text + timestamps for any video — unique on the Apify store
- 🌐 Video Caption Metadata — language list + signed subtitle URLs (including AI-generated
ai-zh/ai-en) - 🔍 Search Videos — paginated keyword search (~20 results/page, up to 50 pages = 1,000 videos per run)
- 🔁 Silent backup source — automatic failover if the primary feed is throttled or unavailable
- 📊 Built-in HTML run reports — every run saves a summary with success / error counts and duration
- 🆓 FREE tier included — Apify credit lets you test every operation before you commit
🎬 Quick Start
Pick an operation, provide the required input, hit run. Results land in the default Apify dataset — export to JSON / CSV / Excel in one click.
curl -X POST "https://api.apify.com/v2/acts/sian.agency~bilibili-video-scraper/runs?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"operation":"searchVideo","keyword":"python","maxPages":2}'
🚀 Getting Started (3 Simple Steps)
Step 1: Pick an Operation
Choose one of searchVideo, videoDetail, userDetail, userRelationStat, userVideos, videoComments, videoDanmu, or videoCaption. Each operation is built around a single, well-defined job.
Step 2: Provide the Required Input
Search needs a keyword. Video Detail / Caption need a bvid. User operations need a userId. Comments need an aid. Danmaku needs both aid and cid. Run Video Detail once on any BV ID to harvest its aid and cid for downstream ops.
Step 3: Hit Run, Export Results
Results stream into the default Apify dataset. Filter by _operation or status, export to JSON / CSV / Excel, or hit the dataset API from your code.
That's it! In under 60 seconds, you'll have:
- A clean structured JSON / CSV dataset
- A success-rate HTML run report
- Direct links to every video / creator / comment
📥 Input Configuration
| Field | Type | Required | Description |
|---|---|---|---|
operation | string | ✅ | One of: videoDetail, userDetail, userRelationStat, userVideos, videoComments, videoDanmu, videoCaption, searchVideo |
bvid | string | for videoDetail, videoCaption | Bilibili BV ID (e.g. BV1rpWjevEip) from bilibili.com/video/{BV_ID} |
aid | string | for videoComments, videoDanmu, videoCaption | Numeric video ID — get it from a Video Detail or Search row |
cid | string | for videoDanmu, videoCaption | Bilibili chapter ID — one per video part — get it from a Video Detail row |
userId | string | for userDetail, userRelationStat, userVideos | Numeric UP主 ID (mid) from space.bilibili.com/{USER_ID} |
keyword | string | for searchVideo | Search query — Chinese, English, or mixed (Chinese gives best coverage) |
maxPages | integer | ❌ | Max pages for paginated ops (userVideos, videoComments, searchVideo). Default 5. Range 1–50. |
Examples:
{ "operation": "searchVideo", "keyword": "python", "maxPages": 3 }
{ "operation": "videoDetail", "bvid": "BV1rpWjevEip" }
{ "operation": "userDetail", "userId": "3546597933714079" }
{ "operation": "videoComments", "aid": "113006243481679", "maxPages": 5 }
{ "operation": "videoDanmu", "aid": "113006243481679", "cid": "36010133667" }
{ "operation": "videoCaption", "bvid": "BV1rpWjevEip", "aid": "113006243481679", "cid": "36010133667" }
📤 Output
Every run writes rows to the default Apify dataset. Field shape depends on the operation — common fields across all rows include:
| Field | Type | Description |
|---|---|---|
_operation | string | Operation that produced the row |
_fetchedAt | string (ISO) | UTC timestamp when the row was fetched |
_page | integer | Page number for paginated ops |
status | string | success or error |
bvid | string | Bilibili BV ID |
aid | string | Numeric video ID (BigInt-safe, string-encoded) |
videoTitle | string | Video title (HTML highlight tags stripped) |
userId | string | UP主 numeric ID (mid) |
userName | string | UP主 display name |
playCount | integer | View count |
likeCount | integer | Like count |
commentCount | integer | Comment count |
favoriteCount | integer | Favorite count |
danmuCount | integer | Danmaku (bullet-chat) count |
coverUrl | string | Cover image URL (HTTPS-upgraded) |
videoPageUrl | string | Canonical video URL on bilibili.com |
userPageUrl | string | Canonical UP主 space URL |
Search Videos example row:
{"_operation": "searchVideo","_fetchedAt": "2026-05-14T09:12:08Z","_page": 1,"_sourceKeyword": "python","bvid": "BV1rpWjevEip","aid": "113006243481679","videoTitle": "Python 入门 60 分钟速成","videoTitleHighlighted": "<em class=\"keyword\">Python</em> 入门 60 分钟速成","videoDesc": "从零开始的 Python 教程,适合零基础学员...","durationStr": "59:42","publishedAt": 1715812345,"playCount": 482103,"likeCount": 18244,"commentCount": 612,"favoriteCount": 9821,"danmuCount": 3104,"videoTypeName": "校园学习","coverUrl": "https://i0.hdslb.com/bfs/archive/...","videoPageUrl": "https://www.bilibili.com/video/BV1rpWjevEip","userId": "3546597933714079","userName": "TechUP_Lin","avatarUrl": "https://i1.hdslb.com/bfs/face/...","userPageUrl": "https://space.bilibili.com/3546597933714079","status": "success"}
Video Danmaku example row:
{"_operation": "videoDanmu","_sourceAid": "113006243481679","_sourceCid": "36010133667","danmuId": "1729384756102347901","aid": "113006243481679","cid": "36010133667","danmuText": "前方高能!","timeOffsetSec": 122.84,"mode": 1,"fontSize": 25,"color": 16777215,"userHash": "a7c3f2e9","postedAt": 1715900012,"status": "success"}
Video Caption Metadata example row:
{"_operation": "videoCaption","_sourceBvid": "BV1rpWjevEip","_sourceCid": "36010133667","bvid": "BV1rpWjevEip","aid": "113006243481679","cid": "36010133667","languageCode": "ai-zh","languageLabel": "中文(自动生成)","subtitleUrl": "https://aisubtitle.hdslb.com/bfs/ai_subtitle/...","isAiGenerated": true,"videoPageUrl": "https://www.bilibili.com/video/BV1rpWjevEip","status": "success"}
The
subtitleUrlpoints to a JSON subtitle file you fetch yourself (Bilibili signs the URL — it expires). One GET request returns the full transcript with per-line timestamps.
💼 Use Cases & Examples
1. China KOL & UP主 Discovery
Influencer agencies and brand teams shortlisting Bilibili creators for partnerships.
Input: searchVideo on a niche keyword (e.g. 美食, 数码, 健身), then userDetail + userRelationStat on the top creators
Output: Trending UP主 with view counts, follower counts, verification status, school, and bio
Use: Build a ranked KOL shortlist filtered by follower band, verification, and engagement — ship the list to your campaign team.
2. Gaming, Anime & Tech Trend Tracking
Trend analysts monitoring Bilibili's gaming, anime, and developer communities.
Input: searchVideo scheduled daily on category keywords + videoDetail on the top results
Output: Daily snapshot of viral videos with view / like / coin / favorite / comment counts
Use: Spot breakout creators and emerging hashtags 1–2 weeks before they hit Douyin or Weibo. Bilibili is the youth-culture leading indicator for China.
3. Comment & Danmaku Sentiment Mining
Product and brand teams running NLP on Chinese-language fan reactions.
Input: videoComments + videoDanmu against any BV ID
Output: Full review text and live bullet-chat reactions with timestamps
Use: Pipe into a Chinese-language sentiment model. Danmaku captures real-time emotional response that comments miss — invaluable for game launches, anime drops, and product reveals.
4. AI Training Data — Subtitles + Danmaku
ML / AI teams building Chinese-language datasets for translation, summarization, or video search.
Input: videoCaption to fetch AI-subtitle URLs + videoDanmu for timestamped reactions
Output: Signed ai-zh / ai-en subtitle JSON URLs and bullet-chat overlay text
Use: Build a parallel ZH-EN corpus from Bilibili's AI subtitles, or align danmaku timestamps with subtitle segments to train video-aware reaction models.
5. Creator Catalog & Due Diligence
Brand-safety teams auditing a UP主 before sponsoring.
Input: userVideos paginated end-to-end for the candidate's userId
Output: Complete video catalog with play counts, descriptions, posting cadence, and tags
Use: Surface controversial content, posting gaps, and category drift before signing a creator deal.
6. Competitor & Brand Monitoring
Brand teams tracking how their products are mentioned on Bilibili.
Input: searchVideo on brand keywords + videoComments on the top videos
Output: Daily list of brand-mentioning videos with fan-reaction text
Use: Build a real-time brand-mention feed, alert on negative spikes, surface owned-product reviewers for outreach.
7. Cross-Border Market Research
Consultants producing China-entry briefings for Western brands.
Input: Combine searchVideo (category top 100) + userDetail (top UP主) + videoComments (sentiment)
Output: A complete Bilibili category snapshot — top videos, top creators, fan sentiment — in one dataset
Use: Drop into a Looker / Tableau dashboard; ship as a stakeholder briefing.
🔗 Integration Examples
JavaScript / Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_TOKEN' });const run = await client.actor('sian.agency/bilibili-video-scraper').call({operation: 'searchVideo',keyword: 'python',maxPages: 3,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items[0]);
Python
from apify_client import ApifyClientclient = ApifyClient('YOUR_TOKEN')run = client.actor('sian.agency/bilibili-video-scraper').call(run_input={'operation': 'searchVideo','keyword': 'python','maxPages': 3,})for item in client.dataset(run['defaultDatasetId']).iterate_items():print(item)
cURL
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~bilibili-video-scraper/runs?token=YOUR_TOKEN' \-H 'Content-Type: application/json' \-d '{"operation":"searchVideo","keyword":"python","maxPages":3}'
Automation Workflows (N8N / Zapier / Make)
- Trigger: Cron / webhook
- HTTP Request: Call the actor API with
operation+ required field - Process: Filter the JSON dataset by
status === "success" - Action: Push to Google Sheets, Slack, your data warehouse, or your ML training pipeline
📊 Performance & Pricing
FREE Tier (Try It Now)
- Apify FREE accounts include a monthly credit allowance you can spend on any actor
- Full feature access — same quality as PAID
- Test every operation before you commit a cent
- No credit card required
PAID Tier (Production Ready)
- Pay-per-result: charged for successful rows, never for errors
- No subscriptions, no minimums, no surprises
- Bulk-friendly tiers — BRONZE → SILVER → GOLD → PLATINUM → DIAMOND volume discounts
💰 Best price on the market — headline searchVideo runs at $0.004 per row at BRONZE, with steeper discounts at higher tiers. Danmaku is $0.002 per row.
❓ Frequently Asked Questions
Q: What is danmaku (弹幕) and why does it matter?
A: Danmaku are bullet-chat comments that fly across the video as it plays — a signature Bilibili feature. They capture real-time emotional reactions (jokes, hype, criticism) that regular comments miss. Bilibili's gaming, anime, and tech audiences live in danmaku. Our videoDanmu operation is the only one on the Apify store that exposes this data cleanly.
Q: Do I need a Bilibili account or API key? A: No. The actor is fully managed — no account, no key, no setup. Just pick an operation and run.
Q: Why are video IDs returned as strings, not numbers?
A: Bilibili's aid, cid, rpid, and dmid IDs routinely exceed Number.MAX_SAFE_INTEGER (16+ digits). Storing them as JavaScript numbers silently corrupts the last few digits. We parse with json-bigint and return every ID as a string so it survives JSON round-trips and database inserts safely.
Q: How do I get the aid and cid for a video?
A: Run videoDetail once on any BV ID — the response includes aid, cid, and videoPages[].cid for multi-part videos. Then feed those into Comments, Danmaku, or Caption operations.
Q: What does the Caption operation return — the transcript text?
A: It returns subtitle metadata + signed URLs, not the transcript text. Each row gives you a subtitleUrl that points to a JSON subtitle file. One GET request to that URL returns the full transcript with per-line timestamps. We don't fetch the file for you because subtitle JSON shapes vary by language and you'll want to handle them in your own pipeline.
Q: Does it support Chinese keywords?
A: Yes. Chinese keywords give the best results (e.g. 游戏, 美食, 编程). English and mixed queries also work but coverage is thinner on native content.
Q: How many results per page?
A: searchVideo ~20/page (cap 50 pages = 1,000 videos), userVideos ~30/page, videoComments ~20/page with sub-reply samples. videoDetail / userDetail / userRelationStat / videoDanmu / videoCaption are single-row or single-payload operations.
Q: What output formats are available? A: JSON, CSV, Excel, and HTML — export directly from the Apify dataset, or hit the dataset API from your code.
Q: How fresh is the data? A: Live — every run hits Bilibili in real time. No caching, no stale data.
Q: Is this legal? A: We only extract publicly available data. See the Legal section below for full guidance on GDPR + personal-data considerations.
🐛 Troubleshooting
"Missing required input"
searchVideoneedskeyword.videoDetail/videoCaptionneedbvid.videoCommentsneedsaid.videoDanmu/videoCaptionneedaid+cid. User operations needuserId.
"Video not found — it may have been removed"
- The BV ID exists but Bilibili has removed or restricted the video. Try a fresh ID from a
searchVideorun.
"No captions available for this video"
- Not every Bilibili video has AI-generated subtitles. Older videos, music videos, and very short clips often lack them. Try a longer educational or commentary video.
Run returns 0 rows on searchVideo
- Keyword may be too narrow or in the wrong language. Try a Chinese keyword (e.g.
游戏instead ofgaming).
"Data source temporarily unavailable — please retry"
- The upstream feed is briefly throttled. Our retry-with-backoff logic handles this automatically — just re-run if a small fraction of pages fail.
Big numeric IDs look like strings in the dataset
- That's intentional — Bilibili's
aid/cid/rpid/dmidare too large for JavaScript numbers. We return them as strings to preserve precision.
⚠️ Trademark Disclaimer
This is an independent scraping tool. It is not affiliated with, endorsed by, or sponsored by Shanghai Bilibili Technology Co., Ltd. The Bilibili® and B站 names appear under nominative fair use solely to identify the public data source this tool helps you collect.
All product names, logos, and brands belonging to Bilibili are property of their respective owners.
⚖️ Is it legal to scrape data?
Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.
However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.
You can also read Apify's blog post on the legality of web scraping.
🤝 Support
Join our active support community
- For issues or questions, open an issue in the actor's Apify Console → Issues tab
- Check the SIÁN Agency Store for more automation tools
- 📧 apify@sian-agency.online
⭐ Loving this actor? Leave us a 5-star review — it helps us build more features for you.
Built by SIÁN Agency | More Tools