GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::Google::Search(3) User Contributed Perl Documentation Net::Google::Search(3)

Net::Google::Search - simple OOP-ish interface to the Google SOAP API for searching

 use Net::Google::Search;
 my $search = Net::Google::Search->new(\%args);

 $search->query(qw(aaron cope));
 map { print $_->title()."\n"; } @{$search->results()};

 # or

 foreach my $r (@{$search->response()}) {
   print "Search time :".$r->searchTime()."\n";

   # returns an array ref of Result objects
   # the same as the $search->results() method
   map { print $_->URL()."\n"; } @{$r->resultElement()}
 }

Provides a simple OOP-ish interface to the Google SOAP API for searching.

This package is used by Net::Google.

According to the Google API docs :

 "In order to support searching documents in multiple languages 
 and character encodings the Google Web APIs perform all requests 
 and responses in the UTF-8 encoding. The parameters <ie> and 
 <oe> are required in client requests but their values are ignored.
 Clients should encode all request data in UTF-8 and should expect
 results to be in UTF-8."

(This package takes care of setting both parameters in requests.)

Valid arguments are :
  • key

    string. A Google API key.

    If none is provided then the key passed to the parent Net::Google object will be used.

  • starts_at

    int. First result number to display.

    Default is 0.

  • max_results

    int. Number of results to return.

    Default is 10.

  • lr

    string or array reference. Language restrictions.

  • safe

    boolean.

  • filter

    boolean.

  • http_proxy

    url. A URL for proxy-ing HTTP requests.

  • debug

    Valid options are:

  • boolean

    If true prints debugging information returned by SOAP::Lite to STDERR

  • coderef.

    Your own subroutine for munging the debugging information returned by SOAP::Lite.

The object constructor in Net::Google 0.53, and earlier, expected a GoogleSearchService object as its first argument followed by a hash reference of argument. Versions 0.6 and higher are backwards compatible.

Returns an object. Woot!

Get/set the Google API key for this object.

Get/set the HTTP proxy for this object.

Returns a string.

If the first item in @data is empty, then any existing query data will be removed before the new data is added.

Returns a string of words separated by white space. Returns undef if there was an error.

Returns an int. Default is 0.

Returns undef if there was an error.

The default set by Google is 10 results. However, if you pass a number greater than 10 the results method will make multiple calls to Google API.

Returns an int.

Returns undef if there was an error.

If the first item in @types is empty, then any existing restrict data will be removed before the new data is added.

Returns a string. Returns undef if there was an error.

Returns true or false. Returns undef if there was an error.

Returns true or false. Returns undef if there was an error.

Language restriction.

If the first item in @lang is empty, then any existing lr data will be removed before the new data is added.

Returns a string. Returns undef if there was an error.

Toggle whether or not to return all the results defined by the '__estimatedTotalResultsCount' key.

Default is false.

Returns an array ref of Net::Google::Response objects, from which the search response metadata as well as the search results may be obtained.

Use this method if you would like to receive a full response as documented in the Google Web APIs Reference (the whole of section 3).

Returns an array ref of Result objects (see docs for Net::Google::Response), each of which represents one result from the search.

Use this method if you don't care about the search response metadata, and only care about the resources that are found by the search, as described in section 3.2 of the Google Web APIs Reference.

Returns true or false depending on whether or not the current in-memory session has exhausted the Google API 1000 query limit.

1.0

$Date: 2006/01/12 03:37:31 $

Aaron Straup Cope

Marc Hedlund <marc@precipice.org>

Add hooks to manage boolean searches and speacial query strings.

Net::Google

Copyright (c) 2002-2005, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.