Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

REST::Google::Search, help needed

by downer (Monk)
on Mar 23, 2009 at 19:49 UTC ( [id://752696]=perlquestion: print w/replies, xml ) Need Help??

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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://752696]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found