YouTube Data API
Hi, I would like to write a script, that get the channel_id from a channel url.
For this, I was trying to use the username:
https://www.youtube.com/@t3dotgg
-> t3dotgg
https://youtube.googleapis.com/youtube/v3/channels?part=id&forUsername=t3dotgg&key=[YOUR_API_KEY]
but I get this response:
200
but if I use a different username like ludwig
it works:
200
3 Replies
try this instead https://www.googleapis.com/youtube/v3/search?part=id,snippet&maxResults=1&type=channel&q=t3dotgg
dont forget the api key
Ohh yea, that worked, thank you very much,
do you know why the above method works for some but not for all?
no idea kkkkk
never worked with youtube api