---
title: "Reviews"
description: "从 Google Shopping 获取商品的评论。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/serp/llms.txt)

```http
GET | POST /v1/google-shopping/reviews
```

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

## 请求

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

```js tab="JavaScript"
const params = new URLSearchParams({ id: "14699928440903523478" });
const res = await fetch(`https://gateway.apinoa.com/v1/google-shopping/reviews?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/google-shopping/reviews",
    params={"id": "14699928440903523478"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `cursor` | string |  | Next page: pass the previous result's `cursor` alone. |
| `id` | string |  | The product, as a search item's `id` carries it. Only a product Google groups across stores (an id of digits only) has reviews. |
| `url` | string |  | A Google Shopping product link instead of `id` (the `url` a search item carries). |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`ReviewPage`](/docs/api-reference/marketplaces/response-schema#reviewpage)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "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…"
  }
}
```

## 错误

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

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

**Price** $0.0012 per call. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## 说明

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