我无法通过谷歌搜索api获得50个结果记录


i am not able to get 50 results records by google search api

这是我的代码。这对10张唱片来说很好。但是当我增加数字时,它会提示错误。请检查一下,如果你有任何解决方案请告诉我。

    Thanks in advance,
    Ravi Sharma
    Softobiz Technologies 
<?php
    # JSON SEARCH RESULT
    // This example request includes an optional API key which you will need to
    // remove or replace with your own key.
    // Read more about why it's useful to have an API key.
    // The request also includes the userip parameter which provides the end
    // user's IP address. Doing so will help distinguish this legitimate
    // server-side traffic from traffic which doesn't come from an end-user.
    $url = 'https://www.googleapis.com/customsearch/v1?key=AIzaSyC4o52-Q90FxNzMxY9FNryrONierFS3la8&cx=016278085151347603490%3Affuoqez1cew&q=ravi&num=20';
    // sendRequest
    // note how referer is set manually
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_REFERER, '202.164.43.51');
    $body = curl_exec($ch);
    curl_close($ch);
    // now, process the JSON string
    $array = json_decode($body);
    // now have some fun with the results...
    echo "<pre>";
    print_r($array);
    ?>

同样来自文档:

Pagination
This API can return the first 100 search results, in chunks (pages) up to 10 search results long. You can specify the page of search results to return using the start and num query parameters.

From http://code.google.com/apis/websearch/

注意:Google Web Search API已于2010年11月1日正式弃用。它将继续按照我们的弃用政策工作,但您每天可以发出的请求数量将受到限制。因此,我们建议您使用新的自定义搜索API。

: http://code.google.com/apis/soapsearch/api_faq.html tech8

8。是否对每个查询可以接收的结果数量有限制?

是的。每个查询最多可以检索10个结果,对于任何给定的查询,不能访问超过第1000个结果的信息。

您遇到的是单个请求结果限制。