DEVELOPER GUIDE

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=42s
https://www.youtube.comThe domain. youtu.be, m.youtube.com, and music.youtube.com point to the same videos.
/watchThe page type. Others include /shorts/, /embed/, /playlist, /channel/, and /@handle.
?v=dQw4w9WgXcQThe video ID: 11 characters that uniquely identify the video. This is the part that matters.
&t=42sOptional start time. Other optional parameters include list= (playlist), index=, and si= (share tracking).

Video 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

✓ Supported
https://www.youtube.com/watch?v=dQw4w9WgXcQ

The most common format. Also works without www, and on m.youtube.com and music.youtube.com.

Short link (youtu.be)

✓ Supported
https://youtu.be/dQw4w9WgXcQ

What the Share button gives you. Extra parameters like ?si= are ignored.

YouTube Shorts

✓ Supported
https://www.youtube.com/shorts/dQw4w9WgXcQ

Shorts use the same 11-character video IDs as regular videos.

Embed URL

✓ Supported
https://www.youtube.com/embed/dQw4w9WgXcQ

The src of an embedded YouTube iframe.

Legacy /v/ URL

✓ Supported
https://www.youtube.com/v/dQw4w9WgXcQ

An old embed format you still find in older sites and datasets.

Link with a timestamp

✓ Supported
https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=42s

The timestamp is ignored; you get the full transcript.

Video ID only

✓ Supported
dQw4w9WgXcQ

The 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

✓ Supported
https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI

Send to the playlist endpoint, then batch-transcribe the videos.

Video inside a playlist

✓ Supported
https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI

The playlist endpoint reads the list= value and resolves the whole playlist.

Playlist ID only

✓ Supported
PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI

Playlist 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

✓ Supported
https://www.youtube.com/@RickAstleyYT

The modern channel URL format.

Handle only

✓ Supported
@RickAstleyYT

Include the @.

Channel ID URL

✓ Supported
https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw

The permanent channel URL. Never changes, even if the handle does.

Channel ID only

✓ Supported
UCuAXFkgsw1L7xaCfnd5JJOw

Always starts with UC and is 24 characters long.

Legacy custom URL

✓ Supported
https://www.youtube.com/c/RickAstley

Older /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

CURL
# 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.

JAVASCRIPT
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"
PYTHON
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.

Start extracting transcripts for free

Convert any YouTube video to text in seconds. No credit card required.

TRY YOUTUBETRANSCRIPT.DEV →
YouTube URL Formats: Every Link Type With Examples