NAME

Search::Google - Perl OO interface to the Google REST API for searching

VERSION

This documentation refers to Search::Google version 1.0.0

SYNOPSIS

use Search::Google::Web;

# you should provide a valid http referer address according
# to Google AJAX Search API terms of use!
Search::Google::Web->http_referer('http://example.com');

my $search = Search::Google::Web->new(
	v => '1.0',
	q => 'Larry Wall',
);

die "response status failure" if $search->status != 200;

my $data = $search->data;

my $cursor = $data->cursor;

printf "pages: %s\n", $cursor->pages;
printf "current page index: %s\n", $cursor->currentPageIndex;
printf "estimated result count: %s\n", $cursor->estimatedResultCount;

my @results = $data->results;

foreach my $r (@results) {
	printf "\n";
	printf "title: %s\n", $r->title;
	printf "url: %s\n", $r->url;
}

DESCRIPTION

Search::Google contains set of modules that provides OO interface to the Google REST (aka AJAX) API for searching.

TODO

METHODS

TODO

CLASSES

Search::Google::Web
Search::Google::Blogs
Search::Google::Books
Search::Google::Images
Search::Google::Local
Search::Google::Video
Search::Google::News

WARNING

This is alpha software. If you like this module, please provide us with failing tests and API suggestions.

DEPENDENCIES

TODO

SEE ALSO

http://code.google.com/p/search-google/ Search::Google project on Google code

http://code.google.com/apis/ajaxsearch/documentation/#fonje to learn how to use Google AJAX API in non-Javascript environments.

http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje for object specification.

LICENSE AND COPYRIGHT

Copyright 2008, Eugen Sobchenko <ejs@cpan.org> and Sergey Sinkovskiy <glorybox@cpan.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.