如何在Google商品搜索API中按价格限制结果

时间:2013-03-22 18:34:07

标签: json google-api google-shopping-api google-product-search

我一直在网上寻找限制谷歌搜索商店API价格范围的方法,但我找不到任何答案。 (假设我想要20到40美元之间的产品) 在官方文档中,它似乎已经引用了这个功能(仅按价格排名) 既不Here也不Here

另外, 我一直在关注this post in stackO,但答案似乎没有为这个问题带来一个好的解决方案(他只是说明要使用的技术)。有办法吗?

谢谢

1 个答案:

答案 0 :(得分:2)

将此添加到API调用的网址。

&restrictBy=price:[20,40]

它将返回价格在20到40之间的产品。

&restrictBy=price:(20,40]

以上查询将返回价格高于20的产品。

参考 https://developers.google.com/shopping-search/v1/reference-request-parameters#restricting-products