YouTube Transcript API
Get a YouTube video's timed transcript from its link, in the caption language you choose or the one YouTube shows first, with every caption track the video has. A video with no captions, or none in the language asked for, returns a 404.
- Endpoint
- POST /youtube/get-video-transcript
- Price
- 1 credit per request
- SDK
- client.youtube.getVideoTranscript()
- MCP tool
- youtube_get_video_transcript
curl -X POST "https://api.bridgly.app/youtube/get-video-transcript" \ -H "Authorization: Bearer $BRIDGLY_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "language": "en"}'import osimport requestsresponse = requests.post( "https://api.bridgly.app/youtube/get-video-transcript", headers={"Authorization": f"Bearer {os.environ['BRIDGLY_KEY']}"}, json={ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "language": "en", },)data = response.json()const response = await fetch("https://api.bridgly.app/youtube/get-video-transcript", { method: "POST", headers: { Authorization: `Bearer ${process.env.BRIDGLY_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "language": "en" }),});const data = await response.json();import { Bridgly } from "@bridgly/sdk";const client = new Bridgly({ apiKey: "bgly_YOUR_KEY" });const res = await client.youtube.getVideoTranscript({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ", language: "en"});if (res.type === "success") { console.log(res.data);}What does the YouTube Transcript API return?
YouTube transcript API: get any video’s timed transcript in any of its caption languages, with every caption track it has, as JSON. 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`.
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, "text": "string", "segments": [ { "startMs": 0, "durationMs": 0, "text": "string" } ], "videoId": "string", "captionTracks": [ { "languageCode": "string", "languageName": "string", "isAutoGenerated": true } ] }}What can you build with the YouTube Transcript API?
Summarize videos
Feed the transcript to a model to summarize or answer questions.
Search what was said
Index transcripts to find the videos that mention a topic.
Quote the right moment
Use the timed lines to link to the second something was said.
YouTube Transcript API questions
Can I get a transcript in another language?
Set language to read one of the video’s own caption tracks, listed in captionTracks. Only the languages the video has captions in are available.
What if a video has no captions?
You get a 404 saying the video has no captions, and the call is not charged. Asking for a language the video lacks returns a 404 that lists the languages it has.
Does it work with auto-generated captions?
Yes. When a video only has YouTube’s automatic captions, those are returned and marked with isAutoGenerated.
How do I use the YouTube Transcript API?
Send a POST request to https://api.bridgly.app/youtube/get-video-transcript with url in the JSON body and your API key in the Authorization header. In the TypeScript SDK, call client.youtube.getVideoTranscript(). AI agents connected to Bridgly over MCP can call the youtube_get_video_transcript tool.
How much does the YouTube Transcript 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 Video and Transcript API→YouTube transcript API: get any video’s timed transcript plus title, description, channel, duration, views, likes and keywords from its link, as JSON.
- YouTube Subtitles API→YouTube subtitles API: download any video’s captions as an SRT or WebVTT subtitle file, in any of its caption languages.
- 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.
Try the YouTube Transcript API
100 free credits on business email, no card. Your first call takes a minute.