Google Shopping REST API 按类别限制 [英] Google Shopping REST API restricting by Category
问题描述
我正在尝试按类别限制 Google 购物请求(在这种情况下,我只希望返回实际的电影/DVD/蓝光)..
I'm trying restrict Google Shopping Requests by a category (In this case, I only want actual Movies/DVDs/Blu-Rays returned)..
这是我要传递的内容:
https://www.googleapis.com/shopping/search/v1/public/products?country=US&q=Terminator&key=MY_KEY
MY_KEY 是我从哪里获得的密钥:https://code.google.com/apis/console/#project:396093783634:access
Where MY_KEY is the key I obtained from: https://code.google.com/apis/console/#project:396093783634:access
我希望返回的结果看起来更像这样:
I would like my returned results to look more like this:
我需要传入什么作为参数?
What do I need to pass in as a parameter?
推荐答案
来自 https://developers.google.com/shopping-search/v1/reference-request-parameters 看起来您可以指定:
From https://developers.google.com/shopping-search/v1/reference-request-parameters it looks like you could specify:
restrictBy=category=categoryName
restrictBy=category=categoryName
但是 categoryName 必须来自提供的分类法,并且您只能在访问 Commerce Search 而不是公共产品列表时提供分类法.Google 购物本身大概有一个内置的默认分类法,但 API 的文档表明该分类法不适用于 API 用户.
but categoryName has to come from a provided taxonomy, and you can only provide a taxonomy if you're accessing Commerce Search, rather than the public product list. Google Shopping itself presumably has a default taxonomy built in, but the docs for the APIs suggest that that taxonomy isn't available to API users.
所以:不支持.
这篇关于Google Shopping REST API 按类别限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!