You want every transcript from one YouTube channel, maybe to build a search index over a creator's back catalog, maybe to feed an LLM. You open the popular Python library, and it asks for a video id, while what you have is a channel.
Why bulk YouTube transcripts are hard to get
The youtube-transcript-api library fetches the transcript for one video id at a time. To cover a channel you first need the list of video ids, and there are two usual ways to get it. You can use the YouTube Data API, which needs a Google Cloud project, an API key and a quota. Or you can run yt-dlp against the channel page and parse its output.
Then you loop over the ids. If that loop runs on a cloud server, YouTube often blocks the requests. I wrote about the RequestBlocked error and the proxy fix in an earlier post, so I will not repeat it here.
I built an Apify actor, YouTube Transcript API, that takes the channel itself. It lists the videos, fetches each caption track through a residential proxy and returns one JSON record per video. The examples below use requests and read your Apify token from the APIFY_TOKEN environment variable.
Download all transcripts from a YouTube channel in one call
The endpoint run-sync-get-dataset-items starts a run, waits for it and returns the records in the response body. These are the inputs that matter for a channel:
-
sourcestakes channels,@handles, playlists and single videos in one list. -
maxVideosPerSourcecaps how many videos come from each channel or playlist. The default is 20. -
publishedAfterkeeps only videos published after a date, written asYYYY-MM-DD. -
formatstakes any oftext,segments,srtandvtt. -
languagepicks the caption language. Human made captions win over auto generated ones.
I pointed it at @Fireship with publishedAfter set to 2026-11-01 and asked for five videos. The call returned five records in about 21 seconds. Each record has title, publishDate, url, durationSeconds, views, language, autoGenerated, transcript, wordCount and more, plus an srt field because I asked for that format. The transcripts ran from 939 to 1,311 words.
Save one Markdown file per video
One file per video is the easiest shape for an LLM context window or a retrieval index, because the title, date and URL travel with the text. This script makes the call and writes the files:
import os, re, pathlib, requests
API = "https://api.apify.com/v2/acts/talcoe~youtube-transcripts/run-sync-get-dataset-items"
headers = {"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"}
body = {
"sources": ["@Fireship"],
"maxVideosPerSource": 5,
"publishedAfter": "2026-11-01",
"formats": ["text", "srt"],
"language": "en",
}
resp = requests.post(API, headers=headers, json=body, timeout=300)
resp.raise_for_status()
items = resp.json()
out = pathlib.Path("fireship")
out.mkdir(exist_ok=True)
for v in items:
slug = re.sub(r"[^a-z0-9]+", "-", v["title"].lower()).strip("-")[:60]
page = f"# {v['title']}\n\nDate: {v['publishDate']}\nURL: {v['url']}\nWords: {v['wordCount']}\n\n{v['transcript']}\n"
(out / f"{v['publishDate']}-{slug}.md").write_text(page, encoding="utf-8")
print(v["publishDate"], v["videoId"], v["wordCount"], v["title"])
It prints one line per video and creates a fireship folder. Each file starts with the video title as a heading, then date, URL and word count lines, then the transcript text.
The transcript is one block of text, so chunk it by paragraph or by token count before you embed it. If you need quotes with timestamps, add segments to formats. Each segment carries start and duration in seconds, so you can link to the moment a line was said.
Export SRT subtitles
The same response already holds the subtitles, because the request included srt. Add this loop to the end of the script above, in the same file, since it reuses items and out:
for v in items:
(out / f"{v['videoId']}.srt").write_text(v["srt"], encoding="utf-8")
Each .srt file opens in any subtitle editor or video player. Use vtt in formats and the vtt field if you need WebVTT for a web player.
Preview a channel with listOnly before you pay
Setting listOnly to true returns the video list with no transcripts: id, title, channel, date and duration. It is a quick way to check you have the right channel and the right date range.
import os, requests
API = "https://api.apify.com/v2/acts/talcoe~youtube-transcripts/run-sync-get-dataset-items"
headers = {"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"}
body = {"sources": ["@Fireship"], "maxVideosPerSource": 10, "listOnly": True}
resp = requests.post(API, headers=headers, json=body, timeout=300)
resp.raise_for_status()
videos = resp.json()
for v in videos:
print(v["publishDate"], v["durationSeconds"], v["videoId"], v["title"])
print(len(videos), "videos listed")
Run against @Fireship, it printed ten videos from 2026-11-03 to 2026-11-25, each about 4 to 6.5 minutes long. One thing to know before you point it at a big channel: each listed video is one billed record, the same price as a transcript. A preview of 200 videos costs about as much as the transcripts themselves. Keep maxVideosPerSource small for a preview, or set maxResults as a hard stop.
Videos without captions are skipped and cost nothing
Some videos have no captions in your language. The actor does not return a record for them and does not charge for them. By default fallbackToAnyLanguage is on, so a video without English returns its first available track and the language field tells you which. Turn it off if you only want your language.
To see which videos were skipped you need the run's key value store, and the synchronous endpoint does not give you that. Use the async endpoint with waitForFinish, then read the NO_TRANSCRIPT record:
import os, requests
BASE = "https://api.apify.com/v2"
headers = {"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"}
body = {
"sources": ["Jatwf_XOncE", "NFvDHYMzj9U"],
"language": "en",
"fallbackToAnyLanguage": False,
"formats": ["text"],
}
run = requests.post(
f"{BASE}/acts/talcoe~youtube-transcripts/runs",
params={"waitForFinish": 120},
headers=headers,
json=body,
timeout=180,
).json()["data"]
print("run status:", run["status"])
rows = requests.get(f"{BASE}/datasets/{run['defaultDatasetId']}/items", headers=headers).json()
print("transcripts returned:", [r["videoId"] for r in rows])
store = run["defaultKeyValueStoreId"]
resp = requests.get(f"{BASE}/key-value-stores/{store}/records/NO_TRANSCRIPT", headers=headers)
for row in resp.json():
print("skipped:", row["videoId"], row["reason"])
I ran it with one Fireship video and one music video that only has Spanish captions. It printed this:
run status: SUCCEEDED
transcripts returned: ['Jatwf_XOncE']
skipped: NFvDHYMzj9U LANGUAGE_NOT_AVAILABLE: no captions in "en". Available: es
A video that fails for another reason, such as private, removed or blocked by a bot check, is also free. Those go to an ERRORS record in the same store. If your channel is large, read both records after each run so you know what is missing from the dataset.
What a 200 video channel costs
Pricing is pay per result. A run costs a $0.005 start fee, then $0.005 per transcript on the Free and Bronze plans, $0.0045 on Silver and $0.004 on Gold, Platinum and Diamond. For a channel with 200 captioned videos:
| Plan | Per transcript | 200 videos plus start fee |
|---|---|---|
| Free and Bronze | $0.005 | $1.005 |
| Silver | $0.0045 | $0.905 |
| Gold and above | $0.004 | $0.805 |
Videos with no captions drop out of the count, so a channel that has 20 videos without captions costs less than the table says. Set maxResults on the first run to cap the bill, and use a new run with publishedAfter to pick up only new uploads later.
Use it from Claude or Cursor
If you would rather ask an AI agent than write the script, the actor is also available through the Apify MCP server. Add this address to Claude, Cursor or any other MCP client:
https://mcp.apify.com/?tools=talcoe/youtube-transcripts
Send your Apify token as an Authorization: Bearer header. Then ask for the transcripts of a channel in plain words, and the agent fills in the same inputs shown above.
I built this actor, and AI helped me write this post.
Top comments (0)