Google自定义搜索API指定的图像尺寸

问题描述 投票:3回答:1

我正在对图像进行Google自定义搜索请求。

我的要求在下面

https://www.googleapis.com/customsearch/v1?key=key&cx=cx&q=hello&searchType=image&alt=json&start=1

我知道我可以指定图像大小,即

[[巨大,图标,大,中,小,xlarge,xxlarge]

但是我要指定的图像搜索应该大于600x600。

在Google页面上,通过指定添加尺寸,我看到了

&tbs = isz:lt,islt:qsvga

所以我尝试这样做

https://www.googleapis.com/customsearch/v1?key=key&cx=cx&q=hello&searchType=image&alt=json&start=1&tbs=isz:lt,islt:qsvga

但是没有运气。

很明显,我可以过滤API返回的结果,但这没有好处,因为它将减少返回的图像数。

有什么办法吗?

谢谢

c# api google-custom-search dimension google-image-search
1个回答
0
投票

我使用JS做过类似的事情,可让您使用自定义的高度和宽度搜索Google图片。如果您只想使用它,则可以找到它here。如果您想自己制作……我不会怪您,因为编程很有趣。 (至少对我来说)

© www.soinside.com 2019 - 2024. All rights reserved.