我一天可以搜索多少次? Google Site Search限制?

时间:2015-07-10 02:48:25

标签: webclient google-search-api

我正在开发一种可以以编程方式从Google搜索的软件。

StringBuilder sb = new StringBuilder("http://www.google.com/search?hl=ja&num=100&q=");
sb.Append(HttpUtility.UrlEncode(kensakuword).ToString());
WebClient webClient = new WebClient();
webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
return webClient.DownloadString(sb.ToString());

如果多次使用此代码,我的工作正常,但发现如果我尝试检索超过60或70个单词,则会失败,例外如下。

{System.Net.WebException: remote server returned an error (503) 
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
System.Net.WebClient.DownloadString(Uri address)

有什么解决方案吗? 这是Google Site Search的限制吗? 似乎一个程序每天可以从Google获得一百个结果。

1 个答案:

答案 0 :(得分:1)

在60-70搜索标记之后,谷歌会插入一个验证密钥。您需要减慢您的抓取速度或雇用一个键入Captcha代码的服务。

每小时重置一次。我认为阈值大约是每小时200次搜索。

相关问题