https://www.googleapis.com/youtube/v3/channels?forUsername=TechBurner&key=
this does not work
https://www.googleapis.com/youtube/v3/channels?forUsername=Apple&key=
but this works
From this comment:
Quote:
The 'user' and 'c' can be different with other channels, while NASAtelevision is the user name, NASA is the channel name (not all channels use for both the same name) thus https://www.youtube.com/c/NASA/live, works both in upper case and lower case. Although using 'c' with channel name indeed doesn't work with some channels, id and user name works. The thing with these ways is that you don't get to choose which one it redirects to for a channel running multiple live streams, But it's ideal to verify that a channel is live streaming and use the API to retrieve video ids of the live streams.
The issue here is: the name of the channel might vary from the title of the channel and the value supplied in the forUsername field.
Example - for get the channel "Apple
":
URL:
https://developers.google.com/youtube/v3/docs/channels/list?hl=es&apix_params=%7B%22part%22%3A%5B%22id%2Csnippet%22%5D%2C%22forUsername%22%3A%22Apple%22%2C%22maxResults%22%3A50%7D
Response:
{
"kind": "youtube#channelListResponse",
"etag": "9VyLxNhGdoRer4vpOzpnOw-fZus",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 50
},
"items": [
{
"kind": "youtube#channel",
"etag": "IeLWFmP61SBTDU_2_c9AYAQ1evQ",
"id": "UCE_M8A5yxnLfW0KghEeajjw",
"snippet": {
"title": "Apple",
"description": "Welcome to the official Apple YouTube channel. Here you’ll find news about product launches, tutorials, and other great content. \n\nApple revolutionized personal technology with the introduction of the Macintosh in 1984. Today Apple continues to be a global leader in innovation with products like iPhone, iPad, Mac, and Apple Watch. Our five software platforms (iOS, iPadOS, macOS, watchOS, and tvOS) provide seamless experiences across Apple devices. Breakthrough services include the App Store, Apple Music, Apple Pay, and iCloud. And Apple keeps pursuing innovation with products like HomePod, Apple Fitness+, and Apple Card. Apple’s more than 160,000 employees are dedicated to making the best products on earth, and to leaving the world better than we found it. \n\nAdditional products include AirPods, AirTags, Apple Arcade, Apple Books, Apple News, Apple Podcasts, Apple TV, and iPod touch.",
"customUrl": "@apple",
"publishedAt": "2005-06-22T05:12:23Z",
"thumbnails": {
"default": {
"url": "https://yt3.ggpht.com/ytc/AL5GRJVaP8qqhnaBvlgkQDRWDONrWTbpYSMOv7hwHI235w=s88-c-k-c0x00ffffff-no-rj",
"width": 88,
"height": 88
},
"medium": {
"url": "https://yt3.ggpht.com/ytc/AL5GRJVaP8qqhnaBvlgkQDRWDONrWTbpYSMOv7hwHI235w=s240-c-k-c0x00ffffff-no-rj",
"width": 240,
"height": 240
},
"high": {
"url": "https://yt3.ggpht.com/ytc/AL5GRJVaP8qqhnaBvlgkQDRWDONrWTbpYSMOv7hwHI235w=s800-c-k-c0x00ffffff-no-rj",
"width": 800,
"height": 800
}
},
"localized": {
"title": "Apple",
"description": "Welcome to the official Apple YouTube channel. Here you’ll find news about product launches, tutorials, and other great content. \n\nApple revolutionized personal technology with the introduction of the Macintosh in 1984. Today Apple continues to be a global leader in innovation with products like iPhone, iPad, Mac, and Apple Watch. Our five software platforms (iOS, iPadOS, macOS, watchOS, and tvOS) provide seamless experiences across Apple devices. Breakthrough services include the App Store, Apple Music, Apple Pay, and iCloud. And Apple keeps pursuing innovation with products like HomePod, Apple Fitness+, and Apple Card. Apple’s more than 160,000 employees are dedicated to making the best products on earth, and to leaving the world better than we found it. \n\nAdditional products include AirPods, AirTags, Apple Arcade, Apple Books, Apple News, Apple Podcasts, Apple TV, and iPod touch."
},
"country": "US"
}
}
]
}
And for the channel "Markiplier
", you have to use the value "markiplierGAME
" - you can try here.
As I mention in my answer, I don't find if this behaviour is documented and I rather user the channel_id
while searching for channels/videos/etc.