Find a YouTube Channel ID

A YouTube channel ID is a unique identifier for a YouTube channel. In recent years YouTube has moved to channel names instead of IDs, and it's now often impossible to find a channel ID by simply browsing around YouTube's website. However, the unique ID is still very important for fetching public data like view and subscriber counts via the API.

How to get the channel ID?

The channel ID is pretty hidden, but we have several ways to get it:

Grab the ID from the Page Source

  1. To get a channel ID, visit the channel page you're interested in on YouTube, e.g. https://www.youtube.com/@JamesJani
  2. Right-click on your browser and click View Page Source.
  3. Search (Ctrl-F) for https://www.youtube.com/channel/ in the page source.
  4. The channel ID will appear directly after the /channel/ text in the URL path.
    youtube-channelId-source

Check the ID in Developer Tools

  • Navigate to the channel for which you're interested in fetching data
  • Open Developer Tools in your browser (F12 on Windows/Linux or option + ⌘ + J on OSX)
  • Click on the Network tab
  • In the filter box type "browse" to filter the list of network requests
  • Click on any interactive element of the channel page, e.g. the Home or Videos tab
  • In the right side panel you should see a network request to the /browse endpoint. Click on it and the Channel ID will appear in the Request Payload under the browseId parameter
    youtube-channelId-devtools

Fetch the ID via the API

  • Open a video published by the channel of interest
  • Check the video ID in the URL
    youtube-channelId-videoId
  • Now use your API client of choice to run an API request to YouTube's /videos endpoint, e.g. https://www.googleapis.com/youtube/v3/videos?part=snippet&id=tlNBB0jdL3w
  • The channel ID will be returned in the channelId parameter.
    youtube-channelId-apirequest


5 thoughts on “Find a YouTube Channel ID”

Leave a Comment