Youtube API search

2019-02-25 04:09发布

问题:

I have been trying out the youtube API with Java. When I do a search using the API I don't get the same results as when I just type the keyword in the browser, any logical explanation why this is?

Compare: http://www.youtube.com/results?search_query=blah+&aq=f

http://pastebin.com/FVRd3URT (list of video Titles)

I also noticed that some videos (or at least their title) are duplicated.

回答1:

No, it's just how it is. Trying to match up the two is a futile exercise.

Amazon search has the same problem.



回答2:

YouTube API version 3 gets the same search results. Version 3 is still experimental, according to the documentation. https://developers.google.com/youtube/v3/docs/search/list



回答3:

This demo might help.

https://github.com/bitsabhi/YouTubeDemo

A java project to return title, album, you tube link when the user searches for any songs. Uses You tube search API.



回答4:

I have the same problem.

It is as if the API queries don't support full text search - results through the API are the same as if you enter "my search query" in quotes.

Although, try setting a slightly larger time frame: 'today' might be different from 'last_week', and you may get more relevant results.



标签: youtube-api