How to Get All Videos from a YouTube Channel
List every video of a YouTube channel by @handle, page by page with a cursor, export it to CSV, with or without Shorts, and get the transcripts of a channel.
To get all videos from a YouTube channel, you list the channel's Videos tab page by page until there are no pages left. With FetchTranscript that is GET /v1/channels/{channel}/videos with a cursor: you pass the channel's @handle, read up to 100 videos per call, and follow next_cursor to the end. This guide covers the free options too, then shows working code that exports a whole channel to CSV and, if you need it, fetches the transcript of every video.
The options, honestly compared
There are three common ways to list a channel's uploads, and each has its place.
yt-dlp. The open-source downloader can list a channel without downloading anything: yt-dlp --flat-playlist --print "%(id)s %(title)s" https://www.youtube.com/@mkbhd/videos. It is free and works well on a laptop. On servers it is less comfortable: YouTube rate-limits and challenges data-center IPs, so large or frequent jobs need proxies, and you maintain the tool as YouTube changes.
The YouTube Data API. The official route is the "uploads playlist" trick: call channels.list with part=contentDetails to read the channel's relatedPlaylists.uploads ID, then page through playlistItems.list, 50 items per call at 1 quota unit each. With the default 10,000 units a day that is plenty for listing. The catch is everything around it: you need a Google Cloud project and key, durations and view counts need extra videos.list calls, and the Data API cannot give you transcripts of other people's videos at all (we explain why in Can the YouTube Data API get transcripts?).
A hosted API. FetchTranscript lists the channel directly by @handle, returns title, duration and views in the same call, and costs 1 credit per page of up to 100 videos. A 1,000-video channel is 10 calls. You get 100 free calls a month, then $1 per 1,000 calls.
If you only need a list once, yt-dlp is fine. If listing is a step in a pipeline that runs on a server, the hosted API removes the proxy and quota work.
Step 1: identify the channel
Every channel endpoint accepts either a handle (@mkbhd, with or without the @, any case) or the channel ID that starts with UC (UCBcRF18a7Qf58cCRy5xuWwQ). A first call to GET /v1/channels/{channel} returns the channel's details and confirms it exists:
curl -H "X-API-Key: yt_your_api_key" \
"https://api.fetchtranscript.com/v1/channels/@mkbhd"The answer has channel_id, name, description, subscriber_count, video_count, thumbnail_url and channel_url. An unknown handle answers 404 channel_not_found and costs nothing. You can try this without an account on the YouTube Channel API page.
Step 2: page through the videos with a cursor
The list endpoint is GET /v1/channels/{channel}/videos. Its parameters:
| Parameter | Values | Notes |
|---|---|---|
limit | 1-100, default 30 | Videos per page; use 100 for exports |
cursor | the previous page's next_cursor | Omit it for the first page |
include_shorts | false (default) or true | See the section on Shorts below |
Each video in videos has video_id, title, thumbnail_url, duration (seconds) and view_count. The page also tells you has_more, next_cursor (null on the last page) and total_videos, the count the channel page shows (rounded by YouTube above 1,000). Without Shorts, videos come newest first.
The cursor is opaque: pass it back exactly as you got it. A modified cursor answers 400 invalid_parameter. Because the cursor carries YouTube's own continuation, page 40 is as fast as page 1; an offset (still accepted for older integrations) would re-read the channel from the start, so prefer the cursor.
Export a whole channel to CSV in Python
This script follows the cursor to the end and writes one row per video:
import csv
import requests
API = "https://api.fetchtranscript.com/v1"
HEADERS = {"X-API-Key": "yt_your_api_key"}
def channel_videos(channel: str, include_shorts: bool = False):
params = {"limit": 100, "include_shorts": str(include_shorts).lower()}
while True:
r = requests.get(f"{API}/channels/{channel}/videos", headers=HEADERS, params=params, timeout=60)
r.raise_for_status()
page = r.json()
yield from page["videos"]
if not page["has_more"] or not page["next_cursor"]:
return
params["cursor"] = page["next_cursor"]
with open("channel.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["video_id", "url", "title", "duration", "view_count"])
for v in channel_videos("@mkbhd"):
writer.writerow([v["video_id"], f"https://www.youtube.com/watch?v={v['video_id']}",
v["title"], v["duration"], v["view_count"]])With the official Python SDK (pip install fetchtranscript) the loop is built in: client.channels.iter_videos("@mkbhd", page_size=100) yields every video and follows next_cursor for you, and max_videos stops early.
from fetchtranscript import FetchTranscriptClient
client = FetchTranscriptClient(api_key="yt_your_api_key")
latest = list(client.channels.iter_videos("@mkbhd", max_videos=250))
print(len(latest), latest[0]["title"])The same in JavaScript
// Node 18+ as an ES module (a .mjs file, or "type": "module"), for the top-level await
const API = 'https://api.fetchtranscript.com/v1';
const headers = { 'X-API-Key': 'yt_your_api_key' };
async function* channelVideos(channel) {
let cursor = null;
do {
const params = new URLSearchParams({ limit: '100' });
if (cursor) params.set('cursor', cursor);
const res = await fetch(`${API}/channels/${encodeURIComponent(channel)}/videos?${params}`, { headers });
if (!res.ok) throw new Error(`HTTP ${res.status}: ${(await res.json()).detail.error}`);
const page = await res.json();
yield* page.videos;
cursor = page.has_more ? page.next_cursor : null;
} while (cursor);
}
let count = 0;
for await (const v of channelVideos('@mkbhd')) count++;
console.log(`${count} videos`);Shorts: in or out?
By default the list is the channel's Videos tab, without Shorts, newest first. In that mode total_count is null and has_more simply means the page came back full.
With include_shorts=true, the whole channel is listed, Shorts included, ordered by view count, and total_count is set. It is slower on large channels because every tab has to be read. Use it when you want a channel's most-watched content across formats; keep the default when you want a chronological catalogue of long-form uploads.
What the list does not include
Two fields are deliberately missing from channel lists, and knowing it saves you a debugging session:
- Descriptions:
descriptionis null in lists. - Upload dates: the Videos tab shows relative times only, so the list has no date.
For either one, call GET /v1/videos/{video_id}, which returns the full description, upload_date (YYYYMMDD), likes, comment count, tags and categories. That is one credit per video, so fetch metadata only for the videos you actually need. Our guide to YouTube video metadata shows how.
Keep the list up to date without re-reading the channel
Once you have exported a channel, you rarely need the whole list again. Because the default list is newest first, an incremental update is simple: read pages from the start and stop as soon as you meet a video_id you already have. A channel that uploads twice a week costs one call per check.
known = {row["video_id"] for row in csv.DictReader(open("channel.csv", encoding="utf-8"))}
new_videos = []
for v in channel_videos("@mkbhd"):
if v["video_id"] in known:
break # everything after this point is already in the file
new_videos.append(v)
print(f"{len(new_videos)} new videos")This works for the default mode only: with include_shorts=true the order is by views, so a new video can appear anywhere in the list. View counts change every day, so if you track growth, re-read the pages you care about on a schedule and store the date with each row. The API reference documents every field, and the SDK docs show the TypeScript equivalent of iter_videos.
Bonus: transcripts of a whole channel
Listing is often step one of building a dataset or a search index of everything a creator has said. Once you have the IDs, fetch each transcript and skip the videos that have none:
import time
def get_transcript(video_id: str) -> requests.Response:
while True:
r = requests.get(f"{API}/transcripts/{video_id}", headers=HEADERS, params={"format": "text"}, timeout=60)
if r.status_code != 429:
return r
time.sleep(int(r.headers.get("Retry-After", "5"))) # rate limited: wait, then retry
for v in channel_videos("@mkbhd"):
r = get_transcript(v["video_id"])
if r.status_code == 404:
continue # transcripts_disabled or no_transcript_found: not billed
r.raise_for_status()
with open(f"{v['video_id']}.txt", "w", encoding="utf-8") as f:
f.write(r.json()["text"])A channel of 1,000 videos costs about 10 credits to list and 1,000 to transcribe, around a dollar in total, and failed calls are free. The rate limit is 500 requests per minute, so a moderate thread pool finishes a large channel in minutes. If the transcripts are going into embeddings, read YouTube transcripts for RAG for chunking with timestamps.
Playlists work the same way
A channel's curated playlists, course series or podcast seasons are listed with the same cursor pattern, plus the video's position in the playlist. See how to export a YouTube playlist or the YouTube Playlist API page.
Frequently asked questions
How do I get every video from a YouTube channel at once?
There is no single call for a whole channel: you page through it. Request GET /v1/channels/{channel}/videos?limit=100 and pass next_cursor back as cursor until has_more is false; each page costs 1 credit.
Can I use the @handle instead of the channel ID?
Yes. Every channel endpoint accepts a handle such as @mkbhd (with or without the @, any case) or a UC... channel ID.
Why are upload dates missing from the list?
YouTube's Videos tab only shows relative times, so the list has no date. Call GET /v1/videos/{video_id} for the exact upload_date of the videos you need.
Are YouTube Shorts included?
Not by default. Add include_shorts=true to include them; the list is then ordered by view count and is slower on big channels.
How many videos per request?
Up to 100 with limit=100 (the default is 30). A channel with 2,500 videos takes 25 calls.
Does it work for channels with thousands of videos?
Yes. The cursor continues from YouTube's own page, so every page is as fast as the first, even deep into a large channel.
Try it on your own videos
100 free calls every month, no credit card. Then $1 per 1,000 calls, only for the calls that succeed.
Related guides
- How to Export a YouTube Playlist to CSV or JSON
Export every video of a YouTube playlist with title, position, duration, views and channel to CSV or JSON, even playlists of thousands of videos, with code.
- How to Get YouTube Video Metadata: Views, Likes, Tags
Get the title, description, views, likes, comment count, upload date, tags, categories and chapters of any YouTube video as JSON, with curl, Python or JS.
- YouTube Transcripts for RAG: Chunking and Embeddings
Turn YouTube videos into a searchable knowledge base: timestamped transcript chunks, chunk size and overlap, embeddings and citations to the exact second.