How to retrieve YouTube channel ID based on user URL (API V3.0)

javascript, web, youtube, youtube-api, youtube-channels

Solution

Change "YOUR_USERNAME" and "YOUR_KEY" in following url:

https://www.googleapis.com/youtube/v3/channels?part=id&forUsername=YOUR_USERNAME&key=YOUR_KEY

Problem

I'm writing a web app that displays the latest videos for a specific YouTube channel. Using YouTube API V3.0 (Search: list) I can get the latest videos for a channel like so: GET `https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCORZ8ODt6D5J_a9ZcLXWJlw&order=date&key={YOUR_API_KEY}` My app users could configure their YouTube channel, by providing their YouTube page URL. for the sake of this exaple I'm using `https://www.youtube.com/user/SuperNewSimpsons1` Q: How can I map between www.youtube.com/user/SuperNewSimpsons1 to UCORZ8ODt6D5J_a9ZcLXWJlw using an API call

Original source