Azure Bing News Search: Same results are appearing in all news categories

Chandra 26 Reputation points
2021-06-30T00:29:26.383+00:00

Here are the Bing news API URLs that I am calling for fetching categorical news. As shown in the image attached, the results are repeating for each and every category - Business, Tech, Politics, Sports etc.

YA0hDdW

  1. US Politics URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=politics
  2. US Entertainment URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=entertainment
  3. US Lifestyle URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=lifestyle&q=lifestyle beauty fashion health decor
  4. US Sports URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=sports
  5. US Business URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=business
  6. US Science and Technology URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US&category=scienceandtechnology
  7. US World URL:https://api.cognitive.microsoft.com/bing/v7.0/news/search?count=100&originalImg=true&safeSearch=Moderate&sortBy=Date&freshness=Day&mkt=en-US
  8. USHeadlines URL:http://api.serpstack.com/search?access_key=0580810c0b4c340a6d3ae40d692b417b&type=news&period=last_day&sort=date&device=mobile&query=usa news headlines
    9.
Bing News Search
Bing News Search
A Bing service that supports searching for news and get comprehensive results.
43 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 42,116 Reputation points Microsoft Employee
    2021-06-30T10:30:27.357+00:00

    @Chandra It looks like the image you attached did not make it but I think I understand your issue. You are using the category parameter with the news search endpoint i.e the endpoint is https://api.cognitive.microsoft.com/bing/v7.0/news/search
    Please try the same with just the news endpoint https://api.cognitive.microsoft.com/bing/v7.0/news

    This is documented in the endpoints section and the news API reference.

    Entertainment:

    110642-image.png

    Politics:

    110586-image.png

    Also, your endpoint seems to refer to cognitive services resource of bing, this is now migrated to bing and any new resource that is created uses https://api.bing.microsoft.com after Oct 30 2020.


0 additional answers

Sort by: Most helpful