title: Google Custom Search API start=100 causes error 400
body: <p>I have a script that uses Google Custom Search API, iterating through multiple results pages.</p>
  
  <pre><code>https://www.googleapis.com/customsearch/v1?key=[[KEY]]&amp;num=10&amp;hl=en&amp;start=0&amp;cx=[[CX]]&amp;q=%22bank%22&amp;sort=date&amp;googlehost=www.google.com
  
  https://www.googleapis.com/customsearch/v1?key=[[KEY]]&amp;num=10&amp;hl=en&amp;start=10&amp;cx=[[CX]]&amp;q=%22bank%22&amp;sort=date&amp;googlehost=www.google.com
  
  https://www.googleapis.com/customsearch/v1?key=[[KEY]]&amp;num=10&amp;hl=en&amp;start=20&amp;cx=[[CX]]&amp;q=%22bank%22&amp;sort=date&amp;googlehost=www.google.com
  </code></pre>
  
  <p>In all of the above examples, I get proper responses. The query response claims that there are 17,900 results to the search.
  When the script reaches start=100, however:</p>
  
  <pre><code>https://www.googleapis.com/customsearch/v1?key=[[KEY]]&amp;num=10&amp;hl=en&amp;start=100&amp;cx=[[CX]]&amp;q=%22bank%22&amp;sort=date&amp;googlehost=www.google.com
  </code></pre>
  
  <p>I receive the following response (this is the JSON response transformed into a PHP object):</p>
  
  <pre><code>stdClass Object (
          [error] =&gt; stdClass Object
              (
                  [errors] =&gt; Array
                      (
                          [0] =&gt; stdClass Object
                              (
                                  [domain] =&gt; global
                                  [reason] =&gt; invalid
                                  [message] =&gt; Invalid Value
                              )
                      )
                  [code] =&gt; 400
                  [message] =&gt; Invalid Value
              ) )
  </code></pre>
  
  <p>This is despite the fact that the results I receive in start=90 claim that the next page exists:</p>
  
  <pre><code>"nextPage": [
     {
      "title": "Google Custom Search - \"bank\"",
      "totalResults": "17900",
      "searchTerms": "\"bank\"",
      "count": 10,
      "startIndex": 100,
      "inputEncoding": "utf8",
      "outputEncoding": "utf8",
      "safe": "off",
      "cx": "[[CX VALUE]]",
      "sort": "date",
      "googleHost": "www.google.com",
      "hl": "en"
     }
    ]
  </code></pre>
  
  <p>Playing around with the API shows that this invalid value error appears exactly when start=92.
  Furthermore, this is the exact page where this error appears for every keyword search.
  Any help with the issue would be appreciated. Is this because this is a free version of Google Custom Search?</p>