Many YouTube API calls require the YouTube channel ID in order to work. This can be a little frustrating: you need to go from a friendly YouTube URL like https://www.youtube.com/c/MileyCyrus to something absolutely bizarre-looking like
UCn7dB9UMTBDjKtEKBy_XISw
There are two ways to do this, which we’ll get to in a second.
Keep your Stats & Analytics Synced to a Spreadsheet
Before we jump in. If you
want to sync you YouTube data to
Google Sheets, Excel or AirTable, SyncWith is trusted by 100,000s of businesses and hobbyists. You can see some of our tutorials:Options for getting your YouTube Channel ID
Option 1: Use view-source on the YouTube channel page
- Go to the YouTube channel whose ID you want, for example: https://www.youtube.com/c/MileyCyrus
- Use your browser’s view source feature by pressing
Control
andU
at the same time
- Search for
itemprop="channelId"
- Take the
content
value

In this case, the correct value is
UCn7dB9UMTBDjKtEKBy_XISw
This is guaranteed to give you the correct channel ID, but can feel a bit intimidating. So you might prefer our second approach, detailed below.
Option 2: Use SyncWith to search for channels
In this approach, you’ll use the YouTube API to search for channels matching a query term. You can try it live below, trying searching for
miley cyrus
.This approach is a bit easier to try, but for very popular terms, you will have to be careful to pick the correct channel from the search results.
Tip: You can compare the
description
field to the contents of the YouTube channel’s About page to make sure it’s the right page.Find channel ID
Please fill in any necessary fields and click Run.
GET
Preview
View the API data, get a live Google Sheet dashboard
Published At | Channel ID | Title | Description |
---|---|---|---|
Get a live Google Sheet
Export your data to a google sheet, with the SyncWith Addon, or download to CSV
Automatically updated
Schedule your data to update hourly or daily
Add data sources
Import additional data from other apps
Build reports & dashboards
Easily build live reports within Google Sheets
More YouTube API Content
- Counting subscribers with Google Sheets and the YouTube API
- Setting up a Youtube analytics spreadsheet
- Youtube analytics core reporting api
- Instructions to get list of videos in youtube playlistYoutube export playlist
- How to get youtube channel id via API
- How do you export view count youtube