How can I limit the number of returned Google search results in this C# program?
问题 I just want to return four results with the following C# snippet. How can I accomplish this? I know I could probably just parse the returned results, but I'd rather just grab only four to begin with, if that's possible. var searchTerm = "pizza boxes"; using (var web = new WebClient()) { web.Headers.Add("Referrer", "http://localhost:49360/"); var result = web.DownloadString(String.Format( "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={0}", searchTerm)); Console.WriteLine(result)