Forum Moderators: coopster & phranque

Message Too Old, No Replies

Google api results

         

Stormer

11:12 am on Jul 12, 2004 (gmt 0)

10+ Year Member




How do we get total no of results found on a particular keyword..throught google API

new programmer so Plz help me out

Jay

jatar_k

10:02 pm on Jul 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hey Stormer,

personally I don't use it. Anyone else know?

claus

11:57 pm on Jul 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The URL you need is here: [google.com...]

Especially this part: [google.com...]

Look for: estimatedTotalResultsCount and estimateIsExact

Stormer

6:57 pm on Jul 15, 2004 (gmt 0)

10+ Year Member



Thanks for the reply claus

but can u plz tell me how to useestimatedTotalResultsCount and estimateIsExact
coz i got no idea how do i use that

Some sort of syntax or so.
Stormer

claus

7:46 pm on Jul 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The API uses SOAP, so you'll have to use the SOAP::Lite [soaplite.com] module or perhaps Net::Google [search.cpan.org] for Perl (i assume you're using Perl bc of the choice of forum)

As for how to use those two variables, you can store them, use them for calculations, or print them out to the screen or a web page or whatever you want.

For examples, there's an O'Reilly book called "Google Hacks" with a few examples online, and there's also the newsgroup google.public.web-apis [groups.google.com]

In a thread in that group, i found this syntax example for you:

my $results = $googleSearch -> doGoogleSearch($key, $query, $offset,
10, "false", "", "false", "", "latin1", "latin1");
print "About $results->{'estimatedTotalResultsCount'} results.\n";

Stormer

5:41 am on Jul 20, 2004 (gmt 0)

10+ Year Member



Thanks claus

It worked

Stormer