Social Media API
Bilibili API
Read B站 video details and stats, creator profiles, comment threads, and danmaku bullet-comment streams as structured JSON.
- Danmaku (timed bullet comments) — the data that defines Bilibili culture
- Web and app series with full video statistics and creator profiles
- The window into Chinese youth, gaming, and anime communities
$0.05 free credit on sign-up · no credit card · from $0.001/request
One request, structured JSON
1curl -X GET "https://api.tikhub.io/api/v1/bilibili/web/fetch_one_video?bv_id=BV1xx411c7XD" \2 -H "Authorization: Bearer YOUR_API_KEY"1{2 "code": 200,3 "data": {4 "bvid": "BV1xx411c7XD",5 "title": "示例视频标题",6 "duration": 612,7 "stat": {8 "view": 1840000,9 "danmaku": 24000,10 "reply": 8600,11 "favorite": 92000,12 "coin": 41000,13 "like": 18000014 },15 "owner": { "mid": 12345678, "name": "UP主名称", "fans": 540000 }16 }17}Get your API key at user.tikhub.io/dashboard/api — or follow the getting-started guide.
What's in the Bilibili API
TikHub's Bilibili API covers B站 with web and app series: video metadata and statistics, play info and stream URLs, creator profiles and UP stats, comment threads, the danmaku bullet-comment streams that define Bilibili culture, subtitles, user dynamics, live rooms, and search. Essential for anyone studying Chinese youth culture, gaming, or anime communities.
Bilibili App API
Bilibili Web API
Danmaku — moment-level audience reaction
Bilibili (B站) is China's video community for youth, gaming, and anime, and its signature data is danmaku: timestamped bullet comments that scroll across the video. TikHub returns danmaku streams alongside full video stats and creator data, so you can read audience reaction moment by moment — not just aggregate likes.
Bilibili API endpoints
A reference of the most-used Bilibili endpoints. Browse the full set in the API reference or the documentation.
Bilibili App API
Mobile-app endpoints, including the home and popular feeds plus the cinema and bangumi (anime) tabs.
Bilibili Web API
The richest series — single-video endpoints offer V1/V2/V3 variants (prefer the highest), plus the distinctive danmaku, subtitles, user dynamics, and live-room data.
Tips & troubleshooting
Hard-won operational notes for working with Bilibili data in production.
Videos are addressed by BVID
Bilibili identifies videos with a BVID (the BV… code in a bilibili.com/video/BV… URL). Pass it to the single-video and detail endpoints. The detail and play-info endpoints carry the full statistics block — view, danmaku count, reply, favorite, coin, and like — which is richer than most platforms because Bilibili's 'coin' and 'favorite' actions are meaningful quality signals.
Danmaku is the unique signal
Bilibili's signature data is danmaku — timestamped bullet comments that scroll across the video. Unlike aggregate likes, danmaku shows exactly where in a video the audience reacted, which makes it ideal for moment-level engagement analysis. Pair the danmaku and statistics endpoints to connect overall performance to the specific moments that drove it.
Subtitles for long-form Chinese video
Bilibili hosts long-form content, and fetch_video_subtitle returns timed text where subtitles exist. That makes it a useful source of long-form Chinese-language transcripts for training corpora and summarization — a complement to YouTube on the Chinese side.
Downloading is involved — and HQ URLs are limited
Bilibili's API does not return high-quality video URLs (a platform limitation). Downloads use DASH streams where video and audio are separate .m4s files: fetch each, then merge with FFmpeg. Requests must include a valid Referer header to avoid 403 errors, video URLs are time-limited (about 2 hours), and HD/4K content (1080P+) requires login cookies like SESSDATA and premium membership.
1# DASH: video + audio arrive as separate .m4s streams2curl -H "Referer: https://www.bilibili.com" "<video_m4s_url>" -o v.m4s3curl -H "Referer: https://www.bilibili.com" "<audio_m4s_url>" -o a.m4s4ffmpeg -i v.m4s -i a.m4s -c copy out.mp4 # URLs expire in ~2hDo I need a Bilibili developer account?
No. Create a free TikHub account, generate an API key, and call REST endpoints directly — no Bilibili developer application, app review, or OAuth.
What Bilibili data can I extract?
Public videos with statistics, user/creator profiles, comment threads, danmaku (timed bullet comments), subtitles, recommendations, and search results.
How much does the Bilibili API cost?
Pay-as-you-go from $0.001 per request, with automatic daily volume discounts down to $0.0005 at 30,000+ requests/day. New accounts get $0.05 free credit (~50 requests) — no credit card required.
Is using a Bilibili API like this legal?
TikHub only returns publicly available Bilibili data — content any visitor can see without an account. It does not bypass authentication or access private information. Bilibili is a Chinese platform, so the relevant constraints are its own Terms of Service and China's data and cross-border rules rather than US case law; automated access can lead to account or IP blocks, which TikHub's infrastructure absorbs for you. You remain responsible for how you store, process, and use the data — especially any personal data and any onward transfer across borders.
Bilibili API: read China's video community in 2026
TikHub's Bilibili API reads public B站 data — video details and statistics, creator profiles, comments, danmaku bullet comments, and subtitles — through plain REST calls. Here's how it works, why danmaku matters, and which option fits which job.
How does the Bilibili API work?
What is the Bilibili API?
The TikHub Bilibili API is a RESTful interface that returns structured JSON for public content on B站 — China's video community for youth, gaming, and anime culture. You request video detail and statistics, creator profiles, comments, danmaku, and subtitles by BVID, user ID, or search and get clean, typed data, with no Chinese developer registration.
Its distinctive data is danmaku — the timestamped bullet comments that define Bilibili — and a rich statistics block that includes Bilibili-specific signals like coins and favorites.
How do you access and use it?
Create a TikHub account, generate an API key, and make an HTTP GET request with the key in the Authorization header. Address videos by BVID, pull the detail or play-info endpoint for full statistics, and add the danmaku and subtitle endpoints for moment-level reaction and long-form transcript. Search and user-video endpoints support broader collection.
What are the benefits of using the Bilibili API?
Why is Bilibili data distinctive?
Two reasons. First, danmaku gives you moment-level audience reaction that aggregate metrics can't — invaluable for understanding what actually lands in a video. Second, Bilibili's engagement model (coins, favorites, and 'three-in-one' actions) carries quality signals beyond likes, so its statistics are a better proxy for genuine value. Together they make Bilibili a uniquely rich source for Chinese youth-culture analysis.
Who benefits, and what do they save?
Analysts tracking gaming, anime, and youth-culture trends; creators and brands benchmarking performance on the platform; and AI teams building Chinese video-comment corpora and danmaku-based engagement models. TikHub absorbs the scraping burden against a protected Chinese platform, so teams get a stable, structured feed rather than a maintenance project.
What are common use cases and alternatives?
What are the common use cases?
Moment-level reaction studies via danmaku, gaming and anime trend tracking, creator (UP主) benchmarking, and long-form Chinese subtitle mining for AI. Researchers use the rich statistics block to study what drives genuine engagement on a platform whose audience actions are more deliberate than a simple like.
What are the alternatives, and which is best?
Bilibili has a partial official API and a few open-source scrapers, but coverage of danmaku, subtitles, and the full statistics block in one place is rare, and maintaining a scraper against B站 is ongoing work. For reliable access to that distinctive data without the upkeep, a managed API like TikHub is the practical choice — one key, also covering Douyin, Weibo, and the rest.
One key, every platform
The Bilibili API shares its key and JSON format with 15 other platforms — adding Instagram or Douyin is a one-line change.