What you get#
Onekey exposes Bilibili as 15 endpoints behind one API key: 6 endpoints return one record (data is an object) and 9 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Bilibili also works for the rest of the video & streaming category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
comments | Top-level comments on a Bilibili video (by aid). | aid*, page | 3 | stable may need a pack |
hot_search | Bilibili trending search keywords. | - | 3 | stable may need a pack |
live_room | Bilibili live room info: title, viewers, live status, area. | room_id* | 1 | stable may need a pack |
live_streamer | Bilibili live streamer profile (by uid). | mid* | 1 | stable may need a pack |
popular | Bilibili popular (hot) videos right now. | - | 3 | stable may need a pack |
ranking | Bilibili all-site ranking (3-day) of videos. | - | 3 | stable may need a pack |
related | Videos related to a Bilibili video (by bvid). | bvid* | 3 | stable may need a pack |
search_users | Search Bilibili users by keyword. | q* | 3 | stable may need a pack |
search_videos | Search Bilibili videos by keyword. | q*, page | 3 | stable may need a pack |
user | Bilibili user card: name, sign, followers, level, uploads, total likes. | mid* | 1 | stable may need a pack |
user_counts | Counts of a Bilibili user's videos, bangumi, channels and articles. | mid* | 1 | stable may need a pack |
user_stats | Bilibili follower / following counts for a user. | mid* | 1 | stable may need a pack |
video | Bilibili video details (view endpoint) by bvid. | bvid* | 1 | beta may need a pack |
video_pages | Parts (pages) of a Bilibili video: part titles and durations. | bvid* | 3 | stable may need a pack |
video_tags | Tags of a Bilibili video (by aid). | aid* | 3 | stable may need a pack |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls bilibili.live_room (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/bilibili/live_room?room_id=23058" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from Bilibili, with the same names as on every other platform. The count is how many of its 15 mapped endpoints return the field; a field the source lacks is null, never missing. 11 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
author.id | string | 11 |
author.displayName | string | 9 |
content.id | string | 9 |
content.text | string | 8 |
content.title | string | 8 |
author.avatarUrl | URL | 7 |
content.createdAt | ISO 8601 date | 6 |
engagement.likes | integer | 6 |
engagement.views | integer | 6 |
media.thumbnailUrl | URL | 6 |
engagement.comments | integer | 5 |
author.followers | integer | 4 |
engagement.bookmarks | integer | 4 |
media.durationSeconds | number | 4 |
author.contentCount | integer | 3 |
engagement.shares | integer | 3 |
author.following | integer | 2 |
content.category | string | 1 |
content.type | string | 1 |
content.url | URL | 1 |
entity.id | string | 1 |
entity.name | string | 1 |
entity.stats.followers | integer | 1 |
The full schema is in Unified schema.
Pricing#
Bilibili calls cost 1 to 3 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.