Skip to main content

Developer Guide · YouTube APIs

Last updated: June 12, 2026

YouTube Transcript API: Every Way to Get Video Transcripts in 2026

You want video transcripts as data — for an LLM pipeline, a RAG index, a summarizer, or script research. Here's the honest map of what actually works: the official Captions API, the unofficial youtube-transcript-api Python library, and a commercial REST endpoint — with code, limitations, and a comparison table.

Quick answer

YouTube has no official public API for fetching transcripts of arbitrary videos — the official Captions API in Data API v3 requires OAuth and only works on videos you own. The three working options in 2026 are the unofficial youtube-transcript-api Python library (free, but cloud-server IPs get blocked), scraping YouTube's internal timedtext endpoints, or a commercial endpoint like the OutlierKit API's GET /videos/:videoId/transcript, which returns timed segments and full text for any public video for 1 credit per call and caches results permanently.

Facts at a glance: YouTube transcript APIs in 2026
Official transcript APINone for arbitrary videos
Captions API (Data API v3)OAuth required, own videos only (captions.download = 200 quota units)
youtube-transcript-apiFree Python library, unofficial, cloud IPs blocked
OutlierKit endpointGET /api/v1/videos/:videoId/transcript
OutlierKit cost1 credit per call, cached after first fetch
OutputTimed segments + fullText

Need transcripts in production?

Skip proxy management entirely — the OutlierKit transcript endpoint returns timed segments and full text for any public video over the same bearer token you use for outlier search and keyword data.

The short answer

There is no official public YouTube API for transcripts of arbitrary videos

The official YouTube Data API v3 has a Captions resource (captions.list / captions.download), but downloading a track requires OAuth consent from the video's owner — it only works on videos you control. For everyone searching "youtube transcript api" hoping to fetch any video's subtitles by ID, the official API is a dead end. Your three real options:

  1. aThe open-source youtube-transcript-api Python library (unofficial; free; fragile from cloud IPs)
  2. bScraping or unofficial endpoints yourself (same fragility, more maintenance)
  3. cA commercial transcript API like OutlierKit's GET /videos/:videoId/transcript endpoint — bearer token, works on any public video with captions, no proxy management

The rest of this guide walks through each option honestly — including when the free library is the right call.

Option 1

Does YouTube have an official transcript API?

The Data API v3's Captions resource is built for creators managing caption tracks on their own channels: list the tracks on a video, download one in SRT/SBV/VTT format, upload new tracks, update or delete existing ones. It is well-documented and stable — and almost never what people searching for a "YouTube subtitles API" actually need.

What it can do

  • List caption tracks on a video (captions.list, 50 quota units)
  • Download a track as SRT/SBV/VTT (captions.download, 200 quota units)
  • Insert, update, and delete caption tracks on your videos

Why it doesn't solve the common use case

  • captions.download requires an OAuth token from the video's owner — third-party videos fail with a permissions error
  • No API-key-only access — you must run the full OAuth 2.0 flow
  • At 200 units per download, your daily 10,000-unit quota caps you at ~50 downloads — even on your own library

Use it when: you're building tooling for a channel you own or manage — bulk-exporting your own captions, syncing translations, or programmatically uploading corrected tracks. For everything else, keep reading. (For quota mechanics, see our YouTube API quota guide.)

Option 2

How does youtube-transcript-api work in Python?

youtube-transcript-api (GitHub) is the de facto answer to "how do I get a YouTube transcript in Python." It pulls transcripts — including auto-generated captions — from YouTube's internal timedtext data, the same source the transcript panel on youtube.com reads from. No API key, no OAuth, no headless browser.

How to use youtube-transcript-api

Install from PyPI, then fetch a transcript with the v1.x instance-based API:

pip install youtube-transcript-api
from youtube_transcript_api import YouTubeTranscriptApi

ytt_api = YouTubeTranscriptApi()

# The videoId is the part after "v=" in a YouTube URL
fetched = ytt_api.fetch("_AbFXuGDRTs")

for snippet in fetched:
    print(f"[{snippet.start:.1f}s] {snippet.text}")

# Or flatten to plain text for an LLM prompt:
full_text = " ".join(snippet.text for snippet in fetched)

Listing available languages and translating a transcript both work through the same instance:

# See which transcript languages exist on the video
transcript_list = ytt_api.list("_AbFXuGDRTs")
for transcript in transcript_list:
    print(transcript.language_code, transcript.is_generated)

# Fetch a specific language (falls through the list in order)
fetched_de = ytt_api.fetch("_AbFXuGDRTs", languages=["de", "en"])

# Translate a translatable track using YouTube's own translation
transcript = transcript_list.find_transcript(["en"])
translated = transcript.translate("es").fetch()

The limitations — read these before you build on it

Why does youtube-transcript-api get blocked on cloud servers?

The cloud-IP block is the limitation that bites everyone. Your youtube-transcript-api script works on your laptop, then throws RequestBlocked or IpBlocked the moment you deploy it to AWS, GCP, Azure, or any VPS. YouTube blocks known cloud IP ranges aggressively. The library's own docs recommend rotating residential proxies for production — an extra paid service, extra config, and extra failure mode.

