title: Using Google Custom Search Engine through the google-api-client gem
body: <p>I'm trying to wrap up a rather basic search using the Google Custom Search Engine API.
  The problem I'm facing is that the only results I'm apparently able to get are the first 10:</p>
  
  <pre><code>module WalterSobchak
    class GoogleCustomSearch
      def initialize
        @client = Google::APIClient.new(
          key: configatron.google.api_key, authorization: nil)
        @search = @client.discovered_api('customsearch')
      end
  
      def query(q, num)
        @client.execute(api_method: @search.cse.list,
          parameters: {q: q, startIndex: num,
                       key: configatron.google.api_key,
                       cx: configatron.google.custom_search_engine})
      end
    end
  end
  </code></pre>
  
  <p>This code is quite simple but works quite well: first of all I initialize my GCS client using my api_key, I can then call it with whatever parameter I like, for example:</p>
  
  <pre><code>client.query('poker', 10)
  </code></pre>
  
  <p>to search my Custom Engine with the string 'poker' and starting from the 10th element of the resultset. My problem is that it doesn't work, I alway get the same result I would get without the startIndex option. The problem is probably that I have no idea if that parameter is named that way, or if it's the right one I can use: I've tried startIndex, start, start_index, num (this one works, but max value is 10, and I need at least 30 results), sometimes the parameter is rejected, sometimes it doesn't cause any effect.</p>
  
  <p>Has anyone done something like this before and can help me?</p>