Bings Search API always returns the same 10 results
- by Dofs
I am trying to figure Bings Seach API out. I have added the SOAP service to my solution, and I do receive results. The issue, is that the displayed results are always the same, not matter what I have set the request.Web to. When I do the search, it displays 98 results, so it isn't the lack of results.
BingService soapClient = new BingService();
string resp = string.Empty;
SearchRequest request = new SearchRequest();
request.AppId = ConfigurationManager.AppSettings["BingKey"];
request.Sources = new BingLiveSearchService.SourceType[] { SourceType.Web };
request.Query = query;
request.Web = new BingLiveSearchService.WebRequest { Count = 10, Offset = 10 };
var response = soapClient.Search(request);
if (response.Web != null && response.Web.Total > 0)
{
resp += "TOTAL COUNT:"+response.Web.Total +"<br/><br />";
foreach (var item in response.Web.Results)
{
resp += "<div style='padding-bottom:10px;'>" + item.Title + "</div>";
}
}