How to Download YouTube Transcripts in Bulk (Whole Channels, SRT/VTT) for AI, RAG and Content Repurposing
YouTube may be the largest knowledge base on the internet: lectures, tutorials, podcasts, product reviews and conference talks. If you want to feed that knowledge into ChatGPT, Claude, a vector database or a blog post, y
YouTube may be the largest knowledge base on the internet: lectures, tutorials, podcasts, product reviews and conference talks. If you want to feed that knowledge into ChatGPT, Claude, a vector database or a blog post, you first need the transcripts. Copying them one video at a time from the "Show transcript" panel doesn't scale.
This guide shows how to extract transcripts for single videos, Shorts, whole playlists or entire channels in one run. You get plain text, timestamped segments and ready-made SRT/VTT subtitle files, with no YouTube API key and no login.
What you get per video
{
"videoId": "jNQXAC9IVRw",
"title": "Me at the zoo",
"channel": "jawed",
"language": "en",
"isAutoGenerated": false,
"wordCount": 38,
"text": "All right, so here we are in front of the elephants...",
"segments": [{ "start": 1.2, "duration": 2.16, "text": "All right, so here we are," }],
"srt": "1\n00:00:01,200 --> 00:00:03,360\nAll right, so here we are,\n...",
"durationSeconds": 19
}
-
text: the full transcript in one string, ready to paste into an LLM. -
segments: timestamped chunks, great for "jump to minute 12:34" citations in a RAG app. -
srt/vtt: subtitle files for editors and translators. -
isAutoGenerated: human captions are preferred when both exist, and this flag tells you which kind you got. -
availableLanguages: every caption language the video offers.
Step 1: Collect your sources
You can mix URL types in one run:
- A single video:
https://www.youtube.com/watch?v=... - A Short:
https://www.youtube.com/shorts/... - A playlist:
https://www.youtube.com/playlist?list=... - A whole channel:
https://www.youtube.com/@TED. Set "max videos per source" to choose how many of the latest videos to take.
Step 2: Run the extractor
Open YouTube Transcript Scraper on Apify and use an input like:
{
"startUrls": [
"https://www.youtube.com/@TED",
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
],
"maxVideosPerSource": 20,
"language": "en",
"includeSegments": true,
"includeSrt": true
}
Click Start. Videos without captions are reported as error rows and not charged, and one bad video never breaks the run.
Step 3: Use the transcripts
A) Summaries and notes with an LLM
Export the dataset as JSON, then for each row send text to your model with a prompt like:
Summarize this talk in 7 bullet points, then list every tool or book mentioned.
B) A RAG chatbot over a channel
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("karioski/youtube-transcript-scraper").call(run_input={
"startUrls": ["https://www.youtube.com/@lexfridman"],
"maxVideosPerSource": 50,
"includeSegments": True,
})
docs = []
for v in client.dataset(run["defaultDatasetId"]).iterate_items():
if "error" in v:
continue
# one chunk per ~60 seconds, keeping the timestamp for citations
chunk, start = [], None
for s in v["segments"]:
start = s["start"] if start is None else start
chunk.append(s["text"])
if s["start"] - start > 60:
docs.append({"text": " ".join(chunk), "url": f'{v["url"]}&t={int(start)}s', "title": v["title"]})
chunk, start = [], None
if chunk:
docs.append({"text": " ".join(chunk), "url": f'{v["url"]}&t={int(start or 0)}s', "title": v["title"]})
# -> embed `docs` into your vector DB (Pinecone, Qdrant, pgvector...)
Every answer can now link to the exact minute of the source video.
C) Content repurposing
Turn each transcript into a blog post, a newsletter issue or a thread. This is ideal for creators who want text versions of their own videos for SEO.
D) Subtitles and translation
Download the srt field into .srt files for your video editor, or translate them. The tool can also try YouTube's own auto-translation into another language.
Pricing
Pay-per-event: $4 per 1,000 transcripts on paid Apify plans, with nothing charged for videos without captions. Example: the latest 500 videos of a channel cost about $2. You can set a maximum cost per run.
FAQ
Which videos have transcripts? Any video where YouTube shows captions, either uploaded by the creator or auto-generated. The availableLanguages field shows what exists.
Do I need a YouTube API key? No.
Can AI agents call it? Yes. Add it through the Apify MCP server, and Claude or Cursor can "get the transcript of this video" as a tool call.
Try it: YouTube Transcript Scraper on Apify โ
Disclosure: I built this tool. Questions or feature requests are welcome on the Actor page.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.