get autosuggestions via Bing Search API v2

我只是一个虾纸丫 提交于 2019-12-09 13:57:55

问题


How might one be able to get the list of autosuggestions for a given search from Bing Search API like in the screen capture below? This doesn't seem to be among the results provided by choices of [Web|Image|Video|News|SpellingSuggestion|RelatedSearch]. Alternatively, does Google provide this?

As background, Bing can be queried via REST API using a query string, such as this URL (note it requires a developer key for basic auth). One can change the 'Web' keyword to get other results, but I'd really like to get the suggestions specifically:

https://api.datamarket.azure.com/Bing/Search/Web?Query=%27sushi%27&$format=JSON&$top=5

Bing Developer docs


回答1:


There is an api route directly to the Bing suggestion list. Interestingly, this is separate from the developer API list. Currently the link is

api.bing.com/osjson.aspx?query=[URI encoded search term here]



来源:https://stackoverflow.com/questions/15048560/get-autosuggestions-via-bing-search-api-v2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!