Google Shopping REST API 按类别限制 [英] Google Shopping REST API restricting by Category

查看:36
本文介绍了Google Shopping REST API 按类别限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按类别限制 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:

https://www.google.com/webhp?rlz=1C1CHFX_enUS459US459&instant=UTFampie-sourceid=chrome-8&ion=1#q=terminator&hl=en&safe=off&rlz=1C1CHFX_enUS459US459&tbm=shop&source=lnt&tbs=cat:839&sa=X&ei=rMvKT9aqBoac2CQ0=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=8fc3a267521f95b1&ion=1&biw=1920&bih=955

我需要传入什么作为参数?

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 工程师确认目前不支持的讨论主题

这篇关于Google Shopping REST API 按类别限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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