Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3642

Random order from YouTube /v3/search API

$
0
0

I'm using the YouTube API V3 search endpoint, and the order of videos I get is seemingly random between refreshes. In some cases the videos will appear in the right order, and a couple of refreshes later the contents change.

I'm sorting by date, but it doesn't seem to do the trick. Here's an example of what I'm calling:

https://www.googleapis.com/youtube/v3/search?key={API_KEY}&channelId={CHANNEL_ID}&maxResults=18&part=snippet%2Cid&order=date

For example, in one refresh I got a video uploaded a week ago first, and on the second one a video uploaded 3 weeks ago is first, with a random set of videos missing as if the return is not ordered at all.

Is this not the correct endpoint for this, or is there some sort of undocumented property to get things back in a consistent order? I've seen other posts complaining of a similar problem, but that seems to have been resolved as far back as 2019.


Viewing all articles
Browse latest Browse all 3642

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>