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.

Bilibili
GET/v1/bilibili/video?bvid=BV1xx411c7mD
curl "https://api.perceptlayer.com/v1/bilibili/video?bvid=BV1xx411c7mD" \
  -H "X-API-Key: $API_KEY"
cURL1 credit per successful call
Run this call below or from your dashboard to see a live response.

Playground

Run this API

cURLshell
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.

Note
Endpoints marked “Needs terms” return personal or social data. They work once you accept the restricted-endpoint terms in your dashboard.
EndpointRequired parametersReturnsCost
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: search takes a keyword and search_type (video, bili_user, media_bangumi, media_ft, article, live, live_user or live_room), with page, order (totalrank, click, pubdate, scores, stow, dm or pw), duration and tids.
  • Videos: video takes a bvid or aid; video-tags takes a bvid.
  • Comments: comments takes type and oid, with sort, pn and ps.
  • Uploaders: user takes a mid; user-videos takes a vmid, with order (pubdate or click), pn and ps.

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.

Social mediaJSONRESTMCPSome endpoints need terms

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 Bilibili

Follow a channel's public uploads

Use the Bilibili API to follow a channel's public uploads

Research how a product or game is covered in video

Use the Bilibili API to research how a product or game is covered in video

Collect video tags for trend analysis

Use the Bilibili API to collect video tags for trend analysis

FAQ

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.