Youtube - ListChannels with Username(forUsername) is not working

Viewed 334

I'm trying to get channels info with ChannelsList. This endpoint has a parameter the name is: forUsername but it does not work for this page: https://www.youtube.com/c/FolkartTr

This is my query and it returns empty data:

https://i.stack.imgur.com/gd86q.png

Somehow, I got this channelID in the page source and its: "channelId":"[UCnS--2e1yzQCm5r4ClrMJBg]". When I try to query with this ID it's okay and returns with correct data.

https://i.stack.imgur.com/QjCsK.png

and this is its payload: http://jsonblob.com/941253671862419456

How will I be able to reach this channel info using a username? I got a few links with usernames and I want to get their info with their username. I don't have any chance to get their channelID's for all.

Thanks for your help.

3 Answers

If I understood correctly, your problem is that you can't do anything from such a username with the Channels: list of the YouTube Data API v3. If you're just looking for the channel id linked to this username then because as YouTube Data API v3 doesn't work for this, I would recommend you to use my open-source YouTube operational API, indeed by requesting https://yt.lemnoslife.com/channels?part=snippet&forUsername=FolkartTr you'll receive a JSON with id equals to the channel id linked to the provided forUsername value.

If you have any question don't hesitate to comment or come to the Discord support.

Notice that the channel title and the channel customUrl might be different.

In your example - http://jsonblob.com/941253671862419456 -, the channel title is Folkart, but its customUrl - which is the value you get when view on YouTube - is: folkarttr.

Note the difference in both case-sensitive and additional letters.

For these reasons, you should not based your channel search by name, but, rather, by its channel_id.

If you really need to search by userName, the answer from Benjamin Loison can solve your requirement.

See if you can find a ticket on Issue Tracker or post your issue there too. Then, you might get some official answer.

the cannel id is FolkartTr

enter image description here

Your only going to get results back if you have authorized your app with that has access to that channel and pick that channel as YouTube api is channel based.

If your getting no results back its probably because you don't have access.

Related