Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Results returned

0 views
Skip to first unread message

kimmy

unread,
Jun 21, 2006, 2:43:45 AM6/21/06
to
HI

Can the number of results returned, be increased from 10 to something
else.Is that possible
please

Thanks
Kimmy

singhgur...@hotmail.com

unread,
Jun 22, 2006, 3:06:29 AM6/22/06
to
This Google api sucks , i too have tried everything i can ,
but i find that number of results received cannot be increased
more than 10 . My friend if u get anything for it ,
plz let me know as i am stuck midway b/w my project due to this
problem.
I am desparetly waiting for some solution

Regards
Gurpreet
singhgur...@hotmail.com

himynam...@gmail.com

unread,
Jun 22, 2006, 3:52:56 AM6/22/06
to
Such language! *tsk*

While increasing the results returned would be nice, you can get around
it by incrementing the start point and combining your results. For
example:
for(my $i = 0; $i < 10; $i++) {
my $result = $google->doGoogleSearch($key, $query, $i, 10, 'false', '',
'false', '', 'UTF-8', 'UTF-8');
...push, or something...
}

This cuts your number of available queries in a day by 10 (in this
case), but what do you expect for free?

-
thor.

singhgur...@hotmail.com

unread,
Jun 23, 2006, 12:14:14 PM6/23/06
to

singhgur...@hotmail.com

unread,
Jun 23, 2006, 12:23:18 PM6/23/06
to
what i am trying to do is access the first 100 URLs returned by
Google for a given keyword in my C# code , but whenever i try to do so
i get
an Exception : Index out of bounds for Array
The code i am using is given below , plz see if you can help me

Sorry for the language

Regards
Gurpreet

//////////////////////////////////////////code//////////////////////////////////////////////////////////////////////

// Create a Google Search object


WebReference.GoogleSearchService s = new
WebReference.GoogleSearchService();

int start=0;
int maxresults=10;

while (start <= 100)
{

try
{


// Invoke the search method
//results retrieved cannot be greater than 10 per query


WebReference.GoogleSearchResult r = s.doGoogleSearch(licenseBox.Text,
keywordBox.Text, start, maxresults, false, "", false, "", "", "");

// Extract the estimated number of results for the search and display
it
int estResults = r.estimatedTotalResultsCount;
this.numberOfResultBox.Text = Convert.ToString(estResults);

//Adding URLs received form google to queryResult ListBox
for (int i = start; i < (start + maxresults); i++)
{

this.queryResult.Items.Add(r.resultElements[i].URL.ToString());
}


no_of_queries++;
this.queryBox.Text = Convert.ToString(no_of_queries);


}


catch (System.Web.Services.Protocols.SoapException ex)
{
this.statusBox.Text = ex.Message;
}
catch (Exception ex)
{
this.statusBox.Text = ex.Message;
}
start = start + 10;
}

kimmy

unread,
Jun 24, 2006, 1:35:12 PM6/24/06
to
Hi Thor

That seems great, have you done this, can I see it in action.

Thanks for your help

Kimmy

0 new messages