Alfalfa

YouTube transcript scraper and API: subtitles as text, SRT or WebVTT without an API key

YouTube shows the transcript of almost every public video to anyone who clicks "Show transcript", but the Data API hands captions only to the video's owner, and the open-source libraries that read the web page break every few months and get blocked after a few dozen requests from one address. This page shows how to get transcripts in bulk as data: what a row contains, which sources work, how languages and subtitle files are handled, where the limits are, and what it costs.

Updated October 2026. Fields, speeds and sizes measured on live runs.

Three ways to get a YouTube transcript

YouTube Data API v3Open-source library on your machineTranscript scraper
SetupGoogle Cloud project, API key, OAuthPython or Node, your own proxiesa URL or a keyword
Other people's videosno: captions.download needs the owner's OAuthyes, until the page format changesyes
Volumen/aa few dozen videos per IP before YouTube asks for a sign-inthousands per run, proxies included
Outputn/asegments; SRT needs your own formattertimed segments, plain text, SRT, WebVTT, plus video details
Channels, playlists, searcheslist only, no captionsone video at a timeyes, one run
Best foryour own channel's captionsa handful of videos, a developer at the keyboarddatasets, AI pipelines, research, subtitle workflows

What one transcript row contains

The YouTube Transcript Scraper on Apify returns one row per video:

Segment times are seconds from the start, so a quote can be linked straight to its moment with youtube.com/watch?v=ID&t=16s.

From a video, a channel, a playlist or a search

A cap per source stops a channel or a search at the number of videos you want. A search page holds about 20 videos and rarely goes past 500-600 results; channels and playlists page through their whole history.

A checked example, with sizes and speed

On 24 October 2026 a run over the TED channel with a cap of 30 videos returned 30 rows in 15 seconds: 29 transcripts and one video marked no captions. A 20-minute talk came back as 391 timed segments and 16,923 characters of text; as an SRT file it is 30,500 characters. A 6-hour programming course gave 4,530 segments and 263,320 characters in one row. The 29 transcripts cost $0.0026 at the listed price. Counts change as channels upload; this is a snapshot, not a promise for every query.

For comparison, the transcript Actors with the most users on the Store list $2.75 to $10 per 1,000 videos and several add a fee per run; the general YouTube Scraper by the same author charges $0.50 per video row plus $0.30 per transcript when you also want likes, comments or channel records. Competitor prices are taken from their public pages on that date.

Calling it from code

curl -X POST "https://api.apify.com/v2/acts/alfalfa~youtube-transcript-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"startUrls":[{"url":"https://www.youtube.com/watch?v=iCvmsMzlF7o"}],"transcriptFormat":"srt"}'

The call returns the rows directly for runs up to five minutes; longer jobs start the run, poll it and read the dataset. Schedules, webhooks and the n8n, Make and Zapier nodes work as for any Apify Actor, and an AI agent can use it as an MCP tool. The API overview shows the pattern.

Things to know before you rely on it

Uses that pay for themselves

Questions people ask

Is this allowed?

The scraper reads public pages without logging in and stores nothing but the results in your dataset. Respect YouTube's terms and the copyright of the videos when you reuse the text.

Why is it this cheap?

A transcript is a few kilobytes and the scraper runs in a few megabytes of memory, so the platform cost per thousand videos is cents. The price covers it with a margin and nothing else.

Can I get only the text?

Yes: transcriptText holds the whole transcript as one string, one cell per video in a CSV export.

Does it work for Shorts?

Yes, when the Short has captions; a Short of one second returns one segment.

Open the YouTube Transcript Scraper Read: the YouTube scraper guide