bvidstringobligatoire
Bilibili Video ID (BVID).
https://api.sandbase.ai/v1/api/bilibili/video-captionGet caption data for a Bilibili video segment identified by BVID, AID, and CID. Use it to obtain subtitles for transcript extraction, accessibility review, or language-focused content analysis.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Returns the list of caption tracks available for one Bilibili video part. Each track has a language code, a language name, and a URL to the subtitle file. You send bvid, aid, and cid together.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-caption" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"bvid": "BV1GJ411x7h7", "aid": "80433022", "cid": "137649199"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
aid | string | Yes | Bilibili AID. |
bvid | string | Yes | Bilibili Video ID (BVID). |
cid | string | Yes | Bilibili CID. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [
{
"lan": "zh-CN",
"lan_doc": "中文(中国)",
"subtitle_url": "https://aisubtitle.hdslb.com/bfs/subtitle/662b660a420431045b483f9b560057c262539b…"
}
]
}
| Field | Meaning |
|---|---|
data[] | One caption track per item. The list has one entry for each language available for the video part. |
data[].lan | Language code of the track, such as zh-CN, zh-Hans, or zh-Hant. |
data[].lan_doc | Display name of the language, such as 中文(简体) for Simplified Chinese. |
data[].subtitle_url | URL of the subtitle file for this track. The file is JSON and the URL carries an auth_key query parameter. |
bvid, aid, and cid. They must describe the same video part.aid from a bvid.cid of each part of a video.subtitle_url values include an auth_key, so fetch the subtitle file soon after you receive the response.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-caption" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"aid": "80433022",
"cid": "137649199",
"bvid": "BV1GJ411x7h7"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
bvidstringobligatoireBilibili Video ID (BVID).
aidstringobligatoireBilibili AID.
cidstringobligatoireBilibili CID.
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Bilibili Video CaptionsCette API Bilibili | $0.014286 par appel | JSON |
Bilibili | $0.001 par appel | JSON |
Bilibili | $0.001 par appel | JSON |
Bilibili | $0.001 par appel | JSON |
Bilibili | $0.001 par appel | JSON |
Bilibili | $0.001 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/bilibili/video-caption avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.014286 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : bvid (string), aid (string) et cid (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. Bilibili Video Captions fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Bilibili séparément.