title: Google Search API throws error with valid parameters
body: <p>I am using Google.Apis.Customsearch.v1 to make custom google search. The query takes <code>num</code> and <code>start</code> parameter for pagination. As per the google's documentation <a href="https://developers.google.com/custom-search/docs/xml_results#startsp" rel="nofollow">here</a> for <code>start</code> and <code>num</code> query parameters</p>
  
  <p><strong>start</strong></p>
  
  <blockquote>
    <p>Optional. The start parameter indicates the first matching result that should be included in the search results. The start parameter uses a zero-based index, meaning the first result is 0, the second result is 1 and so forth.</p>
    
    <p>The start parameter works in conjunction with the num parameter to determine which search results to return. Note that no more than 1000 results will ever be returned for any query, even if more than 1000 documents match the query, so setting start to 1000 or more will produce no results.</p>
  </blockquote>
  
  <p><strong>num</strong> </p>
  
  <blockquote>
    <p>Description<br>
    Optional. The num parameter identifies the number of search results to return.</p>
    
    <p>The default num value is 10, and the maximum value is 20. If you request more than 20 results, only 20 results will be returned.</p>
    
    <p>Note: If the total number of search results is less than the requested number of results, all available search results will be returned.</p>
  </blockquote>
  
  <p>However when i set <code>start</code> to 0 and <code>num</code> to 20 i get error</p>
  
  <blockquote>
    <p>{"Google.Apis.Requests.RequestError\r\nInvalid Value [400]\r\nErrors [\r\n\tMessage[Invalid Value] Location[ - ] Reason[invalid] Domain[global]\r\n]\r\n"}</p>
  </blockquote>
  
  <p>Here is my code</p>
  
  <pre><code>        CustomsearchService customSearchService =
              new CustomsearchService(new Google.Apis.Services.BaseClientService.Initializer() { ApiKey = apiKey });
      Google.Apis.Customsearch.v1.CseResource.ListRequest listRequest = customSearchService.Cse.List(query);
      listRequest.Cx = searchengineid;            
      listRequest.Start = 0;
      listRequest.Num = 20;
      Search search = listRequest.Execute();
  </code></pre>
  
  <p>I had to set <code>start</code> to 1 and <code>num</code> to 10 to get it to work. So why its not working as per the documentation</p>