Sign in Get free API key
Home / Transcript API / YouTube Transcript API
YouTube · API

YouTube Transcript API

A YouTube transcript API returns the caption text of a public YouTube video as structured JSON, so your code can read the words without opening the video. You send a link or a video ID, and you get back short text segments with start times.

Terminal · transcriptapi● real sample

›Get the transcript of this YouTube video

└GET /v1/youtube/transcript?video=dQw4w9WgXcQ

✓200 OK · 1 transcript

{ "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)", "language_code": "en", "transcript": [ { "text": "[♪♪♪]", "start": 1.36 }, … ] }

●YouTube · real sample · 61 segments

Copy request as HTTP
1 transcript
per successful request
$3.00
per 1,000 transcripts, pay as you go
JSON
text with start times
API key
from your dashboard
YouTube transcript API response example in JSON format

G2

4.8 out of 5

4.8

Capterra

4.7 out of 5

4.7

Trustpilot

4.6 out of 5

4.6

Product Hunt

4.9 out of 5

4.9

Google Reviews

4.8 out of 5

4.8

Apify Store

4.7 out of 5

4.7

AppSumo

4.8 out of 5

4.8

GetApp

4.7 out of 5

4.7

TrustRadius

4.6 out of 5

4.6

Software Advice

YouTube transcript API: more details

4.8 out of 5

4.8

SourceForge

4.7 out of 5

4.7

Chrome Web Store

4.6 out of 5

4.6

Gartner Peer Insights

4.8 out of 5

4.8

AlternativeTo

4.7 out of 5

4.7

RapidAPI

4.8 out of 5

4.8

YouTube transcript API: more details

Quick answer

Picture Maya, a developer who builds a search tool for a company with 3,000 training videos. Also, her team wants to search what people say inside the videos, not just the titles. In addition, watching them all is out of the question, so she needs the text in a form her code can use.

Moreover, this guide explains how that works, what the data looks like, where it breaks, and how the official and unofficial routes compare. Of course, it also covers cost, rate limits and the extra steps you need after the transcript arrives.

Need it now? Get a free TranscriptAPI key and test one video link before you read the rest.

Quick answers
  • A transcript API reads the caption track that already exists for a video. Furthermore, it does not listen to audio.
  • Videos with no captions have no transcript to return, even if the creator speaks clearly.
  • The official YouTube Data API v3 needs authorization tied to the video owner, so it rarely works for other people's videos.
  • A managed service like TranscriptAPI uses an API key from your dashboard and does not ask you to connect a Google account.
  • Billing is per transcript, which makes costs easy to predict.

Endpoint

What data can I extract with YouTube Transcript API?

In practice, one endpoint covers it: send a link, get the transcript back as JSON for 1 transcript per successful call.

Try it live

Try YouTube Transcript API live

In short, check the input, press Run and read the response. Also, without an API key you see a response captured from the API, and nothing is billed.

