Bilibili API

Also known asB站哔哩哔哩小破站

11 endpoints read Bilibili: videos, users, comments, trends. From $0.0020 a call. No Bilibili login and no cookie; a failed call is free.

Endpoints11 endpointsin 5 groups, one response shape
PriceFrom $0.0020per call. Failed calls are free
30-day availability100% Live · the share of time the endpoints were serving calls
DataFetched liveboards are 10-minute snapshots

The 11 endpoints for Bilibili, and what each returns

  • Bilibili comment replies: Get a page of replies to a Bilibili comment, by the comment's ID and its video's BV number: text, replier, likes, what it answers, time posted.
  • Bilibili hot searches: Get Bilibili's current hot search terms, up to 50, with rank, heat and the words the list shows for each.
  • Bilibili user profile: Get a Bilibili user's profile by user number: name, bio, avatar, verification and what it says, follower and following counts, number of videos, likes received in all, account level, live room link.
  • Bilibili user videos: Get a page of the videos a Bilibili user uploaded, newest first: title, description, views, comments, danmaku count, length, time published.
  • Bilibili video comments: Get a page of comments on a Bilibili video by BV number, top or newest first: text, commenter and their level, likes, reply count, time posted.
  • Bilibili video detail: Get one Bilibili video by BV number or link: title, description, uploader, views, likes, coins, saves, danmaku count, length, tags, section, IP location, and the cid that subtitles and danmaku are asked for by.
  • Bilibili video transcript (video to text): Give a Bilibili video's link or BV number and get what is said in it: the whole text, each sentence with its start and end time, and ready SRT subtitles, with the title, uploader and length; speakers can be told apart. A video in several parts is transcribed from its first. Charged a call, plus by the minute of video when its speech is recognised; nothing when nobody speaks. Videos of up to 5 minutes. A video over 5 minutes and up to 2 hours is answered at once with a job: call again with it a little later for the text, at the same price, charged only when the text is delivered.
  • Bilibili video search: Get a page of Bilibili videos for search terms, by relevance, newest or most played: title, uploader, views, likes, saves, comments, length.
  • Bilibili popular videos: Get a page of Bilibili's popular videos: title, description, uploader, views, likes, coins, saves, danmaku count, length, section, IP location, why it is recommended.
  • Bilibili video downloader: Give a Bilibili video by BV number or link and get its picture in each quality and its sound in each quality, apart (with width, height, codec, bit rate, backup addresses and when each expires). Fetch every address with the header Referer: https://www.bilibili.com, join picture and sound with ffmpeg, and once they expire, call again.
  • Bilibili user videos (backup): The backup of Bilibili user videos, to call when the original cannot serve: the same parameters and result (without the description and the comment count), at a higher price.

One call, as it came back

A recorded call, fields already tidied up: ready for an AI or a spreadsheet.
Recorded
GET/v1/bilibili/videos/search$0.0020
FieldValue
typevideo
published_at2026-09-30 08:55 UTC
metrics.likes237
metrics.comments64
metrics.favorites169
metrics.views35,706

The first 6 rows of a response recorded 2026-10-12 18:47 UTC.

