APIs / Social media / Bilibili
1 credit per call6 endpointsChecked working 6 Dec 2026
Bilibili API
Bilibili API for video, live and article search, video details and tags, comments and uploader pages as JSON. 1 credit per successful call.
curl "https://api.perceptlayer.com/v1/bilibili/video?bvid=BV1xx411c7mD" \
-H "X-API-Key: $API_KEY"Playground
Run this API
curl "https://api.perceptlayer.com/v1/bilibili/video?bvid=BV1xx411c7mD" \
-H "X-API-Key: $API_KEY"Bilibili · 6 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/bilibili/comments | typeoid+3 optionalNeeds terms | rpidmidlikecountmessage | 1 credit |
GET/v1/bilibili/search | search_typekeyword+4 optionalNeeds terms | bvidaidtitleauthormidplay+7 more | 1 credit |
GET/v1/bilibili/user | midNeeds terms | user | 1 credit |
GET/v1/bilibili/user-videos | vmid+3 optionalNeeds terms | bvidtitlepicplayauthordanmaku+2 more | 1 credit |
GET/v1/bilibili/video | none+2 optionalNeeds terms | video | 1 credit |
GET/v1/bilibili/video-tags | bvidNeeds terms | tag_idtag_nametype | 1 credit |
Overview
About the Bilibili API
What you can get
The Bilibili API returns public Bilibili data as JSON through 6 endpoints. All of them are restricted endpoints: the restricted-endpoint terms apply, and they don't permit collecting personal data without a lawful basis or using it to contact people.
- Search:
searchtakes akeywordandsearch_type(video, bili_user, media_bangumi, media_ft, article, live, live_user or live_room), withpage,order(totalrank, click, pubdate, scores, stow, dm or pw),durationandtids. - Videos:
videotakes abvidoraid;video-tagstakes abvid. - Comments:
commentstakestypeandoid, withsort,pnandps. - Uploaders:
usertakes amid;user-videostakes avmid, withorder(pubdate or click),pnandps.
How a call works
Search videos: GET /v1/bilibili/search?search_type=video&keyword=...&order=click with your key in the X-API-Key header, then open one with video by bvid. Every successful call costs 1 credit; failed calls cost nothing.
More social media APIs
Use cases
Track what's popular for a topic on Bilibili
Use the Bilibili API to track what's popular for a topic on BilibiliFollow a channel's public uploads
Use the Bilibili API to follow a channel's public uploadsResearch how a product or game is covered in video
Use the Bilibili API to research how a product or game is covered in videoCollect video tags for trend analysis
Use the Bilibili API to collect video tags for trend analysisFAQ
Questions
Do I need a Bilibili account?
No. You call this Bilibili API with your Perceptlayer key in the `X-API-Key` header, with no Bilibili login. You do need to accept the restricted-endpoint terms first.
How much does the Bilibili API cost?
Each successful call costs one credit. New accounts get free credits to start, and credit packs bring the price down as you scale.
What format are responses in?
Every endpoint returns JSON, with no HTML parsing on your side.
Is this the official Bilibili API?
No. Perceptlayer is an independent service and is not affiliated with Bilibili. It returns Bilibili data as JSON with a Perceptlayer key, so there is no Bilibili developer account, app review or partner approval to get first. It only reads data: if Bilibili has an official API and you need to act on your own Bilibili account, such as posting, managing orders or reading private data, use that one.
Should I build a Bilibili scraper instead?
You can, but a Bilibili scraper is code you maintain: page changes break it, requests get blocked, and Bilibili's terms govern how you collect data. The Bilibili API gives you 6 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first. Some of these endpoints return social or personal data and need the restricted-endpoint terms; collect only what you have a lawful basis for.
Try the Bilibili API with 100 free credits
No credit card. Failed calls are never billed.