YouTube›TranscriptReal sample
Platform
YouTube
Endpoint
GET/v1/youtube/transcript
Parameters
Required and optional
dQw4w9WgXcQ
YouTube link or video ID
json
Optional. Output format
{
  "video": "dQw4w9WgXcQ",
  "format": "json"
}
Run · 1 transcriptGet free API key →
Response
Sample dataReal captured response · add your API key to run live · 0 transcripts · transcript list shortened to 1 of 61 segments
{
  "video_id": "dQw4w9WgXcQ",
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "author": "Rick Astley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "length_seconds": 213,
  "is_live_content": false,
  "language_code": "en",
  "language_name": "English",
  "is_generated": false,
  "available_languages": [
    {
      "language_code": "en",
      "name": "English",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "en",
      "name": "English (auto-generated)",
      "is_generated": true,
      "is_translatable": true
    },
    {
      "language_code": "de-DE",
      "name": "German (Germany)",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "ja",
      "name": "Japanese",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "pt-BR",
      "name": "Portuguese (Brazil)",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "es-419",
      "name": "Spanish (Latin America)",
      "is_generated": false,
      "is_translatable": true
    }
  ],
  "transcript": [
    {
      "text": "[♪♪♪]",
      "start": 1.36,
      "duration": 1.68
    },
    ... 60 more segments
  ],
  "cached": false
}
video_iddQw4w9WgXcQ
video_urlhttps://www.youtube.com/watch?v=dQw4w9WgXcQ
titleRick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)
authorRick Astley
channel_idUCuAXFkgsw1L7xaCfnd5JJOw
length_seconds213
is_live_contentfalse
language_codeen
language_nameEnglish
is_generatedfalse
available_languages[{"language_code":"en","name":"English","is_generated":false,"is_translatable":true},{"language_code":"en","name":"English (auto-generated)","is_generated":true,"is_translatable":true},{"language_code":"de-DE","name":"Ge
transcript[{"text":"[♪♪♪]","start":1.36,"duration":1.68},... 60 more segments]
cachedfalse

YouTube transcript API: more details

Overview

What is a YouTube transcript API?

In fact, a YouTube transcript API is a web service that gives you the text of a video's captions through a plain request. Besides, you send the video link or ID, and the service answers with JSON. Likewise, each item in the answer holds a piece of text and the time where it starts.

Overall, the captions come from one of two places. Also, some creators upload their own caption file, which is usually the most accurate version. When there is no upload, YouTube often creates auto-generated captions from the audio. In addition, both kinds are stored as a caption track, and both can be read the same way.

Moreover, people use different names for the same job. Of course, you will see "youtube caption api", "youtube subtitle api" and "get youtube video transcript" in search results. Furthermore, they all point at one need: turn a video into text that a program can read.

YouTube transcript API: how it differs from downloading a video

In short, some tools download the video file and then try to convert the sound into text. Besides, that is a heavy job, and it needs a speech engine. Likewise, a transcript API skips that step. In fact, it reads the text that YouTube already holds, which is faster and much cheaper per video.

Also, the trade is simple. Moreover, you get speed and low cost, but you depend on the captions being there. If the video has none, the API has nothing to return.

How it works

How the YouTube transcript API works step by step

In practice, the flow has four steps, and each one is small. Furthermore, most developers finish a first working call in under an hour.

STEP 1
Get an API key. Create a free account on TranscriptAPI and copy the key from your dashboard. The key identifies your account and tracks usage.
STEP 2
Pick the video. Copy the video link or the 11 character video ID. The ID is the part after v= in a normal watch link.
STEP 3
Send the request. Call the REST endpoint with your key and the video. Any language that can make an HTTP request works, including Python, JavaScript and plain command line tools.
STEP 4
Read the JSON. The response lists text segments with start times. Save them, search them or turn them into subtitle files.

Overall, you do not connect a Google account at any point. Besides, the service holds the access it needs, and you only hold the API key from your dashboard.

A short Python example in words

In fact, in Python you would use the requests library to send a GET request with your key in a header and the video ID as a parameter. Then you call .json() on the response and loop over the segments. Also, the exact endpoint and parameter names are listed in your dashboard, so copy them from there instead of guessing.

In addition, this is also why people search for "youtube video transcript python" and "youtube-transcript-api python". Moreover, python is the common choice for data work, and the loop over segments takes only a few lines. Of course, a search for youtube-transcript-api python usually leads to an open-source library, while this guide covers a hosted REST route instead.

Input

Input

In practice, every call takes the same kind of input: your API key in a header and the link of the video.

1
By video link

Of course, you have a link or a video ID: pass it as is.

X-API-KeyYOUR_API_KEY
videodQw4w9WgXcQ
formatjson
Best for
videos and Shorts · a link or the 11-character video ID
Example requests
Transcript
// GET /v1/youtube/transcript
// header: X-API-Key: YOUR_API_KEY
{
  "video": "dQw4w9WgXcQ",
  "format": "json"
}

Compare

YouTube transcript API options compared

Overall, you have three realistic routes. Likewise, each one fits a different kind of project.

RouteNeedsStrengthWeak spot
Official YouTube Data API v3OAuth 2.0 and video owner rightsFree tier, officialCannot read most public videos
PyPI youtube-transcript-api libraryPython and your own serverFree and open sourceOften blocked on cloud servers
Managed API such as TranscriptAPIAPI keyNo server upkeep, per transcript billingCosts money at scale

YouTube transcript API: the official YouTube Data API v3

Google's captions download method requires authorization with specific scopes. In fact, it also states that the user must have permission to edit the video. Also, that means it is built for channel owners who manage their own captions, not for reading other people's public videos.

Moreover, quota is a second limit. Of course, the quota cost page lists a default of 10,000 units per day, and one captions list call costs 50 units. Furthermore, a single download call costs 200 units. In practice, at those prices, a few dozen downloads would use up a day.

The open-source library

Of course, the PyPI youtube-transcript-api library reads caption data straight from YouTube pages. Likewise, it is free and popular, and it is a good choice for small scripts on your own laptop. In fact, the problem shows up when you move to a cloud server. Also, requests from cloud IP ranges are often blocked, and the library can break when YouTube changes its pages.

If you search for "youtube transcript api python library", this is usually what you find. In addition, it works well until you need to run it every day without babysitting it.

A managed service

Of course, a managed service handles the access problem for you. Furthermore, you call one endpoint, and the provider deals with blocks, page changes and retries. In practice, you pay per transcript, and you do not run any servers.

Besides, that is the model TranscriptAPI follows. Likewise, it is a better fit when the job has to run on a schedule, or when more than one person depends on it.

Output

YouTube transcript API: what data you get back

Overall, each transcript is a list of segments. Also, a segment holds the text and the time where that text starts. In addition, that is enough to rebuild the full text, link to an exact moment, or build subtitles.

Of course, the transcript timestamps guide explains how start and duration values work. Furthermore, the SRT, VTT and JSON formats guide compares the output formats side by side.

Subtitle files

In short, many people want a subtitle file, not JSON. Besides, the two common types are SRT and VTT. SRT puts a comma before the milliseconds, while VTT starts with the word WEBVTT and uses a period. Likewise, the W3C WebVTT specification describes the VTT format in full.

Because you get timed segments, you can write either format in a few lines of code. In fact, that is why "youtube transcript downloader" and "youtube transcript extractor" tools often end with a download button for both.

Languages and captions

Overall, language depends on the caption tracks of the video. Moreover, a video can have one track or many. When a creator adds several languages, you can ask for the one you need. When there is only one track, that is what you get.

Multilingual transcripts therefore depend on the creator. Of course, the API does not translate text. If you need another language, run the text through a translation tool after you fetch it.

Output

YouTube transcript API: Output

Of course, the one thing to know: the response is plain JSON with the same field names on every successful call. In practice, the sample below is a real response captured from the API.

Transcript
// GET /v1/youtube/transcript?video=dQw4w9WgXcQ&format=json
// real captured response · transcript list shortened to 1 of 61 segments
{
  "video_id": "dQw4w9WgXcQ",
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "author": "Rick Astley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "length_seconds": 213,
  "is_live_content": false,
  "language_code": "en",
  "language_name": "English",
  "is_generated": false,
  "available_languages": [
    {
      "language_code": "en",
      "name": "English",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "en",
      "name": "English (auto-generated)",
      "is_generated": true,
      "is_translatable": true
    },
    {
      "language_code": "de-DE",
      "name": "German (Germany)",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "ja",
      "name": "Japanese",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "pt-BR",
      "name": "Portuguese (Brazil)",
      "is_generated": false,
      "is_translatable": true
    },
    {
      "language_code": "es-419",
      "name": "Spanish (Latin America)",
      "is_generated": false,
      "is_translatable": true
    }
  ],
  "transcript": [
    {
      "text": "[♪♪♪]",
      "start": 1.36,
      "duration": 1.68
    },
    ... 60 more segments
  ],
  "cached": false
}

YouTube transcript API: more details

Overall, a failed call returns {"error": {"code", "message"}, "request_id"} and bills 0 transcripts.

Field reference

FieldTypeDescription
video_idstringID of the video on the platform.
video_urlstringCanonical link of the video.
titlestringTitle of the video.
authorstringName or handle of the account that posted it.
channel_idstringID of the channel that owns the video.
length_secondsnumberLength of the video in seconds.
is_live_contentbooleanTrue if the video is a live broadcast.
language_codestringLanguage code of the transcript. Null when the platform does not report one.
language_namestringLanguage name of the transcript. Null when not reported.
is_generatedbooleanTrue if the text was generated automatically instead of written by hand.
available_languagesarrayOther languages offered for this video. Empty when there is only one text.
transcriptarrayTimed segments, each with text, start and duration in seconds. Empty when the platform gives plain text only.
cachedbooleanTrue if the result was served from cache.

Errors

CodeHTTPMeaning
UNAUTHORIZED401Missing or invalid API key.
INVALID_INPUT400The link or ID is not valid for this platform.
NO_TRANSCRIPT404The video has no text to return.
UNAVAILABLE404The post is deleted, private or not found.
PLATFORM_UNAVAILABLE503The platform is not available right now.

Limits

Limits and edge cases to plan for

In short, every transcript API has limits, and it is better to know them before you build.

  • Private content. Of course, private videos return nothing. Public videos work.
  • No captions. Furthermore, some videos have none, especially very new uploads or videos with music only.
  • Auto-generated errors. In practice, names, numbers and technical terms are often wrong in auto captions.
  • Live streams. Besides, a stream in progress may not have a final caption track yet.
  • Removed videos. Likewise, a deleted video returns an error.

In fact, the first two are the most common. Also, in a library of 3,000 videos, Maya would expect some share to have no captions at all. Moreover, her code needs a clear plan for those cases, such as logging them and moving on.

When there are no captions

If a video has no caption track, you have two options. Of course, you can skip it, or you can run the audio through a speech tool. Furthermore, open models such as the Whisper speech recognition model turn audio into text on your own hardware. In practice, it is released under the MIT license and supports many languages, with accuracy that varies by language.

Besides, that is a different job from reading captions. TranscriptAPI does not run speech recognition, so a video with no captions has no transcript from the API. Likewise, keep that in mind when you plan your pipeline.

Pricing

What the YouTube transcript API costs

In short, cost is simple here because usage is measured in transcripts. Also, pay As You Go costs $3.00 per 1,000 transcripts. Pro costs $20 per month, Ultra costs $50 per month, and Max costs $200 per month. In addition, usage is billed proportionally and never rounded up.

Of course, the TranscriptAPI pricing table lists every plan. Furthermore, people who search for "youtube transcript api free" often want a no-cost option. In practice, you can create a free API key and test a link before you pay. Besides, for large jobs, the paid plans apply.

YouTube transcript API: Pricing questions people ask

Of course, a common search is "youtube transcript api pricing", and the honest answer depends on volume. In fact, at the pay-as-you-go rate, 1,000 transcripts cost $3.00. Also, a job with 3,000 videos would cost about $7.50 at that rate.

Moreover, compare that with the quota math for the official route. Of course, a few dozen caption downloads fit in one day, and only for videos you own. Furthermore, the two are not really alternatives, because they solve different problems.

Scale

Rate limits, retries and bulk jobs

In short, any API caps how many requests you can send in a period. Besides, this is called rate limiting, and the usual signal is an HTTP 429 status code. Likewise, developers often search for the youtube transcript api rate limit, and the number that applies to you depends on your plan.

Of course, a bulk youtube transcript api job needs a queue. Also, put the video IDs in a list, process a small batch at a time, and store each result as soon as it arrives. If a request fails, put the ID back with a retry count. After three failures, log it and move on.

Cache what you fetch

In short, transcripts of published videos rarely change. Moreover, store each result in your own database with the video ID as the key. Then a repeat request never touches the API, and you pay once per video.

Of course, check your dashboard and the pricing page for the limits that apply to your plan. Furthermore, this page does not list numbers, because they can change.

Use cases

YouTube transcript API: Practical uses

Overall, here are four ways teams use a YouTube transcript API once the text is in hand.

Search across a video library. Index the segments, and a search for a phrase can link to the exact second. Maya's tool does this for training videos.

Summaries and study notes. Feed the text to a language model and ask for key points. Besides, the timing lets you add links back to the source.

Subtitles and chapters. Likewise, turn the segments into SRT or VTT files, or group them into chapters by topic.

Research and monitoring. In fact, track what channels say about a product or a topic over time, without watching every upload.

Also, you can read more examples in the use cases section.

Workflow

Working with the transcript text

Overall, the raw text needs light cleanup before you use it. Moreover, auto-generated captions have no punctuation in many cases, so sentences run together. Joining segments with a space gives you readable text, and a punctuation model can add periods if you need them.

In fact, for a language model, split the text into chunks of a few hundred words. Furthermore, keep the start time of each chunk so you can point back to the video. Besides, for search, store each chunk with its video ID and time.

Webhooks and notifications

In short, a webhook is a message a service sends to your URL when something happens. Also, many platforms use them to announce finished jobs. Moreover, this page does not describe webhook support for TranscriptAPI, so if you need push notifications, check your dashboard and the docs. Of course, a simple loop that polls and stores results works without one.

Related

YouTube transcript API: Related searches, answered

In fact, people reach this topic with different words. Besides, here is what each common search means in practice.

Free options. Likewise, a youtube transcript api free option exists in two forms. In fact, the open-source Python package costs nothing but needs your own server, and TranscriptAPI lets you test a link on a free key. Also, a youtube transcript api python library works well for small local scripts.

Downloading and extracting. In addition, a youtube transcript downloader or a youtube transcript extractor is usually a web page for one video at a time. Moreover, an API does the same job for thousands of videos. Of course, the words youtube caption api and youtube subtitle api describe the same service from the side of the file type.

Getting text for a single video. If you only need to get youtube video transcript text once, copying it from the YouTube page is fine. Furthermore, for anything repeated, use code.

Volume, price and limits. In practice, a bulk youtube transcript api job needs a queue and a cache. Besides, the youtube transcript api pricing section above shows the per-transcript cost, and the youtube transcript api rate limit that applies to you is listed in your dashboard. Likewise, developers who read the Python library docs will also meet these limits.

Glossary

Key terms for this guide

TermWhat it means here
YouTubeThe video platform from Google where the captions live
YouTube Data API v3The official API, with caption methods that need owner rights
GoogleThe company behind YouTube and its OAuth system
Closed Captions (CC)Timed text of speech, which the API reads
SRT/VTT subtitle formatsThe two common subtitle file types
Auto-generated captionsCaptions YouTube makes from the audio
PythonA common language for calling the API
PyPI youtube-transcript-api libraryThe free open-source Python package
REST APIA web interface you call with HTTP requests
JSONThe structured format of the response
Whisper (OpenAI ASR)An open speech model for audio with no captions
Rate limitingCaps on how many requests you can send
OAuth 2.0The sign-in standard the official API uses
WebhooksMessages sent to your URL when an event happens
Multilingual transcriptsText in more than one language, when tracks exist
TimestampsStart times that tie text to a moment

Summary

Final Word

Overall, a YouTube transcript API gives your code the words of a video without the work of watching or recording it. Also, it reads existing captions, so it is fast and cheap, and it fails only where captions are missing.

In fact, your next step is small. Create a free TranscriptAPI key, send one video link, and check the JSON. If the output fits your project, add a queue and a cache and scale up from there. Moreover, compare plans on the pricing page when you are ready, and see the full list of transcript API pages for other platforms.

FAQ

Frequently asked questions

Does the YouTube transcript API need OAuth?
TranscriptAPI uses an API key from your dashboard. You do not connect a Google account. The official YouTube Data API v3 does use OAuth 2.0, and it limits caption downloads to people who can edit the video.
Does it work for any YouTube video?
It works for public videos that have captions. It does not work for private videos or for videos with no caption track. The API does not turn audio into text.
Is there a free way to get a transcript?
You can create a free API key and test a link before you pay. Free open-source tools also exist, but they often get blocked when you run them on cloud servers.
Can I use it in Python?
Yes. Any language that sends HTTP requests works. In Python, the requests library sends the call, and .json() reads the answer. Your dashboard lists the exact endpoint.
How is it billed?
Usage is measured in transcripts. Pay As You Go costs $3.00 per 1,000 transcripts, Pro costs $20 per month, Ultra costs $50 per month, and Max costs $200 per month. Usage is billed proportionally and never rounded up.
Can I get SRT or VTT files?
The response gives timed text segments, so you can write SRT or VTT in your own code. The formats guide on this site shows how the two differ.
What happens when I hit a rate limit?
You get an HTTP 429 response. Wait, then retry with a longer pause. For bulk work, use a queue and cache each result so you never fetch the same video twice.

Ship transcription today, not next quarter.

Of course, no waitlist, no sales call required to start. Furthermore, get a key, make your first call, see structured JSON back in seconds.

Get your free API key →
Last updated: 17 November 2026