Azure-Samples/cognitive-services-REST-api-samples

BingWebSearchv7.java API Error

Opened this issue · 0 comments

HI,

I am running BingWebSearchv7.java as it is with my custom query and API key value.

I am getting the following error--

java.io.FileNotFoundException: https://api.bing.microsoft.com/bing/v7.0/search?q=site%3Alinkedin.com++%22Owner%22++%22Web+Hosting%22+
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at BingWebSearch.SearchWeb(BingWebSearch.java:88)
at BingWebSearch.main(BingWebSearch.java:44)

I have correctly specified the API key and request URL. However, the above error typically occurs for a File Not Found (404 or 410).

Please let me know what is wrong here?

The URL I am searching for is here--

"https://api.bing.microsoft.com/bing/v7.0/search?q=site%3Alinkedin.com++%22Owner%22++%22Web+Hosting%22+"

Yours sincerely,
Arvind.