today | current | recent | random ... categories | search ... who ... syndication

Michael Boyle : Can someone please tell me why, or if, I should care about the newly-beta-released Google Web APIs?

Despite the fact that I've spent a good chunk of the last 24 hours writing Perl code to deal with the API, I too have been asking much the same question. Here's one possible answer : you can use the API to write a search interface for your website in a handful of lines...



my $google = Net::Google->new(key=>LOCAL_GOOGLE_KEY);



my $search = $google->search();







# Or replace "michael boyle" with $cgi->param("query")



$search->query(qw(michael boyle));



$search->query("site:aaronland.net");







map { print $_->URL()."\n"; } @{$search->results()}







# Prints :



http://www.aaronland.net/weblog/theory/



http://www.aaronland.net/weblog/archive/936



http://www.aaronland.net/weblog/archive/1951



http://www.aaronland.net/weblog/category/40



see also : Nathan Torkington on commercial web services

refers to

meta

 
Me : Net::Google.pm 0.2 ←  → The dictified dictionary.com word of the day is : jocund