Bilibili API
Videos, comments, accounts, trends.
The Bilibili API lets you search videos and read video details, comments, account profiles, an account's videos and the trending list, with no Bilibili account or login. Each call costs 2 credits ($0.004 to $0.0067); failed calls are free. Use it over HTTP with an API key, or through MCP from your AI client. Last tested 2026-11-05.
Last tested: Last updated:
/v1/search200 OK2 creditsplatform: "bilibili" · query: "机械键盘"nullcollects 169views 35,706author.usernameauthor.verifiedauthor.followersmetrics.shares+36 actions.
One response format.
Open a row to see its request. Its full parameters and response fields are on its own page.
SearchFind videos by keyword: text, author, likes, comment count, views and publish time./v1/search2 credits≈ $0.0067
platformquery+1 optionalcurl https://api.socialtoai.com/v1/search \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili", "query": "机械键盘" }'POST /v1/searchYour key goes in the Authorization headerTrendingWhat is trending now: title, rank and heat./v1/trending2 credits≈ $0.0067
platform+1 optionaltype=videosthe trending videos board2 creditscurl https://api.socialtoai.com/v1/trending \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili" }'POST /v1/trendingYour key goes in the Authorization headerDetailOne video by ID or link: text, author, likes, comment count, views and publish time./v1/detail2 credits≈ $0.0067
platformid or urlcurl https://api.socialtoai.com/v1/detail \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili", "id": "BV1ECeJ65EZS" }'POST /v1/detailYour key goes in the Authorization headerCommentsThe comments under one video: text, likes, reply count and time./v1/comments2 credits≈ $0.0067
platformidreply_ofthe replies under one comment2 creditscurl https://api.socialtoai.com/v1/comments \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili", "id": "BV1ECeJ65EZS" }'POST /v1/commentsYour key goes in the Authorization headerUser ProfileOne account: name, bio, followers, following and post count./v1/user_profile2 credits≈ $0.0067
platformidcurl https://api.socialtoai.com/v1/user_profile \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili", "id": "8047632" }'POST /v1/user_profileYour key goes in the Authorization headerUser PostsThe recent videos of one account./v1/user_posts2 credits≈ $0.0067
platformidcurl https://api.socialtoai.com/v1/user_posts \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "bilibili", "id": "8047632" }'POST /v1/user_postsYour key goes in the Authorization headerCompared with Douyin: Bilibili videos do not give images.
What a whole job costs.
| The job | How it adds up | Credits | About |
|---|---|---|---|
| Search 1,000 results on Bilibili | usually 20 a page, 50 pages | 100 credits | about $0.33 |
| Read 1,000 Bilibili comments | usually 20 a page, 50 pages | 100 credits | about $0.33 |
| Backfill one Bilibili account: a list of 200 videos and 20 in full | 7 list pages + 20 full reads | 54 credits | about $0.18 |
| Watch 1 Bilibili account daily, at most a month | 10 credits × 31 days | 310 credits | about $1.03 |
Priced at the $10 pack; larger purchases bring it down. A watch runs only while it is on, and you can pause it at any time. There is no subscription.
Or skip the parameters.
Just ask.
Connect SocialToAI once over MCP. Your AI picks the calls, and you see what each one cost.
Which is bigger on Bilibili this week: home coffee or matcha?
- search“home coffee”2 credits
- search“matcha”2 credits
Read the comments on this Bilibili video and tell me what people complain about.
- detailthe video you pasted2 credits
- commentsfirst 3 pages6 credits
What is trending on Bilibili right now?
- trendingthe current board2 credits
Same shape on every platform.
Learn it once.
A Bilibili video and a TikTok video come back with the same field names. What a platform cannot give comes back as null.
{ "platform": "bilibili", "id": "…", "ref": "…", "approx": [], "type": "content", "url": "https://example.com/…", "format": "video", "title": "…", "text": "…", "published_at": "2026-10-09T09:00:00.000Z", "author": { "id": "…", "username": null, "name": "…", "verified": true, "followers": 18634892 }, "metrics": { "likes": 140338, "comments": 2707, "shares": 4696, "collects": 20492, "views": 2166787, "reposts": null }, "images": null, "hashtags": null, "is_pinned": null}author.usernamemetrics.repostsimageshashtagsis_pinned{ "platform": "tiktok", "id": "…", "ref": "…", "approx": [], "type": "content", "url": "https://example.com/…", "format": "video", "title": null, "text": "…", "published_at": "2026-10-08T13:12:22.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": 2060936 }, "metrics": { "likes": 67877, "comments": 524, "shares": 2472, "collects": 5331, "views": 449259, "reposts": null }, "images": null, "hashtags": [], "is_pinned": null}titleauthor.verifiedmetrics.repostsimagesis_pinned7 tools read Bilibili.
All toolsDoes Bilibili have an official API?
Bilibili's open platform serves organisations, creators and businesses. Its video and data endpoints return the videos and stats of users who authorise the app, and each scope must be applied for.
Source: Bilibili's developer documentation, checked 2026-10-17.
1,000 videos here: about 50 bilibili.search calls (typically 20 a page), 100 credits, $0.33 at the first pack. Estimate your cost
- Comments API, every platformWhich platforms give comments, how many a page, at what price.
- How to analyze video comments with AI, and keep the original wordswhat comments say, with original words: the tool or your AI, price per platform, a recorded answer
- Monitor competitors' accounts every daycompetitors' accounts, daily: what is new and what beat their usual, from 9 credits an account
- Bilibili trending todayToday's board in one list, refreshed daily.
- Bilibili MCP serverLet your AI read Bilibili.