# 设置 Google Shopping 评价任务

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/merchant/google/reviews/task_post`

**Tags:** DataForSEO

排队获取一个 Google Shopping 商品的评价，返回任务 `id`。使用 `product_id` 以及商品结果中的 `gid` 或 `data_docid` 标识商品。本系列全程异步：提交后在 `tasks[0].id` 中返回任务 `id`，获取工具会在结果就绪后返回。使用 `get_dataforseo_merchant_google_reviews_fetch` 获取结果。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.012 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "gid": {
        "type": "string",
        "description": "Google Shopping 上的全局商品标识符 必填字段 为获得最佳结果，建议将 gid 与 data_docid 和 product_id 一起指定； 可单独向 Google Shopping Products 端点发起请求，获取某个商品的此值 示例：4702526954592161872 有关此参数的更多信息，请参阅这篇帮助中心指南"
      },
      "product_id": {
        "type": "string",
        "description": "Google Shopping 上的唯一商品标识符。可选字段。建议将 product_id 与 data_docid 和 gid 一起指定，以获得最佳结果；你可以单独请求 Google Shopping Products 端点，获取某个商品的该值。示例：4485466949985702538 有关此参数的更多信息，请参阅此帮助中心指南。"
      },
      "data_docid": {
        "type": "string",
        "description": "SERP 数据元素的唯一标识符 可选字段 为获得最佳结果，建议将 data_docid 与 product_id 和 gid 一起指定； 可单独向 Google Shopping Products 端点发起请求，获取某个元素的此值 示例：13071766526042404278"
      },
      "priority": {
        "type": "integer",
        "description": "任务优先级。可选字段。可取值如下：1 – 正常执行优先级（默认设置）；2 – 高执行优先级。高执行优先级的任务将额外收费。费用可在价格页计算。"
      },
      "location_name": {
        "type": "string",
        "description": "搜索引擎地点全名 未指定 location_code 或 location_coordinate 时为必填字段 如果使用此字段，则无需指定 location_code 或 location_coordinate 可单独向 https://api.dataforseo.com/v3/merchant/google/locations 发起请求，获取可用地点及其 location_name 参数 示例：HA1,England,United Kingdom"
      },
      "location_code": {
        "type": "integer",
        "description": "搜索引擎地点代码 未指定 location_name 或 location_coordinate 时为必填字段 如果使用此字段，则无需指定 location_name 或 location_coordinate 可单独向 https://api.dataforseo.com/v3/merchant/google/locations 发起请求，获取可用地点及其 location_code 参数 示例：9045969"
      },
      "location_coordinate": {
        "type": "string",
        "description": "地点的 GPS 坐标 未指定 location_name 或 location_code 时为必填字段 如果使用此字段，则无需指定 location_name 或 location_code location_coordinate 参数应采用 “latitude,longitude,radius” 格式 “latitude” 和 “longitude” 的最大小数位数：7 “radius” 的最小值：199.9 示例：53.476225,-2.243572,200"
      },
      "language_name": {
        "type": "string",
        "description": "搜索引擎语言全名 未指定 language_code 时为必填字段 如果使用此字段，则无需指定 language_code 可单独向 https://api.dataforseo.com/v3/merchant/google/languages 发起请求，获取可用的语言及其 language_name 参数 示例：English (United Kingdom)"
      },
      "language_code": {
        "type": "string",
        "description": "搜索引擎语言代码 未指定 language_name 时为必填字段 如果使用此字段，则无需指定 language_name 可单独向 https://api.dataforseo.com/v3/merchant/google/languages 发起请求，获取可用的语言及其 language_code 参数 示例：en_GB"
      },
      "se_domain": {
        "type": "string",
        "description": "搜索引擎域名。可选字段。我们会根据你指定的地点和语言自动选择相关的搜索引擎域名；不过，你也可以在此字段中设置自定义的搜索引擎域名。示例：google.co.uk、google.com.au、google.de 等。"
      },
      "depth": {
        "type": "integer",
        "description": "解析深度 可选字段 SERP 中的评论数量；我们强烈建议将解析深度设置为 10 的倍数，因为系统会连续处理 10 条评论；最大值：8000 默认值：10 你的账户将按每个最多包含 10 条结果的 SERP 计费； 如果将深度设置为 10 以上，且搜索引擎返回超过 10 条结果，可能会产生额外费用； 费用可在价格页计算。"
      },
      "tag": {
        "type": "string",
        "description": "用户自定义任务标识符 可选字段 字符数上限为 255 可使用此参数标识任务，并将其与结果对应 可在响应的 data 对象中找到指定的 tag 值"
      },
      "postback_url": {
        "type": "string",
        "description": "用于发送任务结果的 URL。可选字段。任务完成后，我们会向你指定的 postback_url 发送 POST 请求，其结果以 gzip 格式压缩。你可以将 ‘$id’ 字符串用作 $id 变量，将 ‘$tag’ 用作 URL 编码的 $tag 变量。发送请求前，我们会设置必要的值。示例：http://your-server.com/postbackscript?id=$id http://your-server.com/postbackscript?id=$id&tag=$tag 注意：postback_url 中的特殊字符会被 URL 编码；例如 # 字符会被编码为 %23。更多信息请参阅我们的帮助中心。"
      },
      "postback_data": {
        "type": "string",
        "description": "postback_url 数据类型。可选字段。对应将发送到你服务器的数据类型。可选值：advanced。"
      },
      "pingback_url": {
        "type": "string",
        "description": "已完成任务的通知 URL。可选字段。任务完成后，我们会通过向你指定的 URL 发送 GET 请求来通知你。你可以将 ‘$id’ 字符串用作 $id 变量，将 ‘$tag’ 用作 URL 编码的 $tag 变量。发送请求前，我们会设置必要的值。示例：http://your-server.com/pingscript?id=$id http://your-server.com/pingscript?id=$id&tag=$tag 注意：pingback_url 中的特殊字符会被 URL 编码；例如 # 字符会被编码为 %23。更多信息请参阅我们的帮助中心。"
      }
    },
    "required": [
      "gid"
    ],
    "allOf": [
      {
        "anyOf": [
          {
            "required": [
              "location_name"
            ]
          },
          {
            "required": [
              "location_code"
            ]
          },
          {
            "required": [
              "location_coordinate"
            ]
          }
        ]
      },
      {
        "anyOf": [
          {
            "required": [
              "language_name"
            ]
          },
          {
            "required": [
              "language_code"
            ]
          }
        ]
      }
    ]
  }
}
```

