YouTube URL Formats With Examples
Every kind of YouTube link, from watch URLs and youtu.be short links to Shorts, playlists, and channel handles. See what each part means, how to pull out the video ID, and which formats the YouTube Transcript API accepts.
What Is in a YouTube URL?
A YouTube video URL is made of a few parts. Only one of them identifies the video: the 11-character video ID. Everything else is the domain, the page type, or optional extras.
https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=42sVideo URL Formats
All of these point to the same video and can be sent to the /api/v2/transcribe endpoint as the video field.
Standard watch URL
✓ Supportedhttps://www.youtube.com/watch?v=dQw4w9WgXcQThe most common format. Also works without www, and on m.youtube.com and music.youtube.com.
Short link (youtu.be)
✓ Supportedhttps://youtu.be/dQw4w9WgXcQWhat the Share button gives you. Extra parameters like ?si= are ignored.
YouTube Shorts
✓ Supportedhttps://www.youtube.com/shorts/dQw4w9WgXcQShorts use the same 11-character video IDs as regular videos.
Embed URL
✓ Supportedhttps://www.youtube.com/embed/dQw4w9WgXcQThe src of an embedded YouTube iframe.
Legacy /v/ URL
✓ Supportedhttps://www.youtube.com/v/dQw4w9WgXcQAn old embed format you still find in older sites and datasets.
Link with a timestamp
✓ Supportedhttps://www.youtube.com/watch?v=dQw4w9WgXcQ&t=42sThe timestamp is ignored; you get the full transcript.
Video ID only
✓ SupporteddQw4w9WgXcQThe fastest option. Always exactly 11 characters: letters, numbers, - and _.
Playlist URL Formats
Send these to /api/v2/playlists/resolve to get every video ID in the playlist, then pass the IDs to /api/v2/batch. See playlist transcripts for the full workflow.
Playlist URL
✓ Supportedhttps://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSISend to the playlist endpoint, then batch-transcribe the videos.
Video inside a playlist
✓ Supportedhttps://www.youtube.com/watch?v=dQw4w9WgXcQ&list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSIThe playlist endpoint reads the list= value and resolves the whole playlist.
Playlist ID only
✓ SupportedPLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSIPlaylist IDs usually start with PL.
Channel URL Formats
Send these to /api/v2/channels/resolve to list a channel's uploads, with optional filters for date, duration, and keywords. See channel transcripts for details.
Handle URL
✓ Supportedhttps://www.youtube.com/@RickAstleyYTThe modern channel URL format.
Handle only
✓ Supported@RickAstleyYTInclude the @.
Channel ID URL
✓ Supportedhttps://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOwThe permanent channel URL. Never changes, even if the handle does.
Channel ID only
✓ SupportedUCuAXFkgsw1L7xaCfnd5JJOwAlways starts with UC and is 24 characters long.
Legacy custom URL
✓ Supportedhttps://www.youtube.com/c/RickAstleyOlder /c/ and /user/ URLs are matched by channel search, so use a handle or channel ID when you can.
Using These URLs With the API
# One video: any supported video URL or a bare video ID
curl -X POST https://www.youtubetranscript.dev/api/v2/transcribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"video": "https://youtu.be/dQw4w9WgXcQ"}'
# A playlist: resolve it to video IDs, then send them to /api/v2/batch
curl -X POST https://www.youtubetranscript.dev/api/v2/playlists/resolve \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playlist_url": "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"}'
# A channel: handle, channel URL, or channel ID
curl -X POST https://www.youtubetranscript.dev/api/v2/channels/resolve \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_url": "https://www.youtube.com/@RickAstleyYT"}'New to the API? Start with the YouTube Transcript API overview or the full API reference.
How to Extract a Video ID From Any YouTube URL
If you store or deduplicate videos in your own app, normalize every link to its video ID first. These snippets handle watch, youtu.be, Shorts, embed, /v/, and /live/ links, plus bare IDs.
function getYouTubeVideoId(input) {
const s = input.trim();
if (/^[A-Za-z0-9_-]{11}$/.test(s)) return s;
const m = s.match(
/(?:youtube\.com\/(?:watch\?(?:.*&)?v=|embed\/|v\/|shorts\/|live\/)|youtu\.be\/)([A-Za-z0-9_-]{11})/
);
return m ? m[1] : null;
}
getYouTubeVideoId("https://youtu.be/dQw4w9WgXcQ?si=abc"); // "dQw4w9WgXcQ"import re
def get_youtube_video_id(value: str) -> str | None:
s = value.strip()
if re.fullmatch(r"[A-Za-z0-9_-]{11}", s):
return s
m = re.search(
r"(?:youtube\.com/(?:watch\?(?:.*&)?v=|embed/|v/|shorts/|live/)|youtu\.be/)([A-Za-z0-9_-]{11})",
s,
)
return m.group(1) if m else None
get_youtube_video_id("https://www.youtube.com/shorts/dQw4w9WgXcQ") # "dQw4w9WgXcQ"Not Supported
- Private or removed videos.
- Livestreams and premieres that haven't finished. Wait until the stream ends, then send the video ID.
- Mix and Radio playlists (IDs starting with RD). YouTube generates these per viewer, so they can't be resolved.
- /live/ links. Copy the 11-character ID after /live/ and send that instead.
- Sending a video link that contains list= to the single-video endpoint. Remove the &list=... part, or send the video ID.
FAQ
What is a YouTube URL?+
A YouTube URL is the web address of a video, Short, playlist, or channel on YouTube. For videos, the important part is the 11-character video ID, such as dQw4w9WgXcQ in https://www.youtube.com/watch?v=dQw4w9WgXcQ. Every video link format, whether youtu.be, Shorts, or embed, contains that same ID.
What is the format of a YouTube video link?+
The standard format is https://www.youtube.com/watch?v=VIDEO_ID. The short format from the Share button is https://youtu.be/VIDEO_ID, and Shorts use https://www.youtube.com/shorts/VIDEO_ID. VIDEO_ID is always 11 characters made of letters, numbers, hyphens, and underscores.
How do I find the video ID in a YouTube URL?+
Look for the 11 characters after v= in a watch link, after youtu.be/ in a short link, or after /shorts/ or /embed/. In https://youtu.be/dQw4w9WgXcQ?si=abc, the video ID is dQw4w9WgXcQ. Ignore anything after ? or & that isn't the ID.
Are youtu.be links and youtube.com links the same?+
Yes. https://youtu.be/dQw4w9WgXcQ and https://www.youtube.com/watch?v=dQw4w9WgXcQ open the same video. youtu.be is just YouTube's short domain for sharing.
Which URL formats does the YouTube Transcript API accept?+
For single videos: watch URLs (including m. and music. subdomains), youtu.be links, Shorts, embed URLs, legacy /v/ URLs, and bare 11-character video IDs. For bulk jobs: playlist URLs and IDs, and channel handles, channel URLs, and channel IDs through the resolve endpoints.
Can I get a transcript for a YouTube Short?+
Yes. Send the Shorts URL or its video ID. Shorts use the same video IDs as regular videos, and if a Short has no captions the API can transcribe the audio with AI instead.
Turn Any of These Links Into Text
Paste a link into the free tool, or get an API key and do it in code.