Run it in the Playground · $0.0020
Recorded response
{
  "code": "ok",
  "request_id": "dee21d14-3682-420a-acad-8806b2d59dfe",
  "data": {
    "items": [
      {
        "id": "BV1M05Rhoe4r",
        "url": "https://www.bilibili.com/video/BV1M05Rhoe4r",
        "type": "video",
        "title": "实测一个月机械键盘,结论有点意外",
        "text": null,
        "published_at": "2026-09-30T08:55:00.000Z",
        "author": {
          "id": "585724901",
          "name": "阿杰爱折腾",
          "avatar_url": "https://i0.hdslb.com/bfs/face/17a7658e63c84808ef09bb48.jpg"
        },
        "metrics": {
          "likes": 237,
          "comments": 64,
          "favorites": 169,
          "views": 35706
        },
        "hashtags": [
          "户外生活",
          "好物分享",
          // … 8 more
        ]
      },
      // … 19 more
    ]
  },
  "page": {
    "next_cursor": "c1.72NAeDsxx6zMLTUXCjX2T5Su39puxExBbLOvdWBm",
    "cursor_expires_at": "2026-10-12T19:47:48.000Z",
    "has_more": true,
    "returned": 20
  },
  "warnings": [],
  "meta": {
    "capability": "bilibili.videos.search",
    "result_status": "complete",
    "fetched_at": "2026-10-12T18:47:48.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "lang": "capability",
      "author.username": "platform",
      "author.verified": "capability",
      "author.followers": "capability",
      "metrics.shares": "capability",
      "metrics.reposts": "platform",
      "images": "platform",
      "mentions": "capability",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}

From a response recorded 2026-10-12 18:47 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

What you can get

Each row is an endpoint: what it returns and what one call costs.

EndpointPathReturnsPrice
Backup versions1
Bilibili user videos (backup)GET/v1/bilibili/backup/users/videos/listPost list$0.0300
Videos6
Bilibili video searchGET/v1/bilibili/videos/searchPost list$0.0020
Bilibili video detailGET/v1/bilibili/videos/getPost$0.0020
Bilibili video downloaderGET/v1/bilibili/videos/media/getMedia files$0.0020
Bilibili video transcript (video to text)GET/v1/bilibili/videos/transcript/getTranscript$0.0040 + a minute recognised
Bilibili video commentsGET/v1/bilibili/videos/comments/listComment list$0.0020
Bilibili popular videosGET/v1/bilibili/videos/trendingPost list$0.0020
Users2
Bilibili user profileGET/v1/bilibili/users/getAccount$0.0020
Bilibili user videosGET/v1/bilibili/users/videos/listPost list$0.0020
Comments1
Bilibili comment repliesGET/v1/bilibili/comments/replies/listComment list$0.0020
Bilibili hot searchesGET/v1/bilibili/trends/listTrend list$0.0020
Prices are the prices in force. A call that fails, or whose result is uncertain, costs nothing.Bilibili API pricing →Bilibili data in your AI →See live status →

What people build with it

Ready-made tasks your AI can run on Bilibili data. Each is a few calls under a spending cap.

Ask about Bilibili right inside Claude or Cursor

Add the OneFeedAPI MCP server and the AI finds the Bilibili endpoint it needs and calls it; answers link back to the source. You pay for the calls it makes.

Bilibili MCP setup →
https://onefeedapi.com/mcp

Start in three steps

The call shown here is Bilibili video search. Every other Bilibili endpoint is called the same way and answers in the same envelope.

Get a key

Sign in with an emailed code or Google. Free trial, no card needed.

Call it, or let your AI call it

One GET from your code. Or paste this prompt into your agent with your key in it: it sets itself up, then finds and calls these endpoints by itself.

Read https://onefeedapi.com/agents.md and set up OneFeedAPI in this agent. My API key is dx_live_…; use it for every OneFeedAPI call.

Sign in to copy it with your key

Read the same shape every time

Items are in data.items (one object in data.item), the next page in page.next_cursor, the charge in meta.billing.amount. A failed call is not charged.

Read the quickstart →
curl -G "https://onefeedapi.com/v1/bilibili/videos/search" \
  --data-urlencode "query=机械键盘" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.bilibili.videos.search(query="机械键盘")
print(result["data"]["items"])
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.bilibili.videos.search({ query: "机械键盘" });
console.log(result.data.items);
onefeedapi call bilibili.videos.search 'query=机械键盘'
{
  "mcpServers": {
    "onefeedapi": {
      "type": "http",
      "url": "https://onefeedapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${ONEFEED_API_KEY}"
      }
    }
  }
}

Add this to your MCP client, then ask your agent to call bilibili.videos.search.

Edge cases

What the Bilibili endpoints do at their edges, and what to check when a call does not return what you expected.

