Does anyone know where I can find the latest documention for Bings API with the following URL:
https://api.datamarket.azure.com/Bing/Search/v1/Web
Even their own website has the wrong URL in the word docs I have been reading, i.e. https://api.datamarket.azure.com/Bing/SearchWeb/Web does not work.
I can get the search to work and return results, but cannot get the total record count, if I use composite I can get record count but no results.
I just looking for an up-to-date example of how to get both count and results.
This is what I have so far:
public class GetBingTotalRecordCount
{
public IEnumerable<DisplayBingWebSearch> DisplayBingSearchResults(string q)
{
string BingID = ConfigurationManager.AppSettings["Bing_WebSearchID"];
string BingWebSearch
= ConfigurationManager.AppSettings["Bing_WebSearchURL"];
var BingContainer = new Bing.BingSearchContainer(new Uri(BingWebSearch));
BingContainer.Credentials = new NetworkCredential(BingID, BingID);
var query = BingContainer.Composite("Web", HttpUtility.UrlEncode(q),
"EnableHighlighting", "DisableQueryAlterations", "en-GB", "Strict",
null, null, null, null, null, null, null, null, null
).Execute().First();
List<DisplayBingWebSearch> data = new List<DisplayBingWebSearch>();
foreach (var results in query.Web)
{
data.Add(new DisplayBingWebSearch() {
WebTitle = results.Title
});
}
return data;
}
}