tags:

views:

410

answers:

3

Is there an API for google that I can use in my Perl program so that it returns number of results found for a search term?

Whenever a search is done on google, on the far right, it has a number of results it found and the time it took. I would just like to get this information.

A: 

I'm not sure if this is quite what you're looking for, but you could check to see if it supports your use model: Google Ajax Search API.

bedwyr
See my answer for a couple of Perl modules that use that API.
cjm
+2  A: 

The CPAN module Net::Google::Search implements Google's SOAP API for searching.

friedo
+6  A: 

Google deprecated their SOAP API a couple years ago. Try using REST::Google::Search or Google::Search, which use their AJAX API instead. I haven't had occasion to try either module myself, so I'm not sure which one is better.

cjm