More then 25 search results?

56 views
Skip to first unread message

NeilM

unread,
May 29, 2008, 3:36:28 PM5/29/08
to Google AJAX API
I'm trying to make an application which does an image search for a
particular term and works with the results. This worked fine, up
until I tried to get more then 25 images. Then I just get an error
code. Does anyone know how to get more search results?

Works:
http://ajax.googleapis.com/ajax/services/search/images?q=Paradise&v=1.0&rsz=large&start=24

Doesn't work:
http://ajax.googleapis.com/ajax/services/search/images?q=Paradise&v=1.0&rsz=large&start=25

Returns:
responseData": null, "responseDetails": "out of range start",
"responseStatus": 400}

jgeerdes [AJAX APIs "Guru"]

unread,
May 29, 2008, 6:25:43 PM5/29/08
to Google AJAX API
You cannot load more than 32 results with the AJAX Search API. And
since you would get those results 8 at a time, you can't specify a
start position greater than 25. If you want more image results, you
should probably use the Yahoo! Image Search API.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

for more information or a project quote:
http://jgeerdes.home.mchsi.com
jgee...@mchsi.com

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

edmond

unread,
Jun 1, 2008, 11:11:17 PM6/1/08
to Google AJAX API
what kind of API can i use to get more than 32 results, Google Data
API or the old Google soap search API??

On May 30, 6:25 am, "jgeerdes [AJAX APIs \"Guru\"]"
<jgeer...@mchsi.com> wrote:
> You cannot load more than 32 results with the AJAX Search API.  And
> since you would get those results 8 at a time, you can't specify a
> start position greater than 25.  If you want more image results, you
> should probably use the Yahoo! Image Search API.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> for more information or a project quote:http://jgeerdes.home.mchsi.com
> jgeer...@mchsi.com

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 2, 2008, 6:45:25 AM6/2/08
to Google AJAX API
Google Data is not connected to search services; it's for visualizing
data. The SOAP Search API would have done it, but it has been
deprecated since late 2006 such that no new license keys are being
distributed. If you need more than 32 results, there are three
possible solutions that I'm aware of, each with their advantages
(pros) and disadvantages (cons), and none of which are by Google:

Yahoo!'s web search API. Pros: simple REST API which can be directly
accessed via Javascript or virtually any server-side language; offers
up to 1,000 results in chunks of up to 50 at a time; offers results in
at least three different formats: xml, json, and serialized php.
Cons: no access to Google search services, only Yahoo!; only offers up
to 1,000 results in chunks of up to 50 at a time; sparse documentation
and no significant developer community; per-IP address rate limit of
5,000 queries/24-hour period; absolutely no UI elements for use with
Javascript (so if you want to build a client-side approach to skirt
the rate limit, you have to build it from scratch almost); you're
expected to route any links through Yahoo!'s servers so they can track
traffic.

Windows Live/MSN SOAP API. Pros: simple SOAP API which can be directly
accessed via virtually any server-side language; offers up to 1,000
results (but I can't remember the chunk sizes). Cons: no access to
Google search services or even Yahoo!, only Windows Live/MSN Search;
only offers up to 1,000 results; Microsoft wrote the documentation
(yes, that is a MAJOR con), and there's even less developer community
than Yahoo! has; there is a rate limit, but I can't remember what it
is; SOAP API has no way to access via Javascript on the client-side,
thus reducing load on the server(s).

Alexa Web Search API (provided by Amazon). Pros: simple REST API which
can be directly accessed via virtually any server-side language;
offers up to 5,000 results in flexible increments; there is an option
to get up to 10 million results; offers a "grep the web" feature;
returns results in relatively simple xml format. Cons: no access to
Google search services; there is per-request fee for using the service
based on the complexity of the query, the number of results, and a
number of other things (i.e., it can quickly get very complicated, as
the 10 million results and grep the web features on priced totally
differently, too); if you request more than 20 results at a time, you
have to pay more; documentation is really sparse and there is no
developer community to speak of; no way to access via Javascript on
the client-side, thus reducing the load on the server(s).

You will notice that each of these services has a number of things in
common, but probably the most significant is that they all have some
sort of limit on the number of results you can retrieve: even the
5,000 result limit of Alexa limits its usefulness in heavy-lifting SEO
applications and other areas where you would need loads of results.
And while Alexa does offer the ability to retrieve up to 10 million
results and/or use their grep the web feature, the fact that there is
a complicated fee structure associated with any request makes it
significantly less attractive for most everyday uses, I think.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jgee...@mchsi.com

edmond

unread,
Jun 2, 2008, 7:39:09 AM6/2/08
to Google AJAX API
thank u!! thank u very much!!

On Jun 2, 6:45 pm, "jgeerdes [AJAX APIs \"Guru\"]"
> jgeer...@mchsi.com

NeilM

unread,
Jun 2, 2008, 1:38:26 PM6/2/08
to Google AJAX API
Interesting. Could you guess as to how piclens for firefox
http://www.piclens.com/site/firefox/win/ manages to get a lot more
then 32 results from google? Would they be scraping the html?

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 2, 2008, 2:04:49 PM6/2/08
to Google AJAX API
I couldn't even guess. It could be that they had a SOAP API key; it
could also be that they signed an independent deal with Google (I know
Google has done this from time to time). I would hope that they're
not screenscraping because I suspect that, sooner or later, Google
Legal (Beta) will have a heyday with them.

jg

MeMeMe

unread,
Jun 2, 2008, 7:09:45 PM6/2/08
to Google AJAX API
Hi folks :)

