a_idstringobrigatório
Video id
https://api.sandbase.ai/v1/api/bilibili/web/video-subtitleReturns subtitle data for a specified Bilibili video based on its video ID and CID. Helps retrieve available caption tracks and related metadata.
[
{
"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
}
]
}
}
]Selecione um exemplo para carregar as entradas e o resultado no playground.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
a_id | string | Yes | Video id |
c_id | string | Yes | Video cid |
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
}
]
}
| Field | Meaning |
|---|---|
subtitles[] | Subtitle tracks. |
subtitles[].lan / lan_doc | Language code (ai-zh for AI Chinese) and its label. |
subtitles[].subtitle_url | Protocol-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_status | Set for AI-generated tracks. |
aid and cid from a video detail API; one video has one cid per part.subtitles list.$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.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
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"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
a_idstringobrigatórioVideo id
c_idstringobrigatórioVideo cid
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
[
{
"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
}
]
}
}
]Explorar mais
| API | Preço | Resposta |
|---|---|---|
Bilibili Video Subtitle DetailsEsta API Bilibili | $0.001 por chamada | JSON |
Bilibili | $0.001 por chamada | JSON |
Bilibili | $0.001 por chamada | JSON |
Bilibili | $0.001 por chamada | JSON |
Bilibili | $0.001 por chamada | JSON |
Bilibili | $0.001 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/bilibili/web/video-subtitle com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.001 por chamada. Cada organização recebe 100 chamadas grátis por dia UTC, compartilhadas entre as APIs elegíveis da SandBase, incluindo esta; depois disso, cada chamada é cobrada nesse valor do seu saldo SandBase. Não há assinatura.
Obrigatórios: a_id (string) e c_id (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Bilibili Video Subtitle Details funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Bilibili separadamente.