Apinoa Docs

Reviews

从 Google Shopping 获取商品的评论。

查看原始 .mdx
GET | POST /v1/google-shopping/reviews

参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。

请求

curl "https://gateway.apinoa.com/v1/google-shopping/reviews?id=14699928440903523478" \
  -H "x-api-key: $APINOA_API_KEY"

参数

参数类型必填说明
cursorstringNext page: pass the previous result's cursor alone.
idstringThe product, as a search item's id carries it. Only a product Google groups across stores (an id of digits only) has reviews.
urlstringA Google Shopping product link instead of id (the url a search item carries).

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

在 data 中返回 ReviewPage。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "marketplace": "google-shopping",
    "productId": "14699928440903523478",
    "summary": {
      "average": 4.7083335,
      "count": 456,
      "distribution": {"1": 3, "2": 1, "3": 4, "4": 11, "5": 83},
      "starCounts": {"1": 11, "2": 4, "3": 14, "4": 49, "5": 378}
    },
    "page": {"index": 1, "size": 10, "total": 456},
    "reviews": [
      {
        "id": "PR_3P_f5ad9bac86f8a072818655448a2d2a25",
        "author": "Joshua W",
        "authorAvatarUrl": "https://lh3.googleusercontent.com/shsm/AGYqVK3f_a0qsNdewufUaN9jNMjhBA2iqYGxMmbkzY_-9XUnWM-EHp54sZUtlNtGLSKzmHRExg=w40-h40-c0x00000000-cc",
        "rating": 3,
        "title": "Looking for some help",
        "body": "The shoes feel great.. the very light and comfortable under the foot…. The staff were great and very helpful when I was there… she told me I had a slight curved…",
        "images": [],
        "syndicatedFrom": "ewavedemo.com",
        "ext": {"dateText": "2 months ago"}
      },
      {
        "id": "PR_3P_b2d0f4e9a87ebcd67397b1a448940f0a",
        "author": "Default",
        "authorAvatarUrl": "https://lh3.googleusercontent.com/shsm/AGYqVK36QOcqS62Et64UZUlsDp50FK0-LzpzaUd1Agzu2JVkg3ql3vf6jik6HH6NLO97COzJZg=w40-h40-c0x00000000-cc",
        "rating": 5,
        "title": "Great shoe for training runs",
        "body": "I’ve put 20 miles on these shoes now in 4 easy runs. I have never had a rocker-style shoe before but they were noticeably plusher/softer and also nicer when goi…",
        "images": [],
        "syndicatedFrom": "scheels.com",
        "ext": {"dateText": "2 months ago"}
      }
    ],
    "cursor": "YN15aw6pZJw1FMvFzP6fLCf0K96FEghuBGv4a93oJ-0zQyEfuCFWmFieSYh0NJKmYigKFBV16DeiEsT-lY3MyBrmGWZdMJ9vH_JZWUXjH0-TI4WKYoKGUF6U2-RV9NMs7SqyGL3MrLEVFTYSCgTtTtfdeF_O-7xW…"
  }
}

错误

状态代码含义
400INVALID_CURSOR该 cursor 不是本操作返回的。请不带它重新开始。
400INVALID_PARAMS参数缺失、未知、超出范围,或该引擎不接受。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
404REVIEWS_NOT_FOUNDGoogle Shopping 没有保存此商品的评论:它是单个商店的商品,而不是 Google 跨商店归并的商品。消息中会给出该 id。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR引擎返回了无法使用的内容。请退避后重试。
503SERVICE_UNAVAILABLE临时故障。请退避后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.0012。标价;单日调用超过 1,000 次后单价下调。

说明

  • Google 按跨商店归并的商品保存评论。搜索结果中 id 全为数字的商品就是这种商品。以 c 或 p 开头的 id 是单个商店的商品,在那里没有评论,返回 404 REVIEWS_NOT_FOUND,不计费。

本页内容