首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Shopping atom提要和实际的google购物网站数据

Google Shopping atom提要和实际的google购物网站数据
EN

Stack Overflow用户
提问于 2012-10-29 21:53:23
回答 1查看 268关注 0票数 0

我使用谷歌购物api来获取卖家数据作为atom馈送,但有时谷歌atom馈送的店铺数量少于我在使用相同搜索关键字或ean代码时在谷歌购物网站上看到的实际店铺数量。

什么可能会导致这种情况,商店有哪些选项可以将他们的产品数据隐藏在atom提要中?!

EN

回答 1

Stack Overflow用户

发布于 2012-10-29 22:03:59

编辑: As分页不是问题,OP的声明是正确的,商家有一种方法可以从API请求中排除他们的结果。在Product Feed Specification上有一个excluded_destination参数,可以为particular destination配置该参数。

您很可能会遇到paging的情况。Google (和其他)API通常不会在响应中返回特定查询的所有结果(想象一下,如果您要查询返回10,000,000个结果的内容-这可能是您的程序要处理的大量问题,同时也是提供程序的负担)。

为了规避这一点,许多API都提供了一个参数,让您可以转到结果的“下一页”。Shopping API就提供了这样一个参数(nextLink),您可以将其附加到查询中,以获得当前结果页面之后的结果页面

documentation

代码语言:javascript
复制
{
  "kind": "shopping#products",
  "etag": value,
  "id": "tag:google.com,2010:shopping/products",

  "selfLink": value,
  "nextLink": value,
  "previousLink": value,

  "totalItems": value,
  "startIndex": value,
  "itemsPerPage": value,
  "currentItemCount": value,

  content module,
  ...
  content module,

  "items": [
    product resource
  ]
}

其中nextLink = Link to the next page of products, omitted if there is no next page

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13122978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档