a_idstringจำเป็น
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
}
]
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน 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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
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"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
a_idstringจำเป็นVideo id
c_idstringจำเป็นVideo cid
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"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
}
]
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/bilibili/web/video-subtitle โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: a_id (string) และ c_id (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili Video Subtitle Details ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก