GET /v1/youtube/util/video_captions_v1
YouTube Video Captions API (V1)
stable · 20 credits per success
Retrieve the available caption tracks of a YouTube video, or request the captions in SRT, XML, JSON3 or plain-text format. Use it to support transcription, accessibility, localisation or text analysis.
Request parameters
| Name | Type | In | Required | Description | Example |
|---|---|---|---|---|---|
| format | string | query | no | 字幕输出格式。 可用值: - `srt`:带时间轴提示的SubRip字幕格式 - `xml`:原始XML字幕格式 - `json3`:YouTube原始JSON字幕结构 - `txt`:不带时间轴提示的纯文本 | srt |
| videoId | string | query | yes | YouTube视频的唯一标识符。 | demo |
| languageCode | string | query | no | 字幕语言代码,例如en、zh-Hans或a.en。留空以检索可用的字幕轨道。 | demo |
Response fields
Field dictionary coming soon — the executable panel shows the live shape.
Errors
| code | HTTP | Meaning | Billed |
|---|---|---|---|
| 40001 | 400 | Invalid parameters | no |
| 40102 | 401 | Invalid or revoked API Key | no |
| 40201 | 402 | Insufficient credits | no |
| 40402 | 404 | Resource not found | no |
| 42201 | 422 | Quality gate failed | no |
| 42901 | 429 | Rate limit exceeded | no |
| 50401 | 504 | Upstream timeout | no |
| 50201 | 502 | Upstream error | no |
Billing
Success costs 20 credits. Any failure — including a 200 that fails the quality gate — costs 0.