Google AJAX API - 如何获得4个以上的结果? [英] Google AJAX API - How do I get more than 4 Results?
问题描述
我使用下面的google API ajax获取特定搜索字词的图片。这是在一个 WinForms 应用程序中完成的。
下面的链接似乎可行,但它只返回4个结果(通过JSON) p>
任何人都知道如何哄更多它?
http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=Apple+蛋糕
很显然,必须有另一个参数来请求更多或者通过结果页面,但我似乎无法弄清楚它的意思吗?任何人都知道?
我相信唯一的方法是对webservice进行多次调用,指定'start'参数。
http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q= Apple + Cake& start = 4
您也可以添加参数 rsz = [1-8]
。默认值是4.这就是为什么你每个请求得到4个结果。以下是一个链接:
http:// code .google.com / apis / imagesearch / v1 / jsondevguide.html#basic_query
Im using the google APIs ajax below to get images for particular search terms. This is being done in a WinForms app.
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?
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
The start
parameter is the 0-based index into the search results. So in this example, it would return images 4..7.
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屋!