I am trying to get channel's videos using, https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId=UC6-F5tO8uklgE9Zy8IvbdFw&type=video&maxResults=50&key={YOUR_API_KEY} It is working. Now i want show channel video for that i am using show channel id in this api like, https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId=SW0ORvMZrxEHM&type=video&maxResults=50&key={YOUR_API_KEY} but it returns whole search result. I want only that shows videos. Can anyone facing same issue?
0
votes
What exactly does "It's not working" mean? What script language do you use? What errors do you get? I assume you have an error in your code, since I get a result containing only videos when i call this in a browser.
– paolo
I get all videos as well. What does "it returns whole search result" mean that would be considered bad?
– johnh10
1 Answers
0
votes
The channelId "SWfds0ORvMZrxEHM" is an invalid ChannelId with an invalid ChannelId format. As you can see, the first's request ChannelId starts with UC, like each valid channelId has to (there are some exceptions, but channelIds always starts with a two letter code).
If you replace the channelId of the second request with any other random string, you always get totalResults: 1000000
If you replace the channelId with a string that starts with "UC[random string]" you will get totalResults: 0