主题
按任务 ID 获取 Google Shopping 商品信息高级结果
GET /v3/merchant/google/product_info/tasks_ready
接口说明
GET https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/$id
本接口用于根据任务 ID 获取 Google Shopping 商品信息高级结果。任务提交成功后,可在 30 天重复查询结果;查询已提交任务不额外计费,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务提交成功后,可在 30 天使用该 ID 查询结果。 |
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/04171306-0696-0188-0000-98b668ecaf09" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "04171306-0696-0188-0000-98b668ecaf09"
response = requests.get(
f"https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/{task_id}",
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
response.raise_for_status()
print(response.json())TypeScript
typescript
import axios from "axios";
const taskId = "04171306-0696-0188-0000-98b668ecaf09";
axios
.get(
`https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/${taskId}`,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error(error.response?.data || error.message);
});查询已完成任务
在业务中,通常调用以下接口获取已完成任务,再使用返回的任务 ID 查询结果:
http
GET /v3/merchant/google/product_info/tasks_ready任务完成后,可调用:
http
GET /v3/merchant/google/product_info/task_get/advanced/$id沙箱环境
可使用以下沙箱任务 ID 查看该接口支持的完整字段结构。沙箱返回的数据为示例数据,不产生费用:
text
https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/00000000-0000-0000-0000-000000000000响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。 |
status_message | string | 通用状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 当前任务的状态码,通常在 10000–60000 范围。 |
status_message | string | 当前任务的状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求路径信息。 |
data | object | 提交任务时使用的请求参数。 |
result | array | 商品信息结果数组。 |
data 请求数据字段
data 保存创建任务时提交的参数,常见字段如下:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索类型,例如 product_info。 |
api | string | API 类型,例如 merchant。 |
function | string | 功能名称,例如 product_info。 |
se | string | 搜索引擎类型,例如 google。 |
language_code | string | 语言代码,例如 en。 |
location_code | integer | 地理位置代码。 |
product_id | string | Google Shopping 商品 ID。 |
device | string | 设备类型,例如 desktop。 |
os | string | 操作系统,例如 windows。 |
result 商品结果字段
| 字段 | 类型 | 说明 |
|---|---|---|
product_id | string | 请求中提交的商品 ID。 |
type | string | 搜索引擎类型,固定值为 product_info。 |
se_domain | string | 搜索引擎域名。 |
location_code | integer | 请求使用的地理位置代码。 |
language_code | string | 请求使用的语言代码。 |
title | string | 商品标题。 |
description | string | 商品描述。 |
image_url | string | 商品主图 URL。 |
tags | array | 商品标签。 |
check_url | string | 对应搜索结果页面的直接 URL,可用于核验返回结果。 |
datetime | string | 获取结果的日期和时间,格式为 年-月-日 时:分:秒 UTC 时差,例如 2019-11-15 12:57:46 +00:00。 |
item_types | array | 商品页中识别到的类型,可能 product_info_element。 |
items_count | integer | items 数组中的数量。 |
items | array | 商品页面中的商品属性及信息。 |
specifications | array | 商品规格信息。 |
sellers | array | 商品销售商列表。 |
variations | array | 商品不同规格或变体的信息。 |
items 商品页面
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,可能为 product_info_element。 |
rank_group | integer | 在相同 type素组中的位置。不同类型不会该分组排名。 |
rank_absolute | integer | 素在商品规格页面中的绝对位置。 |
position | string | 素在页面中的对齐方向,可取 right 或 left。 |
product_id | string | 请求中提交的商品 ID。 |
title | string | 商品标题。 |
description | string | 商品描述。 |
url | string | Google Shopping 商品页面 URL。 |
images | array | 商品图片 URL 列表。 |
features | array | 商品特性摘要列表。 |
rating | object | 商品评分信息。 |
seller_reviews_count | integer | 商品销售商账户的评价数量。 |
data_docid | string | SERP 数据的唯一标识。该值由搜索引擎动态分,不存在固定完整枚举。 |
gid | string/null | Google Shopping局商品标识。无值时返回 null。 |
specifications | array | 商品规格和属性信息。 |
sellers | array | 商品销售商信息。 |
price | object | 商品价格信息。 |
delivery_info | object | 商品信息。 |
variations | array | 商品变体信息。 |
rating 评分对象
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可取 Max5、Percents 或 CustomMax。 |
value | string | 评分值。 |
votes_count | integer | 评分或反馈数量。 |
rating_max | string | 对应评分类型的最大值。 |
specifications 规格字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,可能为 shopping_specification。 |
block_name | string | 商品属性区块名称,表示该属性所在的规格分组。 |
specification_name | string | 商品属性名称。 |
specification_value | string | 商品属性值。 |
sellers 销售商字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 销售商类型,固定值为 product_seller。 |
title | string | 销售商名称。 |
url | string | 销售商页面 URL,即商品销售页面。 |
seller_rating | object | 销售商评分信息。 |
position | string | 销售商在搜索结果页中的对齐方向,可取 right 或 left。 |
seller_reviews_count | integer | 销售商账户的评价数量。 |
seller_rating 销售商评分字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可取 Max5、Percents 或 CustomMax。 |
value | string | 评分值。 |
votes_count | integer | 评分或反馈数量。 |
rating_max | string | 对应评分类型的最大值。 |
price 价格字段
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 常规价格。 |
max_value | float | 价格范围中的最高价格。 |
currency | string | 价格货币的 ISO 代码。 |
is_price_range | boolean | 是否以价格区间形式展示。 |
displayed_price | string | 搜索结果中展示的原始价格文本。 |
delivery_info送字段
| 字段 | 类型 | 说明 |
|---|---|---|
delivery_message | string | 销售商提供的说明。 |
delivery_price | object | 根据请求中指定位置计算的费用。 |
product_availability | string | 商品库存状态,可取以下值:in_stock、limited_stock、out_of_stock、backordered、pre_order_available、on_display_to_order。 |
variations 商品变体字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,通常为 rating_element。 |
product_id | string | 请求中提交的商品 ID。 |
gid | string | 商品的 Google Shopping局标识。 |
data_docid | string | SERP 数据的唯一标识。 |
pvf | string | 商品变体筛选值,用作变体 URL 中特定变体的标识。 |
title | string | 商品变体标题。 |
url | string | Google Shopping 商品变体 URL。 |
variation_category | string | 商品变体分类,例如 Storage Capacity。 |
响应示例
json
{
"version": "0.1.20220627",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0770 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04171306-0696-0188-0000-98b668ecaf09",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0500 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"merchant",
"google",
"product_info",
"task_get",
"advanced"
],
"data": {
"se_type": "product_info",
"api": "merchant",
"function": "product_info",
"se": "google",
"language_code": "en",
"location_code": 2840,
"product_id": "2693947537627546605",
"device": "desktop",
"os": "windows"
},
"result": [
{
"product_id": "2693947537627546605",
"type": "product_info",
"title": "示例商品",
"description": "商品描述",
"image_url": "https://example.com/image.jpg",
"items_count": 1,
"items": [
{
"type": "product_info_element",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"title": "示例商品",
"description": "商品描述",
"url": "https://shopping.google.com/",
"images": [],
"features": [],
"rating": {
"rating_type": "Max5",
"value": "4.36",
"votes_count": 24805,
"rating_max": "5"
},
"seller_reviews_count": 24805,
"data_docid": "17363035694596624076",
"gid": "4702526954592161872",
"specifications": [],
"sellers": [],
"variations": []
}
]
}
]
}
]
}响应状态码
- 顶层
status_code为20000:请求成功。 - 任务级
status_code为20000:任务结果成功返回。 - 任务级
status_code为错误码或result为空:表示该任务处理失败或暂无可用结果。
建议客户端同时检查顶层和任务级状态码,并根据 status_message 记录和处理异常。
实用场景
- 核验商品:获取商品标题、描述、图片、规格和变体信息,发现商品页面与站商品库之间的数据差异。
- 监控竞品价格:采集商品当前价、常规价、价格区间和货币类型,支持竞品价格变化监测与调价决策。
- 分析销售商竞争:汇总同一商品的销售商、评分、评价数量和商品链接,评估市场竞争强度与渠道分布。
- 跟踪商品库存:读取
product_availability送和库存状态,识别缺货、预售及有限库存商品, SEO 落地页和广告投放策略调整。 - 完善商品 SEO 数据:提取商品属性、特性摘要、图片和变体分类,为结构化商品页、类目页和优化提供数据依据。