Claude · ChatGPT · Tutorial
How to Put a Whole YouTube Channel Into a Claude Project or ChatGPT Project
We exported 20 videos of a small channel as Markdown, built the upload files and counted the tokens. How many videos fit in a Claude Project, how to split the files, and when to use a connector instead.
· 9 min read · YTAPI
Export each video's transcript as Markdown, join them into a few files, and upload the files to the project's knowledge. The limit that matters is not file size but tokens. We exported 20 videos from a small channel (23 hours 46 minutes of speech) and they came to about 243,000 tokens, roughly 10,200 tokens per hour of video. On Anthropic's published numbers that is more than Claude's default 200K context window, so a project this size would likely rely on Claude's retrieval mode. Past a few dozen videos, a connector that fetches videos on demand fits better than a project.
We make YTAPI, a transcript API, and used it for the export. We did not drive the Claude or ChatGPT interface for this post. Everything about the products comes from their documentation, read on November 15, 2026. What we ran ourselves is the export and the counting.
What we ran
On November 15, 2026 we picked a small public channel, the Lovettsville Historical Society & Museum (about 1,070 subscribers and 62 videos at the time), because a small channel is the realistic case for a project and its videos are unlikely to be cached anywhere. We took its 20 newest videos: talks and public readings between 47 minutes and 2 hours long.
- Listing the 20 videos: 1 credit for one page of the channel's video list.
- Exporting each video as Markdown: 20 requests, 20 credits, all 20 returned 200. Sequentially, one at a time, they took 38 seconds in total (1.5 to 2.7 seconds each).
- Output: 1.1 MB of text, 206,931 words, 243,373 tokens. The shortest transcript was 7,980 tokens and the longest 19,848.
We counted tokens with OpenAI's o200k_base tokenizer (the tiktoken library). That is not Claude's tokenizer, and we have no way to run Claude's from here, so treat the Claude figures as close estimates. The project page in Claude shows its own usage meter; trust that over our number.
The script
This is the script we ran. It lists the newest videos of a channel, exports each as Markdown, puts the video's title and link at the top of each file, and writes both one file per video and combined files of several videos.
"""Export the newest N videos of a channel as Markdown and build upload files."""
import json
import os
import re
import sys
import urllib.error
import urllib.request
from pathlib import Path
API = "https://api.ytapi.dev"
HEADERS = {
"Authorization": f"Bearer {os.environ['YTAPI_KEY']}",
"Content-Type": "application/json",
# Python's default User-Agent can be rejected at the edge, so set your own.
"User-Agent": os.environ.get("UA", "channel-export/1.0"),
}
CHANNEL = sys.argv[1] # @handle or UC... id
COUNT = int(sys.argv[2]) # how many newest videos
PER_FILE = int(sys.argv[3]) # videos per upload file
OUT = Path(sys.argv[4]) # empty output directory
def call(path, body=None):
data = json.dumps(body).encode() if body else None
req = urllib.request.Request(API + path, data=data, headers=HEADERS)
with urllib.request.urlopen(req, timeout=90) as res:
return res.read().decode()
def seconds(text):
parts = [int(p) for p in text.split(":")]
return sum(p * 60 ** i for i, p in enumerate(reversed(parts)))
listing = json.loads(call(f"/v1/channels/{CHANNEL}/videos?sort_by=newest"))
videos = listing["videos"][:COUNT]
docs = []
for v in videos:
try:
body = {"video_id": v["video_id"], "format": "markdown", "languages": ["en", "*"]}
md = call("/v1/transcripts", body)
except urllib.error.HTTPError as err:
print(f"skip {v['video_id']}: HTTP {err.code}") # no captions: free
continue
# The API's Markdown starts with "# Transcript: <id>". Replace it with
# the title and link, so the chat can name and cite the video.
md = md.split("\n", 1)[1].lstrip()
head = (f"# {v['title']}\n\nSource: https://www.youtube.com/watch?v={v['video_id']}"
f" | Length: {v['length_text']}\n\n")
docs.append((v, head + md))
(OUT / "per-video").mkdir(parents=True, exist_ok=True)
(OUT / "combined").mkdir(parents=True, exist_ok=True)
for i, (v, text) in enumerate(docs, 1):
slug = re.sub(r"[^a-z0-9]+", "-", v["title"].lower()).strip("-")[:60]
(OUT / "per-video" / f"{i:02d}-{slug}.md").write_text(text)
for n in range(0, len(docs), PER_FILE):
group = docs[n:n + PER_FILE]
name = f"channel-part-{n // PER_FILE + 1:02d}.md"
(OUT / "combined" / name).write_text("\n\n---\n\n".join(t for _, t in group))
print(name, len(group), "videos")Run it like this, with your key in YTAPI_KEY:
mkdir out
python3 channel_to_project.py @yourchannel 20 5 outThat means: 20 newest videos, 5 videos per combined file, output into out/. It writes out/per-video/ (20 files) and out/combined/ (4 files). Two notes from our run:
- Set a User-Agent. A request with Python's default
Python-urllibUser-Agent got HTTP 403 from the API in our test; the same request with our own User-Agent worked. The script sets one. - The Markdown has no title. The API returns
# Transcript: <video id>and then the text with a### [0:51]heading at each timestamp. A chat can't tell which talk it is reading from an ID, so the script swaps that first line for the video's title, its link and its length.
For more than 30 videos, list further pages with the cursor parameter and use the batch endpoint, as in transcripts for a whole channel or playlist. Videos without captions return 404 and cost nothing; the script skips them. All 20 of ours had captions.
How many videos fit
Our 20 videos averaged 12,170 tokens each (about 71 minutes). Anthropic's page on context window size (read 2026-11-15) says the default for paid plans is 200K tokens, and lists some models at 500K and 1M. The capacity at our channel's rate:
| Context window | Videos that fill it | Videos if you keep 25% free for instructions, history and answers |
|---|---|---|
| 200K tokens | 16 | 12 |
| 500K tokens | 41 | 30 |
| 1M tokens | 82 | 61 |
Divide by your own average. At 10,200 tokens per hour, a 10-minute video is about 1,700 tokens, so the same 200K window holds around 88 videos of that length with 25% kept free. That last figure is an extrapolation from our rate, not a measurement on short videos. The 25% reserve is our rule of thumb, not a documented number.
Two things changed our count:
- Duplicates. Two of the 20 talks were on the channel twice, with the same title and length. Dropping the second copies saves about 21,000 tokens, 9% of the total. Check the video list for repeated titles before you export.
- Timestamp headings. The
### [0:51]lines cost about 4% of the tokens (about 10,000 of 243,000, counting the title line too). We kept them, because they let Claude say where in a talk something was said.
What Claude's documentation says about project size
From Anthropic's uploading files page (read 2026-11-15): project files are limited to 30 MB each, the number of files is "unlimited, but total content must fit within Claude's context window", and only text is extracted. Our whole 20-video export is 1.1 MB, so file size is not the limit.
The RAG for projects page (read 2026-11-15) says that on paid plans (Pro, Max, Ultra, Team, Enterprise), when project knowledge approaches the context window limit, Claude switches to retrieval mode automatically. It then uses a project knowledge search tool to fetch relevant passages instead of loading everything, and Anthropic says this expands capacity by up to 10 times. The projects page says the free plan allows five projects and that RAG is for paid plans.
What that means for a channel, from the docs and our counts (we did not test it in the interface):
- Our 243K tokens is above the 200K default, so on a model with that window the project would use retrieval. On a 500K or 1M model it could fit in context.
- In retrieval mode Claude finds passages related to a question. That suits "what did the speakers say about the Potomac Company?" It is weaker for "list every talk that mentions a war" or "summarize the whole channel", where the answer depends on every video, because anything the search doesn't surface is missing. That is a property of how retrieval works, not something we measured.
- Anthropic recommends clear, descriptive file names so that Claude retrieves the right content. The script names per-video files from the title.
What we could not check for ChatGPT
OpenAI's Help Center pages on Projects and file uploads returned HTTP 403 to our automated requests on November 15, 2026, and so did OpenAI's Academy page on projects. We cannot quote ChatGPT's file count, file size or token limits for projects, and we have not seen how ChatGPT reads project files. The third-party pages we found disagree with each other, so we don't repeat their numbers. Look up your plan's limits on OpenAI's page before you plan the split. For other ways to hand ChatGPT a transcript, see give ChatGPT a YouTube transcript.
Splitting and combining
Which of the two outputs to upload depends on the limits you find:
| Layout | Files for 20 videos | Size of each | Use when |
|---|---|---|---|
One file per video (per-video/) | 20 | 8,000 to 19,800 tokens | The product has no low cap on the number of files (Claude's docs say none), and you want to add or replace one video at a time |
Combined, 5 videos each (combined/) | 4 | 55,600 to 65,900 tokens | The product caps the number of files (we could not check whether ChatGPT does) |
| One file | 1 | 243,000 tokens (1.1 MB) | Only if a single file is accepted; it is harder to update and to cite |
The combined files separate videos with a line of ---, and each video starts with its title and link. Ask the chat to name the video and give the link whenever it quotes something, and you can click through to check the words.
When to use a connector instead
Use a project when the whole set fits in the window, or when a retrieval search over it is good enough, and you want to ask many questions over a fixed set.
Use a connector when:
- The channel is large. Hundreds of videos is too much to export and upload by hand, and the set grows as the channel posts.
- You need the newest videos. A project holds the files you uploaded. A connector fetches from YouTube when you ask.
- You only need some of the videos. With our MCP server, Claude can list a channel's videos, search YouTube and fetch a transcript when a question needs it. It reads a handful of videos instead of storing all of them. The setup is in YouTube transcripts in Claude, and YouTube MCP servers compared covers the alternatives. We tested the connector on a single video in that post, not on this channel.
A connector is not free of the token problem. A transcript the tool fetches goes into the conversation, so reading all 20 of these videos in one chat would take the same roughly 243,000 tokens. We did not run that, and inferred it from how tool results work. The difference is that you choose which videos to read.
If you want to search a very large channel by keyword and get a link to the exact minute, a local index is better than either; see a searchable archive of a YouTube channel. To analyze what a channel does well, see studying a competitor's channel with Claude.
What it costs, and what can go wrong
The API charges 1 credit per transcript and 1 credit per page of the channel's video list. Videos without captions return 404 and are free. A new account has 200 free credits; the API has no 25-video cap, only credits and rate limits. The one-click exports in the dashboard and the Chrome extension are capped at 25 videos until you buy a credit pack. Packs start at $9 for 2,000 credits.
What it can't do:
- Videos with captions turned off have no transcript. Auto-generated captions can take a while to appear on a new upload.
- Private, members-only and age-restricted videos fail.
- Auto-generated captions can mishear names and jargon, and a project can't tell which spelling is right.
- Captions hold the words, not the picture. Slides and maps in these talks aren't in the text.
FAQ
Can I upload a whole channel to a Claude Project?
If it fits. Anthropic's documentation allows any number of files of up to 30 MB each, provided the content fits the context window, and on paid plans Claude switches to retrieval when it gets close. At our rate of about 12,000 tokens per hour-long video, a 200K window holds roughly 16 such videos in full. Beyond that you depend on retrieval.
How do I split transcripts into files?
By video, or by groups of a few videos, as in the script above. Name files after the talk, start each video with its title and link, and remove duplicates first.
Does ChatGPT have a limit on project files?
We could not confirm. OpenAI's help pages returned HTTP 403 to our requests on November 15, 2026, so we have no numbers to give you.
Which format should I export?
Markdown, with timestamp headings, if you want the chat to point at where something was said. The headings cost about 4% of the tokens in our run; the API's other formats (text, for example) drop them, but we only measured Markdown.
Sources
All read on November 15, 2026:
- How can I create and manage projects?, Anthropic
- Uploading files to Claude, Anthropic
- Retrieval augmented generation (RAG) for projects, Anthropic
- How large is the context window on paid Claude plans?, Anthropic
- Projects in ChatGPT, OpenAI (HTTP 403 to our requests, not read)