I need to fetch any term on Google and get a list of the results of that search. I'm trying to do this using the Google Custom Search API but I'm not getting satisfactory results.
For example, when I search for the term "bidding" with my code I get 1,510,000 results. When I search for the same direct term in the browser I get 11,800,000 results.
How do I get all 11,800,000 from this survey?
Below is my code in C #:
static void Main(string[] args)
{
string apiKey = "AIzaSyCVGlnfsGaaJ3HYTHVu6OH_jBaIFJQYrH0";
string cx = "013638634553566051485:xwnfxqp2pso";
string query = "licitações";
var svc = new Google.Apis.Customsearch.v1.CustomsearchService(
new BaseClientService.Initializer { ApiKey = apiKey });
var listRequest = svc.Cse.List(query);
listRequest.Cx = cx;
var search = listRequest.Execute(); //listRequest.Fetch(); This method has been removed
foreach (var result in search.Items)
{
Console.WriteLine("Title: {0}", result.Title);
Console.WriteLine("Link: {0}\n", result.Link);
}
Console.ReadKey();
}