user3310252
user3310252

Reputation: 1

Fetch videos from Youtube V3 API channels that have posted videos

I'm using the Youtube V3 API search.list method successfully to fetch videos from most Youtube channels, for example:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC6g9qKxpN82QmG-Z9po5wXQ&maxResults=20&key={YOUR_API_KEY}

But for some channels, it doesn't fetch videos, just playlists. If you go to Youtube channel and hit the Videos link, it will show all the channels video. Under the video link there will be a posted section. Example:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC7KZmdQxhcajZSEFLJr3gCg&maxResults=20&key={YOUR_API_KEY}

Does anyone knows how do I get the videos? I can get the playlists videos, but that would ruin video pagination.

Thanks

Upvotes: 0

Views: 429

Answers (1)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

You can use type = video to avoid playlist results.

Upvotes: 1

Related Questions