youtube api vs regular search query differences?

2019-09-06 18:03发布

问题:

I don't understance the difference returned via regular youtube searches versus ones performed by the api.

Here's my example query: http://gdata.youtube.com/feeds/api/videos?q=Alien Moons the universe&max-results=25&v=2&duration=long

The first result on youtube's regular search is what I'm looking for (Alien Moons Documentary, 44:28 in length). The same video is in the results of the API query, but it's not in the same order-- it's like half way down the list of results.

Isn't the whole point that the API is supposed to allow easy access to regular searches? I even tried adding the &orderby=relevance tag, but it doesn't help.

回答1:

We don't guarantee that the website and the API will always return results in the same order, no.

That being said, I'm seeing video id 8Jucta-ZwxY returned as the first result for both the web and API searches. You might be running into some region-specific customization, or something else—again, the results will not necessarily match.



标签: youtube-api