Youtube how to get channel id
Youtube how to get channel id
Как узнать ID канала на YouTube
https://www.youtube.com/feeds/videos.xml?channel_id=хххххххх
И вместо значения «хххххххх» подставить, соответственно, уникальный набор символов конкретного канала на Ютубе.
Где взять этот набор символов?
Как узнать ID своего канала на YouTube
Чтобы узнать идентификатор своего канала на Ютубе, нужно авторизоваться на сайте видеохостинга и зайти в настройки аккаунта.
В разделе информации об аккаунте есть опция «Дополнительно».
Эта опция отображает дополнительные сведения, в числе которых – наш идентификатор.
Свой ID также можно узнать в адресной строке браузера, зайдя на главную страницу своего канала.
Как узнать ID чужого канала на YouTube
Идентификаторы чужих каналов «добываются» на их главных страницах.
Однако уникальный набор символов увидим не в каждом случае. На некоторых каналах, зайдя на главную страницу, в адресной строке обнаружим их названия латиницей.
Как в таком случае узнать чужой ID? Нужно открыть любую ссылку – первый попавшийся видеоролик, вкладки «Видео», «Плейлисты» и т.п. А затем снова перейти на главную страницу канала, кликнув его название.
6 комментариев
Открываем «Исследовать код элемента» или «Просмотр HTML кода». В поле поиска пишем: channel
Жмём Enter и получаем полную каноническую ссылку с идентификатором канала.
Work with Channel IDs
Jeff Posnick, YouTube Developer Relations – June 2013
For more than a year, it’s been possible to link Google+ profiles with YouTube channels, and we’ve blogged about how some of the Data API v2 responses have changed as a result of that profile link. More recently, it has become possible to create new YouTube channels that don’t have a traditional YouTube username associated with them and, instead, are solely identified by their Google+ profile. Much of the information from that blog post still applies, but this extra wrinkle does invalidate some fundamental assumptions about YouTube channels – like that each one will always be associated with a unique YouTube username – and we wanted to follow up with some additional best practices to write code that works with all flavors of channels.
Channel IDs in the Data API v3
All v3 operations that work with channels use channel IDs exclusively as a means of identifying those channels. The ID for a specific YouTube user’s channel is identical in both v2 and v3 of the API, simplifying migrations between versions. This complete reliance on channel IDs might be perplexing for developers who were previously used to passing YouTube usernames to API methods, but v3 was designed to treat channels with and without legacy usernames identically, and that means using channel IDs everywhere.
If you are using v3 and want to retrieve the channel ID that corresponds to the currently authorized user, you can call the channels.list(part=»id», mine=true) method. This is equivalent to asking for the channel profile of the default user in v2.
If you ever do find yourself with an arbitrary legacy YouTube username that you need to translate into a channel ID using v3 of the API, you can make a channels.list(part=»id», forUsername=» username «) call to the API.
If you only know a display name and are looking to find the corresponding channel, the search.list(part=»snippet», type=»channel», q=» display name «) method will come in handy. You should be prepared to deal with the possibility of the call returning more than one item in the response, since display names are not unique.
Channel IDs in the Data API v2
Note: The YouTube Data API (v2) has been deprecated since February 26, 2014, and the API has been turned down. Applications still using the v2 API should migrate to the v3 API immediately.
The biggest takeaway for developers using the older Data API v2 is that you must be aware that not every YouTube channel has a unique username. Fortunately, every YouTube channel is guaranteed to have a unique channel ID associated with it, represented by the value in the tag, and that’s the value that we recommend developers use instead of usernames. For instance, if you have a database that maps YouTube usernames to information about that channel, your older entries should continue to work. (Existing channels won’t lose their usernames.) However, as time goes on, it will become more and more likely that you’ll have to work with channels that can’t be uniquely identified by a username.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Obtaining a channel id from a youtube.com/c/xxxx link?
It seems Youtube has gotten rid of /channel/XXXX urls on their page, its now /c/username? with username NOT really being a «username». For example
Running a lookup via
returns no results.
I’ve got a bunch of non-technical users who’ve been trained to look for /channel/x or /user/x and input the correct thing into my app. Now that /channel is gone how do I (or they) translate /c/x to a channel id?
I’m looking for an API solution, not a view source and reverse engineer code solution.
2 Answers 2
Trending sort
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
Switch to Trending sort
According to the official support staff, a given channel may have associated an URL of form:
Now, your problem may be reformulated as follows:
The short answer to the above question is no, there’s none. (Please have a look at my answer and the attached comments I gave recently to a similar question).
The longer answer would be the following: yes, it can be imagined an algorithm that solves the problem, but only partially (since there’s no guarantee that it’ll always give positive results).
Here is the algorithm:
Due to the fuzzy nature of the result sets provided by the Search.list endpoint, one cannot exclude the possibility that there could actually exist custom URLs (i.e. URLs of the form above that are pointing to existing channels) for which this algorithm is not able to yield the ID of the associated channel.
A final note: the Channels.list endpoint accepts its id parameter to be a comma-separated list of channel IDs. Therefore, one may easily modify the algorithm above such that instead of N invocations ( N ) of Channels.list endpoint to have only one.
An implementation of the algorithm above in Python language, using Google’s APIs Client Library for Python:
where the function caseless_equal used above is due to this SO answer.
I posted here a simple Python3 script that encompasses the function find_channel_by_custom_url above into a standalone program. Your custom URL applied to this script yields the expected result:
How to get a YouTube channel ID from the channel’s username which includes Cyrillic characters
I am trying to obtain the channel’s id from the URL by calling the YouTube DATA API v3:
But the call returns no data.
For reference, «https://www.youtube.com/c/besogontv/videos» returns a valid result:
Just to see if it may work, I tried decoding the URL encoding and then re-encoding to UTF8, but it didn’t make a difference.
Is there some character encoding issue I’m missing?
1 Answer 1
If you’ll issue the following command (at any GNU/Linux bash prompt):
The forUsername property does not function for a given channel’s custom URL since these URLs are not guaranteed to uniquely represent any given channel.
Do convince yourself by querying on Google’s issue tracker for either of these two phrases channels forusername or vanity URL to see the terse/raw official responses users got from Google’s staff.
Indeed, at times, the official docs and staff responses do lack useful/meaningful clear-cut specifications and/or formulations. (I already experienced all these myself too!)
As a final note, you may scrape out of the HTML page obtained from https://www.youtube.com/c/лучшиедокументальныефильмы the channel ID of your interest, but please bear in mind that this activity is forbidden by Google, as per its DTOS docs :
You and your API Clients must not, and must not encourage, enable, or require others to, directly or indirectly, scrape YouTube Applications or Google Applications, or obtain scraped YouTube data or content. Public search engines may scrape data only in accordance with YouTube’s robots.txt file or with YouTube’s prior written permission.
Instead of scraping, I’d recommend using the Search.list API endpoint, invoked with the q parameter being лучшиедокументальныефильмы and the type parameter being channel (if you’re able to cope with the fuzziness implied).
Update upon answering to a related SO question
Here is a simple Python3 script implementing the functionality that you’re looking for. Applying your custom URL to this script produces the expected result:
YouTube Channel ID
Find any YouTube Channel ID, information and channel statistics.
Get YouTube Channel ID
YouTube Channel ID Finder is an online tool that will help you to quickly find a Channel ID and related channel information, like Channel owner, Channel start date, Subscriber Count, total views and total videos of any YouTube user.
You only have to enter a YouTube Channel URL, Video URL or YouTube username in our tool and press the «Get YouTube channel ID» button.
Note: We can’t get channel ID’s from expired channels or removed videos.
Enter YouTube channel or video URL
We advise to use the video URL of the latest video of a YouTube channel to get the most accurate results.
YouTube channel ID, info & statistics
How to find a YouTube Channel ID?
Find the YouTube Channel ID with our tool in the following simple steps.
Do you want a 100% Ad-free website? Join Premium and get access to a clean fast website with no ads, affiliate link or sticky banners.
What is YouTube Channel ID Finder?
YouTube Channel ID finder is a free online tool to get a channel ID of a YouTube channel owner by entering a YouTube Channel URL, video URL or YouTube username.
The YouTube Channel ID finder will show the following Channel information and statistics:
* It could happen that the tool will not display any statistics of the channel. This happens when we have to search for a Channel instead of an exact match. Please make sure you are using the correct username, Channel URL or any video URL of a video of this user. The best way to make sure you include the YouTube statistics is by entering the video URL of the last video of the channel.
When using this tool you are agreeing to be bound by the YouTube Terms of Service.
How to find YouTube Channel ID or User ID in YouTube?
Make sure you are logged in with your YouTube channel and not your personal account.
You could also go directly to advanced setting of your YouTube channel in the browser via https://www.youtube.com/account_advanced where you can directly copy your channel ID. Advertisement
Watch the video below to see an example on how you can get your YouTube Channel ID or User ID in the YouTube settings or via our tool.
How to find a YouTube channel URL?
Follow the simple steps below to find YouTube Channel via the YouTube app or via the browser.
Find YouTube channel URL via YouTube app
You can enter the Channel URL in the text-field and click on the «Get YouTube channel ID» button to find the YouTube ID and statistics.
Find YouTube Channel URL via browser
After copying the URL you can paste it inside our tool to get the YouTube Channel ID.
Any issues or problems with getting the YouTube channel URL? Send us a message on Facebook and we will help you. We hope this tool will help you to make your live easier, don’t forget to like and rate us and share our YouTube Channel ID url.
How to find a YouTube Video URL?
Follow the steps to find the correct YouTube video URL via the YouTube app or via any browser.
Find YouTube video URL via YouTube app
Find YouTube video URL via browser
You can now paste the YouTube video URL in our tool to get the Channel ID or other statistics. Any issues or problems with getting the YouTube video URL? Let us know via Facebook.
Frequently Asked Questions
You can find answers of frequently asked questions about our tool in the list below. Is your specific question not in the list? Please send us a message via Facebook or Instagram.
A YouTube Channel ID is a unique identifier for a YouTube Channel. This ID can be used for social apps or services to show YouTube information or feeds.
Yes, if you enter the correct channel URL or Video ID, we will also display the YouTube Subscriber count. If we have to search for a Channel, we don’t show the follower count.
We can’t get channel IDs from expired channels or removed videos. Please try to enter the latest video url of the channel to find the ID.
Yes, enter the YouTube username or custom URL in the input field and we will search for the related channel. It can happen that it finds the wrong username, in that case please try to enter a video URL of the channel.
We will get the YouTube Channel ID, username, profile photo and start date of the channel. We will also provide statistics about the channel, like subscriber count, total views and total videos.
Источники информации:
- http://developers.google.com/youtube/v3/guides/working_with_channel_ids
- http://stackoverflow.com/questions/63046669/obtaining-a-channel-id-from-a-youtube-com-c-xxxx-link
- http://stackoverflow.com/questions/62576403/how-to-get-a-youtube-channel-id-from-the-channels-username-which-includes-cyril
- http://commentpicker.com/youtube-channel-id.php