Ankur
Ankur

Reputation: 71

Youtube api v3 for get Channel's videos

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?

Upvotes: 0

Views: 605

Answers (1)

larrydahooster
larrydahooster

Reputation: 4163

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

Upvotes: 0

Related Questions