YouTube search API returns different results to a

2019-06-25 23:36发布

I am using the YouTube v3 API to search for videos. In some cases, the results returned from the API are completely different to the results I get when using exactly the same query string manually on the YouTube site. Please can anybody explain why this would happen

For example search for "Zombie Hunting Stiletto Style Spring Assisted Open Pocket Knife"

Via the API the first 10 results are :

Iulyke14P7c
vCjOCf20Uv8
gKNBLil4_uk
0eKNL-dQR_Q
PL0sC12k5-U
GGjHrmw-4Kc
ylLsWVcLh-w
QEn_ysLPdUI
Ds7XwIBgI6Q
NXuxKtcsSik

Manually on YouTube front end, the first 10 results are :

LstcGDEAsWw
Iulyke14P7c
dXPjpUvJkaA
_wYuBvvS63w
SVdwocDkZL0
HwNJgu8UCtM
vCjOCf20Uv8
Ok3jlNBr1bc
mRq4eapV1wk
1T93YAMQ5V0

Only 2 are the same (but at different position) the rest are all different

Thanks

1条回答
forever°为你锁心
2楼-- · 2019-06-25 23:42

I try with your example.

Well it depends with the options you chose in the API. There is so much options like :

location
order
publishedAfter
publishedBefore
type 
...

Yopu can find all the options on https://developers.google.com/youtube/v3/docs/search/list

"the Youtube search" has his options, and you need to chose your options in the API.
Understand the "search" of YouTube is not so simple. My guess, they use lots of options regarding your last videos that you seen, your country etc etc.

But basically, the resultat is corresponding with what you want. There is no weird things, you just need to take the good options regarding what you want in your app.

查看更多
登录 后发表回答