## Responses

### 200 — 成功响应

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "API 的当前版本"
    },
    "status_code": {
      "type": "integer",
      "description": "通用状态码 完整响应码列表见此处 注意：我们强烈建议设计必要的系统来处理相关的异常或错误情况"
    },
    "status_message": {
      "type": "string",
      "description": "通用信息性消息 完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": "string",
      "description": "执行时间，秒"
    },
    "cost": {
      "type": "number",
      "description": "任务总费用，美元"
    },
    "tasks_count": {
      "type": "integer",
      "description": "tasks 数组中的任务数量"
    },
    "tasks_error": {
      "type": "integer",
      "description": "tasks 数组中返回错误的任务数"
    },
    "tasks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "任务数组"
    },
    "tasks.id": {
      "type": "string",
      "description": "我们系统中任务的唯一标识符，采用通用唯一标识符（UUID）格式"
    },
    "tasks.status_code": {
      "type": "integer",
      "description": "由 DataForSEO 生成的任务状态码；取值范围为 10000-60000"
    },
    "tasks.status_message": {
      "type": "string",
      "description": "任务的信息性消息"
    },
    "tasks.time": {
      "type": "string",
      "description": "执行时间，秒"
    },
    "tasks.cost": {
      "type": "number",
      "description": "任务费用，美元"
    },
    "tasks.result_count": {
      "type": "integer",
      "description": "result 数组中的元素数"
    },
    "tasks.path": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "URL 路径"
    },
    "tasks.data": {
      "type": "object",
      "description": "包含你在 POST 请求中指定的相同参数"
    },
    "tasks.result": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "结果数组 此处该值将为 null"
    }
  }
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```
