0
votes

I have been using the YouTube search, channel, playlist api to collect video info. But recently, some problem has occurred.

For example, I want to collect all videos and playlists in 'MassageASMR' channel.

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

but some videos info was not returned.

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCgOfiuubHnhVrc9IEcSk1Nw&q=ASMR+Crinkle+Heaven+5&key={YOUR_API_KEY}

This video(title is 'ASMR Crinkle Heaven 5') is definitely belong in this channel. And this video info can be viewed using '/search' api with 'q' param. But when searching all videos using '/search' api without 'q' param, I can't find this video info with in all pages.

I guess, many videos can not be retrieved. I received a feedback message that some videos in my app are not visible.

Is there a problem with the API or do I change the param value?

1

1 Answers

0
votes

YouTube has a soft limit of 500 video results returned for a search query. Since your channel has ~600 videos, 'ASMR Crinkle Heaven 5' must be one of the 100 that was left out.

Using the q parameter for 'ASMR Crinkle Heaven 5' returns 352 results, that's why you see it in that request.

To get all videos, I would suggest using multiple search queries using a filter like publishedAfter by month/year so that each result returned is less than 500. That way you can be sure of getting them all.