Google AJAX API - 如何获得 4 个以上的结果? [英] Google AJAX API - How do I get more than 4 Results?

查看:20
本文介绍了Google AJAX API - 如何获得 4 个以上的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的 google API ajax 来获取特定搜索词的图像.这是在 WinForms 应用中完成的.

Im using the google APIs ajax below to get images for particular search terms. This is being done in a WinForms app.

下面的链接似乎有效,但它只返回 4 个结果(通过 JSON)

The below link seems to work, but it only returns 4 results (via JSON)

有人知道如何哄骗更多吗?

Anyone know how to coax more out of it?

http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=Apple+Cake

显然必须有另一个参数来请求更多或翻阅结果,但我似乎无法弄清楚?有人知道吗?

Obviously there has to be another parameter to request more or page through the results, but I can't seem to figure it out? Anyone know?

推荐答案

我相信唯一的方法就是多次调用指定start"参数的网络服务.

I believe the only way to do that is to make multiple calls to the webservice specifying the 'start' parameter.

http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=Apple+Cake&start=4

start 参数是搜索结果中从 0 开始的索引.所以在这个例子中,它会返回图像 4..7.

The start parameter is the 0-based index into the search results. So in this example, it would return images 4..7.

您还可以添加参数rsz=[1-8].默认值为 4.这就是为什么每个请求会得到 4 个结果.这是一个链接:
http://code.google.com/apis/imagesearch/v1/jsondevguide.html#basic_query

You can also add the parameter rsz=[1-8]. The default value is 4. That's why you're getting 4 results per request. Here's a link:
http://code.google.com/apis/imagesearch/v1/jsondevguide.html#basic_query

这篇关于Google AJAX API - 如何获得 4 个以上的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