downer has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to get the top ~100 results for a small set of google queries for an experiment in Predictive indexing. The REST::Google::Search seems to be of great potential help, but it only gives 4 results. The documentation seems pretty poor on cpan, Can anyone help me control the number of results? Additionally, I have a google key, is there a way to input this? thanks! downer.

Replies are listed 'Best First'.
Re: REST::Google::Search, help needed
by olus (Curate) on Mar 23, 2009 at 20:31 UTC

    I installed the module and went looking into the documentation, and somewhere it says

    Please refer to 'Google Search AJAX API' documentation for complete list of arguments for Google Search.

    There I found that there is the rsz argument

    This optional argument supplies the number of results that the application would like to receive. A value of small indicates a small result set size or 4 results. A value of large indicates a large result set or 8 results. If this argument is not supplied, a value of small is assumed.
    If you read it, you'll also find key=your-key

    my $res = REST::Google::Search->new( q => 'Larry Wall', rsz => 'large', # get 8 results per request );
      that helps, thanks. Is there now a way to see the 2nd, 3rd, ... set of pages?