Question

According to : http://code.google.com/apis/ajaxsearch/documentation/#fonje

I get back a cursor result, but stupidly, the moreResultsUrl returns a URL NOT to the JSON service but to the main site - how do instead fetch the next page of results into JSON?

Was it helpful?

Solution

Well, that's because moreResultsUrl is pointing to http://www.google.com/search instead of http://ajax.googleapis.com/ajax/services/search/web.

What you need are just the parameters of the moreResultUrl which you can pass to http://ajax.googleapis.com/ajax/services/search/web for the JSON result.

For example:

http://www.google.com/search?v=1.0&q=Luca

is translated in JSON with

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Luca

Google is just showing you their RESTful api, it's up to you to use the pages JSON value with whatever interface you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top