azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

CognitiveServices.Search.WebSearch problem

Open jira-zz opened this issue 1 year ago • 4 comments

Library name and version

Microsoft.Azure.CognitiveServices.Search.WebSearch

Query/Question

I have as app using this library to perform Bing searches. I used it last time circa 1 year ago and it worked. I need to use it again, but now when I do the search it returns a "NotFound" error.

Specifically the SearchAsync returns the error.

 var client = new WebSearchClient(new ApiKeyServiceClientCredentials(key));
 var webData = await client.Web.SearchAsync(query: query).ConfigureAwait(false);

Environment

.NET SDK: Version: 8.0.100
Commit: 57efcf1350 Workload version: 8.0.100-manifests.8d38d0cc

Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100\

jira-zz avatar Jan 22 '24 11:01 jira-zz

//cc: @pallavit - Can you confirm whether this library is still supported?

jsquire avatar Jan 22 '24 13:01 jsquire

So, is this library still maintained?

jira-zz avatar Jan 23 '24 13:01 jira-zz

2 years later and this is still an issue. The bing search endpoint should be https://api.bing.microsoft.com/v7.0/search?mkt=en-us&q=Yosemite%20National%20Park but SDK turns it into https://api.bing.microsoft.com/bing/v7.0/search?mkt=en-us&q=Yosemite%20National%20Park.

According to the quick start guide from the Bing Web Search API page, this is the SDK to use.

94 open issues for these docs. Sad 😢

Eonasdan avatar Mar 02 '24 18:03 Eonasdan

So the SDK is not functioning since they moved the api?

So you have to implement it manually. I haven't found an open api spec yet..

zuckerthoben avatar May 17 '24 13:05 zuckerthoben

My gosh... so this SDK is just completely broken?

For anyone who finds this in the future, follow this guide and implement the REST API directly. It's not too hard to use, the most significant thing missing is nice parsable classes for the response.

QuinnDamerell avatar Dec 30 '24 21:12 QuinnDamerell