YouTube Subtitles API
Get a YouTube video's captions as a ready-to-save SRT or WebVTT subtitle file, in the caption language you choose or the one YouTube shows first. A video with no captions, or none in the language asked for, returns a 404.
- Endpoint
- POST /youtube/get-video-subtitles
- Price
- 1 credit per request
- SDK
- client.youtube.getVideoSubtitles()
- MCP tool
- youtube_get_video_subtitles
curl -X POST "https://api.bridgly.app/youtube/get-video-subtitles" \ -H "Authorization: Bearer $BRIDGLY_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw", "format": "srt"}'import osimport requestsresponse = requests.post( "https://api.bridgly.app/youtube/get-video-subtitles", headers={"Authorization": f"Bearer {os.environ['BRIDGLY_KEY']}"}, json={ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw", "format": "srt", },)data = response.json()const response = await fetch("https://api.bridgly.app/youtube/get-video-subtitles", { method: "POST", headers: { Authorization: `Bearer ${process.env.BRIDGLY_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw", "format": "srt" }),});const data = await response.json();import { Bridgly } from "@bridgly/sdk";const client = new Bridgly({ apiKey: "bgly_YOUR_KEY" });const res = await client.youtube.getVideoSubtitles({ url: "https://www.youtube.com/watch?v=jNQXAC9IVRw", format: "srt"});if (res.type === "success") { console.log(res.data);}What does the YouTube Subtitles API return?
YouTube subtitles API: download any video’s captions as an SRT or WebVTT subtitle file, in any of its caption languages. Every response has the same envelope: the result in data, plus timeMs and the creditsCost of the call.
Request body
urlstringrequired- The video whose transcript to fetch. Accepts any YouTube video link — watch, youtu.be, Shorts, embed, or live — or a bare 11-character video ID.
languagestring- Caption language to read, as a language code such as "en" or "pt-BR"; "en" also matches "en-US". Defaults to the caption track YouTube shows first. The languages a video has are listed in `captionTracks`.
formatenum · default srt- Subtitle file format: "srt" (SubRip) or "vtt" (WebVTT). Defaults to "srt".
- srt | vtt
cacheMaxAgeHoursinteger- Accept a cached result up to this many hours old, at no cost; its `cachedAt` says when it was fetched. Without one that recent, fresh data is fetched at the normal price. Leave it out to always get fresh data, e.g. 24.
cacheOnlyboolean- Return only a cached result, never fresh data. With `cacheMaxAgeHours`, only one that recent; without it, the latest of any age. Responds 404, at no cost, when there is none, e.g. true.
Example response
{ "timeMs": 1840, "creditsCost": 1, "cachedAt": "2026-01-15T09:30:00.000Z", "data": { "languageCode": "string", "isAutoGenerated": true, "videoId": "string", "captionTracks": [ { "languageCode": "string", "languageName": "string", "isAutoGenerated": true } ], "format": "srt", "content": "string" }}What can you build with the YouTube Subtitles API?
Add subtitles to clips
Load the file into a video editor with the matching timings.
Caption in another language
Download any of the caption languages a video has for a video you re-host with permission.
Check caption quality
Review a video’s captions in any subtitle tool.
YouTube Subtitles API questions
Which formats are supported?
SubRip (.srt), the default, and WebVTT (.vtt). The file comes back as text in content, ready to save.
Can I choose the language?
Yes. Set language to pick one of the video’s caption tracks. Without it you get the track YouTube shows first.
How do I use the YouTube Subtitles API?
Send a POST request to https://api.bridgly.app/youtube/get-video-subtitles with url in the JSON body and your API key in the Authorization header. In the TypeScript SDK, call client.youtube.getVideoSubtitles(). AI agents connected to Bridgly over MCP can call the youtube_get_video_subtitles tool.
How much does the YouTube Subtitles API cost?
Costs 1 credit per request. Credits cost $2.00 per 1,000 on pay-as-you-go and as low as $1.67 per 1,000 at volume. New accounts on a business email start with 100 free credits, and failed requests are never charged.
More YouTube endpoints
The same API key works on every endpoint. See all YouTube Transcript API endpoints.
- YouTube Search API→YouTube search API: search YouTube by keyword for videos, Shorts, channels and playlists, filtered by type, upload date, length and features such as 4K or live, as JSON.
- YouTube Search Suggestions API→YouTube search suggestions API: get the searches YouTube suggests as a query is typed, for any language and country, as JSON.
- YouTube Hashtag API→YouTube hashtag API: list the videos or Shorts on any hashtag’s YouTube page, with how many videos and channels use it, as JSON.
- YouTube Playlist API→YouTube playlist API: get a playlist’s title, description, owner, video and view counts, plus its videos in order with duration and views, as JSON.
Try the YouTube Subtitles API
100 free credits on business email, no card. Your first call takes a minute.