How can I get a channel ID from YouTube?

前端 未结 13 1488
梦谈多话
梦谈多话 2020-11-28 19:40

I\'m trying to retrive the data from my channel using the YouTube Data API V3.
For that I need my channel ID.
I\'ve tried to find my channel ID fr

相关标签:
13条回答
  • 2020-11-28 20:25

    An easy answer is, your YouTube Channel ID is UC + {YOUR_ACCOUNT_ID}. To be sure of your YouTube Channel ID or your YouTube account ID, access the advanced settings at your settings page

    And if you want to know the YouTube Channel ID for any channel, you could use the solution @mjlescano gave.

    https://www.googleapis.com/youtube/v3/channels?key={YOUR_API_KEY}&forUsername={USER_NAME}&part=id
    

    If this could be of any help, some user marked it was solved in another topic right here.

    0 讨论(0)
  • 2020-11-28 20:26

    You can get the channel ID with the username (in your case "klauskkpm") using the filter "forUsername", like this:

    https://www.googleapis.com/youtube/v3/channels?key={YOUR_API_KEY}&forUsername=klauskkpm&part=id
    

    More info here: https://developers.google.com/youtube/v3/docs/channels/list

    0 讨论(0)
  • 2020-11-28 20:30

    To obtain the channel id you can do the following request which gives you the channel id and playlist id.

    https://www.googleapis.com/youtube/v3/channels?part=contentDetails%2C+statistics%2Csnippet&mine=true&key={YOUR_API_KEY}

    mine parameter means the current authorized user

    as u said channel id is perfixed with UC+{your account id} which you get while login, you can use this one also without requesting the above url you can directly call the channel api with your google id and just prefix with UC

    https://www.googleapis.com/youtube/v3/channels?part=contentDetails%2C+statistics%2Csnippet&id=UC{your account id}&key={YOUR_API_KEY}

    0 讨论(0)
  • 2020-11-28 20:31

    I just found the simplest way to find the channel ID of any YouTube channel !!

    Step 1: Play a video of that channel.

    Step 2: Click the channel name under that video.

    Step 3: Look at the browser address bar.

    0 讨论(0)
  • 2020-11-28 20:32

    You can use this website to obtain a channelId

    https://commentpicker.com/youtube-channel-id.php
    
    0 讨论(0)
  • 2020-11-28 20:33

    To obtain the channel id you can view the source code of the channel page and find either data-channel-external-id="UCjXfkj5iapKHJrhYfAF9ZGg" or "externalId":"UCjXfkj5iapKHJrhYfAF9ZGg".

    UCjXfkj5iapKHJrhYfAF9ZGg will be the channel ID you are looking for.

    0 讨论(0)
提交回复
热议问题