# Bilibili on Onekey > 15 endpoints for Bilibili (14 stable, 1 beta), 1 to 3 credits each. Category: Video & streaming. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Access: 15 of 15 endpoints are marked "needs a pack" or "may need a pack": free-grant credits reach only the open fetch path; a verified email and a purchased pack unlock the rest. Page: https://onekey.dev/platforms/bilibili Reference (Markdown): https://onekey.dev/docs/api/bilibili.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 15 mapped Bilibili endpoints return each: - `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 - plus 11 platform-specific fields under `ext.` ## Endpoints ### bilibili.comments Top-level comments on a Bilibili video (by aid). - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/comments?aid=170001` with header `x-api-key: YOUR_API_KEY` - Parameters: - `aid` (string, required): Bilibili video aid (numeric av id) - `page` (string, optional, default 1): Page - Fields returned: `content.id`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `author.avatarUrl`, `engagement.likes`, `engagement.comments` - Reference: https://onekey.dev/docs/api/bilibili/comments.md ### bilibili.hot_search Bilibili trending search keywords. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/hot_search` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.title`, `content.id`, `content.type` - Reference: https://onekey.dev/docs/api/bilibili/hot_search.md ### bilibili.live_room Bilibili live room info: title, viewers, live status, area. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/live_room?room_id=23058` with header `x-api-key: YOUR_API_KEY` - Parameters: - `room_id` (string, required): Bilibili live room id - Fields returned: `content.id`, `content.title`, `content.text`, `author.id`, `engagement.views`, `media.thumbnailUrl`, `content.category`, `content.createdAt` - Reference: https://onekey.dev/docs/api/bilibili/live_room.md ### bilibili.live_streamer Bilibili live streamer profile (by uid). - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/live_streamer?mid=11153765` with header `x-api-key: YOUR_API_KEY` - Parameters: - `mid` (string, required): Bilibili user id (mid) - Fields returned: `author.id`, `author.displayName`, `author.avatarUrl`, `author.followers`, `ext.roomId` - Reference: https://onekey.dev/docs/api/bilibili/live_streamer.md ### bilibili.popular Bilibili popular (hot) videos right now. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/popular` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `author.avatarUrl`, `engagement.views`, `engagement.likes`, `engagement.comments`, `engagement.shares`, `engagement.bookmarks`, `media.durationSeconds`, `media.thumbnailUrl`, `ext.bvid`, `ext.danmaku`, `ext.coins` - Reference: https://onekey.dev/docs/api/bilibili/popular.md ### bilibili.ranking Bilibili all-site ranking (3-day) of videos. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/ranking` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.title`, `author.id`, `author.displayName`, `engagement.views`, `media.thumbnailUrl`, `ext.bvid`, `ext.danmaku`, `ext.coins`, `ext.durationText` - Reference: https://onekey.dev/docs/api/bilibili/ranking.md ### bilibili.related Videos related to a Bilibili video (by bvid). - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/related?bvid=BV1GJ411x7h7` with header `x-api-key: YOUR_API_KEY` - Parameters: - `bvid` (string, required): Bilibili video id, e.g. BV1GJ411x7h7 - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `author.avatarUrl`, `engagement.views`, `engagement.likes`, `engagement.comments`, `engagement.shares`, `engagement.bookmarks`, `media.durationSeconds`, `media.thumbnailUrl`, `ext.bvid`, `ext.danmaku`, `ext.coins` - Reference: https://onekey.dev/docs/api/bilibili/related.md ### bilibili.search_users Search Bilibili users by keyword. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/search_users?q=music` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search keyword - Fields returned: `author.id`, `author.displayName`, `content.text`, `author.followers`, `author.contentCount`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/bilibili/search_users.md ### bilibili.search_videos Search Bilibili videos by keyword. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/search_videos?q=music` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search keyword - `page` (string, optional, default 1): Page - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `engagement.views`, `engagement.likes`, `engagement.comments`, `engagement.bookmarks`, `media.thumbnailUrl`, `content.url`, `ext.bvid`, `ext.danmaku`, `ext.durationText` - Reference: https://onekey.dev/docs/api/bilibili/search_videos.md ### bilibili.user Bilibili user card: name, sign, followers, level, uploads, total likes. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/user?mid=2` with header `x-api-key: YOUR_API_KEY` - Parameters: - `mid` (string, required): Bilibili user id (mid) - Fields returned: `author.id`, `author.displayName`, `content.text`, `author.avatarUrl`, `author.followers`, `author.following`, `author.contentCount`, `engagement.likes`, `ext.level`, `ext.verifiedTitle` - Reference: https://onekey.dev/docs/api/bilibili/user.md ### bilibili.user_counts Counts of a Bilibili user's videos, bangumi, channels and articles. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/user_counts?mid=2` with header `x-api-key: YOUR_API_KEY` - Parameters: - `mid` (string, required): Bilibili user id (mid) - Fields returned: `author.contentCount`, `ext.articles`, `ext.audios` - Reference: https://onekey.dev/docs/api/bilibili/user_counts.md ### bilibili.user_stats Bilibili follower / following counts for a user. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/user_stats?mid=2` with header `x-api-key: YOUR_API_KEY` - Parameters: - `mid` (string, required): Bilibili user id (mid) - Fields returned: `author.id`, `author.followers`, `author.following` - Reference: https://onekey.dev/docs/api/bilibili/user_stats.md ### bilibili.video Bilibili video details (view endpoint) by bvid. - Price: 1 credit per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/bilibili/video?bvid=BV1GJ411x7h7` with header `x-api-key: YOUR_API_KEY` - Parameters: - `bvid` (string, required): Bilibili video id, e.g. BV1GJ411x7h7 - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `author.avatarUrl`, `engagement.views`, `engagement.likes`, `engagement.comments`, `engagement.shares`, `engagement.bookmarks`, `media.durationSeconds`, `media.thumbnailUrl`, `ext.bvid`, `ext.danmaku`, `ext.coins` - Reference: https://onekey.dev/docs/api/bilibili/video.md ### bilibili.video_pages Parts (pages) of a Bilibili video: part titles and durations. - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/video_pages?bvid=BV1GJ411x7h7` with header `x-api-key: YOUR_API_KEY` - Parameters: - `bvid` (string, required): Bilibili video id, e.g. BV1GJ411x7h7 - Fields returned: `content.id`, `content.title`, `media.durationSeconds`, `ext.page` - Reference: https://onekey.dev/docs/api/bilibili/video_pages.md ### bilibili.video_tags Tags of a Bilibili video (by aid). - Price: 3 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/bilibili/video_tags?aid=170001` with header `x-api-key: YOUR_API_KEY` - Parameters: - `aid` (string, required): Bilibili video aid (numeric av id) - Fields returned: `entity.id`, `entity.name`, `entity.stats.followers`, `ext.uses` - Reference: https://onekey.dev/docs/api/bilibili/video_tags.md ## Sample request ```bash curl "https://api.onekey.dev/v1/bilibili/live_room?room_id=23058" \ -H "x-api-key: YOUR_API_KEY" ```