It's unofficial, with no SLA

The library reverse-engineers YouTube's internal timedtext data. When YouTube changes its internals — which happens — fetches break until the maintainers ship a fix. There's no contract, no support channel, no guarantee. Fine for research scripts; risky as the foundation of a product or client deliverable.

Disabled captions mean errors, not transcripts

If the uploader disabled captions, the library raises a TranscriptsDisabled error. No method on this page can manufacture a transcript that doesn't exist — handle the error path in any batch pipeline.

Use it when: you're prototyping locally, doing one-off research, or running small volumes from a residential connection. It's a genuinely good library — the problems start at production scale.

Option 3

OutlierKit's transcript endpoint — REST, by videoId, no OAuth

The OutlierKit API is a YouTube competitive-intelligence API that returns outlier scores, semantic channel search and similarity, video transcripts, comments, and keyword search volumes as structured JSON — one bearer-token key, 1 credit per call, on OutlierKit Pro ($49/month) and Max ($199/month) plans.

OutlierKit's API includes a dedicated transcript endpoint: GET /api/v1/videos/:videoId/transcript. Pass any public video's ID, authenticate with a bearer token, get timed segments and full text back as JSON. No OAuth flow, no proxy management, no scraper to babysit.

curl -X GET 'https://outlierkit.com/api/v1/videos/_AbFXuGDRTs/transcript' \
  -H 'Authorization: Bearer <your_api_key>'

The response data gives you everything a downstream pipeline needs — segment timing for chaptering and clip work, full text for LLM prompts:

{
  "videoId": "_AbFXuGDRTs",
  "segments": [
    {
      "startMs": 0,
      "endMs": 4120,
      "startTime": "0:00",
      "text": "In this video we're going to look at..."
    }
    // ...one entry per timed segment
  ],
  "fullText": "In this video we're going to look at...",
  "totalDurationMs": 1834000,
  "source": "db-fresh"   // "db-fresh" (cached) | "live" (first fetch)
}

Cached on first fetch

Transcripts don't change once a video is published, so OutlierKit caches each one on first fetch. Repeat reads are fast, and the source field tells you whether you hit cache (db-fresh) or triggered a live fetch.

1 credit per call, flat

Like every OutlierKit endpoint. Credits are shared with the web app — Pro ($49/mo) includes 500/month, Max ($199/mo) includes 2,000/month, top-ups at $10 per 100.

Flexible video IDs

The :videoId parameter accepts either OutlierKit internal IDs or raw YouTube videoIds — pipe IDs straight from YouTube URLs or from other OutlierKit endpoints without conversion.

Part of a bigger toolkit

The same key unlocks outlier video search, channel similarity, live comments, and keyword research — so the videos you transcribe can come from data, not guesses. See the full API overview.

Exact request parameters, error envelopes, and rate limits live in the canonical docs at outlierkit.com/app/api-docs.

For Pro and Max users

Pull any public video's transcript with one GET request

GET /videos/:videoId/transcript returns timed segments, full text, and total duration — bearer-token auth, 1 credit per call, cached on first fetch. No OAuth dance, no rotating proxies, no scraper maintenance. The same key also unlocks outlier search, comments, and keyword research.

Side by Side

Captions API vs. youtube-transcript-api vs. OutlierKit

The official Captions API, the youtube-transcript-api Python library, and the OutlierKit transcript endpoint solve different problems — the table below compares auth, coverage, reliability, cost, and output shape.

