Reputation: 635
With order:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=[insert channel]&maxResults=50&q=test&order=date&key=[insert key]
{
"kind": "youtube#searchListResponse",
"etag": "\"I_8xdZu766_FSaexEaDXTIfEWc0/R9NZ3g9CCU-WWS_B-18JkAocaJ0\"",
"nextPageToken": "CDIQAA",
"regionCode": "LB",
"pageInfo": {
"totalResults": 66,
"resultsPerPage": 50
},
"items": [] <--- Nothing
}
Changing to next page using the token also shows nothing.
Why are there no items even if there are results?
Note: Removing the order date will result in many results and items showing. This is because the default value is relevance and thus the query is no longer just 'test'. Is it possible that not all those results have items? can there be a result without an associated item?
Upvotes: 0
Views: 123
Reputation: 46
I'm confused about this too. I'm seeing the same results, where if I don't specify order or tell it to be "relevance" I get tons of items in the JSON. But if I specify any other order, I get significantly less results in the totalResults field, and nothing in the items list. That seems buggy, as either way, the method of ordering shouldn't affect the number of results. And in addition, like you were wondering, it doesn't seem to make sense that the number of totalResults wouldn't be the same as the number of records in items. Sorry I don't have a better fix, though.
Upvotes: 1