我能够连接和设置 Bing 自定义搜索。我的问题是如何获得以下 10 个结果?是否有可能在一个请求中获得超过 10 个结果?
var subscriptionKey = "My Key";
var customConfigId = "My ID";
var searchTerm = "test";
var url = "https://api.bing.microsoft.com/v7.0/custom/search?q=" + searchTerm + "&customconfig=" + customConfigId + "&mkt=en-US";
var client = new HttpClient();
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", subscriptionKey);
var httpResponseMessage = client.GetAsync(url).Result;
var responseContent = httpResponseMessage.Content.ReadAsStringAsync().Result;
BingCustomSearchResponse response = JsonConvert.DeserializeObject<BingCustomSearchResponse>(responseContent);
for (int i = 0; i < response.webPages.value.Length; i++)
{
var webPage = response.webPages.value[i];
}