Page sizes
A list returns 20 to 50 items a page, depending on the endpoint. 6 of the 7 lists go on to a next page: page.next_cursor, passed back as cursor, each page a call of its own. The others return one page only.
Fields it cannot give
11 of the 11 endpoints cannot fill every field of the object they return. Each endpoint's page lists which, and every answer repeats them in meta.unavailable: a missing field is never a silent zero.
A missing object that reads as empty
Bilibili user videos, Bilibili user videos (backup): an object that does not exist cannot be told from one with nothing under it, so the answer is an empty result, not a 404.
Snapshots
Bilibili hot searches, Bilibili popular videos: a board is a snapshot refreshed every 10 minutes, and meta.fetched_at says when it was taken.
The BV number
A video is named by its BV number, 12 characters starting with BV1, or by its page link (bilibili.com/video/BV…); a b23.tv short link from the app is taken too.
The user number (mid)
A user is named by the digits after space.bilibili.com/ in a space link.
Replies need two IDs
Replies take the comment's ID and its video's BV number, both as the comment list returns them (id and post_id).
Fewer counts in an upload list
A user's video list gives views, comments and danmaku, but no likes, coins, saves or shares; read a video's detail for those.
Empty is not “not found”
A user number nobody has returns an empty video list.

How this differs from Bilibili's official open platform

Bilibili's open platform lists its scopes as USER_INFO, USER_DATA, ARC_BASE, ARC_DATA, ATC_DATA and LIVE_ROOM_DATA: the authorising user's own profile, data, videos, articles and live room. None of them is a search.

It is built for an app a creator uses on their own channel. OneFeedAPI reads public Bilibili videos by keyword, any video's details and comments, any account's videos and the trending lists, with no app review and no Bilibili account of yours.

Read on 2026-10-29 in the platform's own documents: Bilibili Open Platform: scope list

Questions about the Bilibili API

Short answers. The details are on each endpoint's page.

Does Bilibili have an official API?

Bilibili's open platform lists its scopes as USER_INFO, USER_DATA, ARC_BASE, ARC_DATA, ATC_DATA and LIVE_ROOM_DATA: the authorising user's own profile, data, videos, articles and live room. None of them is a search.

What Bilibili data can I get through the API?

11 endpoints: videos, users, comments, trends. Each endpoint's page gives its parameters and fields, with a recorded response.

How do I call the Bilibili API?

Sign up for a key, send it as Authorization: Bearer <key> and call the endpoint's address, for example GET https://onefeedapi.com/v1/bilibili/comments/replies/list. Or connect OneFeedAPI to Claude, Cursor or ChatGPT (MCP) and ask in a sentence. The free trial needs no card.

How many tokens does a Bilibili API response take in an AI?

Across 9 Bilibili endpoints, one recorded real response each, the platform's own JSON comes to 477k tokens and what an AI reads through OneFeedAPI's MCP server to 21k, 96% fewer; the JSON of a direct API call is 95% fewer (counted 2026-11-06). Every platform uses the same field names, and fields returns only the ones you name.

How is the Bilibili API priced?

Per call, no subscription. From $0.0020 to $0.0300 a call; each endpoint's page shows its own price. You are charged when data comes back; a failed call costs nothing.

Do I need a Bilibili account or a cookie?

No. One OneFeedAPI key is all you hold: no Bilibili login, no cookie, no device to keep alive. The endpoints return publicly visible data only.

Is the data live?

A call fetches from Bilibili at that moment, and meta.fetched_at says when. Bilibili hot searches, Bilibili popular videos: a board is a snapshot refreshed every 10 minutes. A result is kept for 24 hours, so a retry with the same Idempotency-Key is not charged again.

What happens when Bilibili changes something?

A call that fails is not charged, whatever the reason. An endpoint that is paused answers capability_paused, also free, and GET /v1/catalog/status says what is up right now.

Related

Call Bilibili with one key.

Free trial on sign-up: up to 50 calls at $0.0020. No card. No Bilibili login, no cookie, no subscription. A failed call is free.

Start free