How can I get a channel ID from YouTube?

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 from my YouTube account, and I failed in every single way.
If anyone have a single tip for me, I would be incredible glad.

This is the URL that I'm using to retrieve the data:

https://www.googleapis.com/youtube/v3/channels? id =fjTOrCPnAblTngWAzpnlMA& key ={YOUR_API_KEY}&part=snippet,contentDetails,statistics

The ID is for the channel ID, and the key , I'm replacing the {YOUR_API_KEY} with my API KEY generated at my Google API console.

My channel ID is not:
- klauskkpm
- klausmachado
- klausmachado@gmail.com
- fjTOrCPnAblTngWAzpnlMA

My channel is: http://www.youtube.com/user/klauskkpm


要获取频道ID,您可以查看频道页面的源代码并找到data-channel-external-id="UCjXfkj5iapKHJrhYfAF9ZGg"这将是您正在查找的频道ID!


Edit: This answer was outdated and incomplete. Now it can easily help everyone.

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.

Hope it help.


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

链接地址: http://www.djcxy.com/p/28962.html

上一篇: 如何从Youtube频道获取所有视频ID?

下一篇: 我如何从YouTube获取频道ID?