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
Actor stats
2
Bookmarked
7
Total users
4
Monthly active users
4 days ago
Last modified
Categories
Share
Bilibili Video Scraper โ Videos, UPไธป, Comments, Danmaku & AI Subtitles ๐
๐ SIรN Agency Store
๐ SIรN Taobao & Tmall
๐ SIรN Kwai & Kuaishou
๐ SIรN Douyin
๐ 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 =newApifyClient({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.
๐ View live pricing
โ 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