Official Captions APIyoutube-transcript-apiOutlierKit transcript endpoint
Auth requiredOAuth 2.0 (video owner's consent)NoneBearer token (API key)
Works on any public video?No — only videos you ownYes (when captions exist)Yes (when captions exist)
Reliability in productionHigh, but wrong use caseLow from cloud IPs — needs rotating residential proxiesHigh — managed infrastructure, no proxies
CostQuota units: list = 50, download = 200Free (plus proxy costs in production)1 credit per call (from $49/mo Pro plan)
Output shapeRaw caption file (SRT/SBV/VTT)Snippets: text, start, durationsegments (startMs, endMs, startTime, text) + fullText + totalDurationMs
CachingNone (you manage it)None (you manage it)Cached on first fetch — repeat reads are fast

Honest summary: the Captions API for your own channels, the Python library for local prototypes, a commercial endpoint when transcript access has to actually stay up.

What Builders Do With Transcripts

Four pipelines that start with a transcript call

YouTube transcript data feeds four common build patterns — LLM summarization, RAG indexes, script research, and content repurposing.

LLM summarization

Pull fullText, feed it to Claude or GPT, get summaries, key takeaways, or structured notes. The cached endpoint means re-running prompts against the same video never re-fetches from YouTube. Our Claude + YouTube competitive analysis guide has ready-made prompt templates.

RAG indexes over a niche

Chunk the segments array by timestamp, embed, and index. Because segments carry startMs/endMs, retrieval results can deep-link straight to the moment in the video.

Script research from outlier videos

The combo move: hit POST /outliers/search to find videos massively outperforming their channel baseline in your niche, then pull transcripts of the winners. You end up studying the scripts of proven videos, not random ones.

Repurposing to blogs and Shorts

Transcript in, blog post or Shorts script out — timestamps make clip selection trivial. Wire it into a scheduled pipeline with our n8n YouTube automation workflows.

How do you get a transcript without any API?

Getting a YouTube transcript for a one-off video needs no code at all. On any YouTube video: open the description, click "...more" → "Show transcript" (or the three-dot menu under the player on some layouts). The transcript panel opens with timestamped lines — select all, copy, paste. You can toggle timestamps off in the panel's own menu if you just want clean text.

This is genuinely the right tool for grabbing one video's transcript to paste into ChatGPT or Claude. It stops being viable the moment you need ten videos, a schedule, or structured data — which is when you reach for one of the three options above.

Need transcripts plus the intelligence layer around them?

OutlierKit pairs the transcript endpoint with outlier detection, channel similarity, comments, and keyword research — so you transcribe the videos that are actually winning.

See OutlierKit pricing

Frequently Asked Questions

Everything developers ask about getting YouTube transcripts programmatically.

Does YouTube have an official transcript API?+

No — YouTube has no official transcript API for arbitrary videos. The YouTube Data API v3 includes a Captions resource (captions.list and captions.download), but downloading a caption track requires OAuth authorization from the video's owner. There is no official, public API endpoint that returns the transcript of any video by videoId. That gap is why the unofficial youtube-transcript-api Python library and commercial transcript APIs exist.

Is youtube-transcript-api an official Google library?+

No. youtube-transcript-api is an open-source Python library that fetches transcripts from YouTube's internal timedtext data — the same data the transcript panel on youtube.com uses. It does not use the official Data API, requires no API key, and is not supported or endorsed by Google. It can break whenever YouTube changes its internals.

Why does youtube-transcript-api get blocked on AWS and other cloud servers?+

YouTube aggressively rate-limits and blocks requests from known cloud-provider IP ranges (AWS, GCP, Azure, most VPS hosts). Scripts that work fine on your laptop start throwing RequestBlocked or IpBlocked errors almost immediately once deployed to a server. The library's own documentation recommends rotating residential proxies for production use, which adds cost and an extra service to maintain.

Can the official Captions API download subtitles for any video?+

No. captions.download requires an OAuth token authorized by the channel that owns the video. You can list and download caption tracks for videos on channels you control, but for third-party videos the request fails with a permissions error. The official API solves the creator-managing-their-own-captions use case, not the developer-fetching-any-transcript use case.

How do I get a YouTube transcript in Python?+

The quickest free route is pip install youtube-transcript-api, then instantiate YouTubeTranscriptApi and call fetch(video_id) — it returns timed snippets with text, start, and duration. For production pipelines, calling a REST endpoint like OutlierKit's GET /api/v1/videos/:videoId/transcript with the requests library is more reliable: no proxies, no OAuth, cached responses.

Are auto-generated captions available through these methods?+

Yes. Both youtube-transcript-api and OutlierKit's transcript endpoint return auto-generated captions when no manually-created track exists, which covers the large majority of YouTube videos. Videos where the uploader has disabled captions entirely return an error — no method can produce a transcript that doesn't exist.

What languages are supported?+

YouTube transcript methods return whatever caption tracks exist on the video. Most videos have at least an auto-generated track in the spoken language. youtube-transcript-api can list available transcript languages for a video and translate any translatable track into another language using YouTube's own translation feature.

Is it legal to fetch YouTube transcripts programmatically?+

Fetching publicly displayed caption data for analysis and research is widely done, but unofficial scraping sits in a gray area relative to YouTube's Terms of Service, which restrict automated access outside official APIs. This page is not legal advice — for commercial products, review YouTube's ToS and your own counsel. Using a commercial API shifts the data-access infrastructure to the provider, but you should still use transcript data responsibly (summarization, research, search) rather than republishing content wholesale.

How do OutlierKit transcript pricing and caching work?+

Each call to OutlierKit's GET /api/v1/videos/:videoId/transcript costs 1 credit, like every OutlierKit endpoint. The transcript is cached on first fetch — transcripts don't change once a video is published — so repeat reads are fast and the response includes a source field telling you whether it came from cache (db-fresh) or a live fetch. Credits are shared with the web app: Pro is $49/mo with 500 credits, Max is $199/mo with 2,000 credits, and top-ups are $10 per 100.

Can I get timestamps, not just plain text?+

Yes. youtube-transcript-api returns a start and duration per snippet. OutlierKit's endpoint returns both: a segments array with startMs, endMs, startTime, and text per segment, plus a fullText string and totalDurationMs — so you can do timestamped chaptering, clip detection, and RAG chunking without re-deriving timing yourself.

Ship your transcript pipeline today

One bearer token, one GET request per video, cached responses. Read the docs, grab a key from the dashboard, and make your first call in five minutes.

Written by

Aditi

Aditi

Founder OutlierKit and UTubeKit

AI-Verified

Don’t take our word for it.
Ask AI.

Ask any leading AI what OutlierKit does for YouTube creators.