Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Bilibili Video Subtitle Details

API 文件
https://api.sandbase.ai/v1/api/bilibili/web/video-subtitle

Returns subtitle data for a specified Bilibili video based on its video ID and CID. Helps retrieve available caption tracks and related metadata.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
2 個必填 · 0 個選填
每天 100 次免費呼叫每天前 100 次呼叫免費(按組織共用)· 於 UTC 00:00 重設。之後按次收費。

Playground

輸入
Video id
Video cid
輸出範例
回應outputs · 1.0 KB · 25 行
[
  {
    "data": {
      "allow_submit": false,
      "font_size_type": 0,
      "lan": "",
      "lan_doc": "",
      "subtitle_position": null,
      "subtitles": [
        {
          "ai_status": 2,
          "ai_type": 0,
          "id": 1689850260387946200,
          "id_str": "1689850260387946240",
          "is_lock": false,
          "lan": "ai-zh",
          "lan_doc": "中文",
          "subtitle_url": "//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/1140060817394522840048445829058a24de68ec57ef3a7c4ccbbd139b?auth_key=1787218445-49f99e66f1fd4e339748e2caae8ae793-0-210c99e3de5bfc93303f4ccf3635c042",
          "subtitle_url_v2": "//subtitle.bilibili.com/S%13%1BP.%1D%28%29X%2CR%5Ej%1F%25w%0E%02H%5EHO4%14%7B4%08K@%3C%7B%00M%0B%0A%1AM%08%056N6$%0C0&%02%1E%01%09%0E%1A2V~%15AX%16EYSA_%0Cw%1A%5C%5Et%17TRYXQV%5DYQ%0FzvMa3%5COJ%1CJM3%1Az%13%10%0E%15%12%5E%08D%0B%5C%2CL%0D%5Du%16%02?auth_key=1787218445-49f99e66f1fd4e339748e2caae8ae793-0-210c99e3de5bfc93303f4ccf3635c042",
          "type": 1
        }
      ]
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Bilibili Video Subtitle Details API

List the subtitle tracks of a Bilibili video, including AI-generated Chinese subtitles, with a download URL for each track. Needs the video's aid and cid.

Use cases

  • Get a video's transcript for summaries or search.
  • Translate or index Bilibili videos by their spoken content.

Request

curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/video-subtitle" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a_id": "114006081739452", "c_id": "28400484458"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
a_idstringYesVideo id
c_idstringYesVideo cid

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "allow_submit": false,
  "font_size_type": 0,
  "lan": "",
  "lan_doc": "",
  "subtitle_position": null,
  "subtitles": [
    {
      "ai_status": 2,
      "ai_type": 0,
      "id": 1689850260387946240,
      "id_str": "1689850260387946240",
      "is_lock": false,
      "lan": "ai-zh",
      "lan_doc": "中文",
      "subtitle_url": "//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/1140060817394522840048445829058a24de…",
      "subtitle_url_v2": "//subtitle.bilibili.com/S%13%1BP.%1D%28%29X%2CR%5Ej%1F%25w%0E%02H%5EHO4%14%7B4%0…",
      "type": 1
    }
  ]
}

Response fields

FieldMeaning
subtitles[]Subtitle tracks.
subtitles[].lan / lan_docLanguage code (ai-zh for AI Chinese) and its label.
subtitles[].subtitle_urlProtocol-relative URL of the subtitle JSON; prefix it with https:. The file has body[] entries with from, to (seconds) and content.
subtitles[].ai_type / ai_statusSet for AI-generated tracks.

Notes

  • Get aid and cid from a video detail API; one video has one cid per part.
  • Videos without subtitles return an empty subtitles list.

Pricing

$0.001 per successful call. Failed calls, including lookups whose target does not exist, are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON
Bilibili每次呼叫 $0.001JSON

指南:Best Bilibili API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Bilibili Video Subtitle Details API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/bilibili/web/video-subtitle。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Bilibili Video Subtitle Details API 的費用是多少?

每次 $0.001。每個組織每個 UTC 日可免費呼叫 100 次,並可在包含此 API 在內的所有符合資格之 SandBase APIs 間共用;超過後,每次呼叫都會從您的 SandBase 餘額中以此價格計費。沒有訂閱方案。

Bilibili Video Subtitle Details API 接受哪些參數?

必要:a_id (string) 和 c_id (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Bilibili Video Subtitle Details API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Bilibili 開發者帳號或 API 金鑰嗎?

不需要。Bilibili Video Subtitle Details 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Bilibili API 存取權。