← Blog
·5 min read

How to Get a YouTube Channel ID from a Username or @handle

Four methods to find any YouTube channel ID: from the URL, from page source, using the banner.yt search API, and looking up by @handle.

YouTubeChannel IDHow ToGuide
Blog Post Example Banner

Finding a YouTube Channel ID

Every YouTube channel has a unique ID that starts with UC and is 24 characters long. You need it to use the banner.yt API. Here are the fastest ways to find it.

Method 1: From the YouTube URL

If the channel URL looks like this, the ID is right there:

https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA

The part after /channel/ is the channel ID.

Newer channels use handle URLs like youtube.com/@MrBeast and don't show the ID directly. Use one of the methods below.

Method 2: Search on banner.yt

The quickest way. Go to banner.yt and search for the channel name. The search results show the channel ID.

Method 3: Use the banner.yt search API

fetch('https://banner.yt/api/search?q=MrBeast')
  .then(r => r.json())
  .then(d => console.log(d.results[0].channelId));

Method 4: Look up by @handle

fetch('https://banner.yt/api/channel/mrbeast?type=handle')
  .then(r => r.json())
  .then(d => console.log(d.channelId));

Method 5: Page source on YouTube

  1. Go to the channel page on YouTube
  2. Right-click anywhere and choose View Page Source
  3. Press Ctrl+F (or Cmd+F on Mac) and search for channelId
  4. The value next to it is the channel ID

Method 6: From a video page

If you're on a video, click the channel name to go to the channel, then check the URL as in Method 1.

Handles vs usernames vs channel IDs

There are three ways to identify a channel on YouTube:

  • Channel ID — starts with UC, like UCX6OQ3DkcsbYNE6H8uQQuVA. Permanent and never changes.
  • @handle — like @MrBeast. Can be changed by the creator.
  • Username — the old style from before handles existed. Many big channels still have one.

The banner.yt API supports all three. Just add ?type=handle or ?type=username to the channel endpoint.