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.
Three ways to get a YouTube transcript
| YouTube Data API v3 | Open-source library on your machine | Transcript scraper | |
|---|---|---|---|
| Setup | Google Cloud project, API key, OAuth | Python or Node, your own proxies | a URL or a keyword |
| Other people's videos | no: captions.download needs the owner's OAuth | yes, until the page format changes | yes |
| Volume | n/a | a few dozen videos per IP before YouTube asks for a sign-in | thousands per run, proxies included |
| Output | n/a | segments; SRT needs your own formatter | timed segments, plain text, SRT, WebVTT, plus video details |
| Channels, playlists, searches | list only, no captions | one video at a time | yes, one run |
| Best for | your own channel's captions | a handful of videos, a developer at the keyboard | datasets, AI pipelines, research, subtitle workflows |
What one transcript row contains
The YouTube Transcript Scraper on Apify returns one row per video:
- Transcript:
transcriptas timed segments{start, duration, text}in seconds,transcriptTextas one string,transcriptLanguagesuch asen Englishoren English (auto-generated). - Subtitle file (option):
transcriptSrtortranscriptVtt, the complete file with numbered cues, ready to save as<video id>.srtor.vtt. - Status:
transcriptStatusisok, orno captionswhen the video has no subtitles at all; such rows are saved and not charged. - Video:
id,url,title,channelName,channelId,durationSeconds,viewCount,likeCount,publishedAt,category,description,keywords, so the text never loses its context.
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
- Video URLs:
youtube.com/watch?v=…,youtu.be/…,/shorts/…,/live/…. One row each. - Channel URLs:
youtube.com/@handleor/channel/UC…, with/videos,/shortsor/streams; newest first, most viewed first or oldest first. - Playlist URLs, including a channel's uploads playlist.
- Search queries with a date window (last hour to this year) and an order (relevance, date, views, rating).
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
- Captions must exist. Uploader captions or YouTube's automatic ones; a video without any caption track returns
no captionsand costs nothing. Live streams have none while live. - Auto-generated captions are YouTube's own. No punctuation, occasional misheard words, overlapping timing. In the SRT and WebVTT files each cue ends where the next one starts.
- Language fallback. Manual captions in the requested language, then auto-generated ones in it, then a manual track in any language, then the first track. The row says which one was used. Translated tracks are not requested.
- Age-restricted and private videos have no readable transcript without a login; they are reported and not charged.
- Long videos make big rows. A 20-hour stream is about 1 MB of text; the segments and the plain text always fit, the SRT or WebVTT copy is dropped only when a row would exceed the dataset limit, and the log says so.
Uses that pay for themselves
- Knowledge bases and RAG. A channel's or a topic's transcripts as plain text, chunked by the timed segments, in one JSON.
- Summaries and notes. Lectures, talks, earnings calls, podcasts and interviews turned into text you can summarize, quote and search.
- Subtitle files. SRT or WebVTT of your own or licensed videos for an editor, a player or a translation workflow.
- Content and SEO. Blog posts, newsletters and social snippets written from what a video says, with exact timestamps for quotes.
- Research and monitoring. Everything a channel said about a product, a company or a claim, with dates and view counts next to the text.
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