@jgeerdes: why is it that googles ajaxsearch is hardcoded to return a
max of 32 results only? i can understand the concept of chunks .. but
a max # results?

it's very upsetting to see that we can't use google search to our
maximum ability. Example scenarios: using google search ajaxsearch to
show pages that contain specific keywords, in your own site. So if i
was a newspaper website, i could use ajaxsearch to display all
articles that contains the keywords provided.

:(

are you also saying that to get past the 32 limit we need to purchase
a key?

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 2, 2008, 10:19:37 PM6/2/08
to Google AJAX API
Since I don't work for Google, I have no idea what arrangements they
will make to serve individual customers' needs. But for my thoughts
on the 32 result limit and other functionality of the AJAX Search API,
check out my post linked below:

http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/a38b8b64e12825c/8db454e06411c664?lnk=gst&q=author%3Ajgeerdes+result+limit#8db454e06411c664

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:

MeMeMe

unread,
Jun 3, 2008, 12:54:28 AM6/3/08
to Google AJAX API
thanks jgeerdes for your reply.

looks like the most productive thing i could hope for is to post a
feature request and pray to the gods of djork that they approve of it.

i personally feel it is a shame that they open up a search api and
restrict it to 32 results. At least 100 or even 1000 (like the other
mobs).

I would prefer to see some type of clause in the T&C that states that,
when showing the results, we need to also show the powered by google
search logo or whatnot .. in case the google people are afraid we're
leveraging their product without any branding.

time to start a new feature request .. how ever that is done...

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 3, 2008, 6:16:32 AM6/3/08
to Google AJAX API
Actually, the request for more results is already in there. You can
vote for it, though, by following the link below:

http://code.google.com/p/google-ajax-apis/issues/list

MeMeMe

unread,
Jun 5, 2008, 12:52:05 AM6/5/08
to Google AJAX API
Speaking of 32 results ... i'm very sorry if this keeps getting
asked ..

but how do i get 32 results? currently i only get 4 results. i'm doing
this on the server, so i'm generating a URL dynamically .. i'm not
sure what query params i need to say all 32 records .. or all 32
results into 4 pages of 8, etc.

is there a link to all the query string params?

thanks again.

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 5, 2008, 6:35:19 AM6/5/08
to Google AJAX API
If you look in the documentation, there is a listing of all the
different parameters the RESTful interface will accept, as well as a
number of other resources:

http://code.google.com/apis/ajaxsearch/documentation
http://code.google.com/apis/ajaxsearch/documentation/reference.html

That said, to get all 32 results, you have to do it in 4 sets of 8.
The params that you'll need to send are rsz=large (this sets it to a
large resultset of 8) and start (this sets the results starting
point), which will equal 0 for the first page, 8 for the second, 16
for page three, and 24 for page four.

MeMeMe

unread,
Jun 6, 2008, 1:33:26 AM6/6/08
to Google AJAX API
thank you kindly Jeremy for your helpful reply.

I did give the doco a read a while back when i first started playing
with the API, so i'm sorry i missed that rsz argument *blush*.

Once again, your response makes perfect sence ... cheers :)

/runs off to fix his app.

jgeerdes [AJAX APIs "Guru"]

unread,
Jun 6, 2008, 11:09:02 PM6/6/08
to Google AJAX API
Oh, for the record, I completely understand missing things in the
documentation! I've done it *many* times myself.
Reply all
Reply to author
Forward
0 new messages