azure-sdk-for-net
azure-sdk-for-net copied to clipboard
CognitiveServices.Search.WebSearch problem
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\
//cc: @pallavit - Can you confirm whether this library is still supported?
So, is this library still maintained?
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 😢
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..
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.