News search API can't find content

lty 0 Reputation points
2024-04-01T08:35:02.49+00:00

Here is the request link:

Header: {"Ocp-Apim-Subscription-Key":"xxxxxxxx"}

https://api.bing.microsoft.com/v7.0/news/search?q=dollar&mkt=en-US

May I ask why I can't get the correct news? The result returned is:

{

"_type": "News",

"value": []

}

Bing News Search
Bing News Search
A Bing service that supports searching for news and get comprehensive results.
51 questions
{count} votes

1 answer

Sort by: Most helpful
  1. dupammi 8,540 Reputation points Microsoft Vendor
    2024-04-01T09:22:51.5666667+00:00

    Hi @lty

    Thank you for reaching out to the Microsoft Q&A.

    Based on the response you received, it seems that the query you are using is not returning any news articles. The response you received shows that the API returned an empty array for the "value" field. This could be due to few reasons.

    To troubleshoot further, you can try modifying your query to be more specific or adding additional filters to your query. You can also try using a different query to see if the API returns any news articles.

    If you continue to have issues, you can check your API key and subscription to ensure they are correct and active.

    Below is the repro I tried from my end, and it works as expected. See below :
    User's image

    For debugging purpose, I suggest, you try using the Bing Web Search API from Azure Portal UI. The Bing Web Search API can provide search results from billions of web documents, including news articles, images, videos, and more. The API can be called with a single API call and can be customized to refine the search results. With this, you get to know if subscription key was causing an issue or not.

    Please see belowUser's image

    I hope you understand. Thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.