Okay, it seems that every question I post gets voted down, so I have went over the FAQ again, and I'm not sure what I'm doing wrong. If you are going to vote down the post, I would really appreciate some sort of comment or feedback letting me know what the stackoverflow community expects from a "good question" or how to properly ask I guess?.....

I'm having trouble figuring out how to get "Top news" or "Most popular" news from the Bing(azure) API.

I am able to search for "" and get all news results(most recent), but I can't figure out a way to pull the "Top news"(see top stories section here: http://www.bing.com/news?q=top+stories&FORM=Z9LH3 )

I've looked through the documentation with no luck, and searched google. Does anyone know if Bing offers this functionality as part of their API?

Any suggestions?

有帮助吗?

解决方案

The best way to figure out a Bing API query is to use the Azure "Service Explorer" tool...

If you look at your initial URL you are simply looking at the news section with the query "top stories". In that case, I believe this is the query you're looking for:

https://api.datamarket.azure.com/Bing/Search/v1/Composite?Sources=%27news%27&Query=%27top%20stories%27&Options=%27EnableHighlighting%27

Also, the documentation landing page for reference, describes the API parameters in some more detail.

其他提示

The selected answer is incorrect.

According to Microsoft Support,

...bing.com and Bing Search API do not provide feature or query results parity...

The selected answer will return results from the News API which contain or are relevant to the Query top stories. It will not return the same results as the Bing.com News (Top Stories) page.

In the new API, the Breaking News query (an empty query parameter in Bing.com API v2) is not possible, as an empty query like https://api.datamarket.azure.com/Bing/Search/v1/Composite?Sources=%27news%27&Query=%27%27&Options=%27EnableHighlighting%27will return a small set of old (for me, October 2014) items.

I have a ticket in to Microsoft Support about this, and will update once I hear more.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top