主题
获取 Google Shopping 商品结果(高级版)
GET /v3/merchant/google/product_info/task_get/advanced/{id}
接口说明
通过任务 ID 获取 Google Shopping 商品抓取任务的高级结果。
- 请求方式:
GET - 请求地址:
https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/$id
该接口对已提交并完成的任务返回结果。任务提交时产生一次扣费,任务结果在后续 30 天可重复获取。
计费说明:
- 本接口本身不重复收费,扣费发生在创建任务时
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。可在任务创建后的 30 天 随时用于获取结果。 |
返回结果说明
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次返回对应任务总成本,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
建议在接时建立完善的异常处理机制,根据
status_code和任务级status_code统一处理失败、重试与空结果场景。
tasks[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务 ID,UUID 格式 |
status_code | integer | 任务状态码,通常在 10000-60000 范围 |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位秒 |
cost | float | 该任务成本,单位 USD |
result_count | integer | result 数组中的结果数量 |
path | array | 请求路径 |
data | object | 与创建任务时一致的请求参数 |
result | array | 结果数组 |
tasks[].data 字段
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型 |
api | string | API 类型 |
function | string | 功能类型 |
se | string | 搜索引擎 |
language_code | string | 语言代码 |
location_code | integer | 地区代码 |
product_id | string | 创建任务时传的商品 ID |
device | string | 设备类型 |
os | string | 操作系统 |
tasks[].result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
product_id | string | POST 请求中传的商品 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 | 搜索引擎结果直达链接,可用于人工核验结果准确性 |
datetime | string | 结果获取时间,格式如 2019-11-15 12:57:46 +00:00 |
item_types | array | 商品页中识别到的类型 |
items_count | integer | items 数组中的数量 |
items | array | 商品页面中的集合,商品属性及数据 |
items[] 字段说明
items 数组商品页中的结构化,通常为 product_info_element 类型。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,可能值:product_info_element |
rank_group | integer | 同类型分组的位置 |
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 | Google Shopping局商品标识;若无值则返回 null |
specifications | array | 商品规格参数 |
sellers | array | 售卖该商品的卖家列表 |
variations | array | 商品变体列表 |
rating 字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型 |
position | string | 素位置,可能值:right、left |
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 | 卖家评分信息 |
price | object | 商品价格信息 |
delivery_info | object | 送信息 |
product_availability | string | 库存状态 |
seller_reviews_count | integer | 卖家评论数量 |
seller_rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,通常为 rating_element |
position | string | 素位置,可能值:right、left |
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 可选值
in_stocklimited_stockout_of_stockbackorderedpre_order_availableon_display_to_order
variations[] 字段说明
商品变体用于表示同一商品的不同版本,如存储容量、颜色、尺寸等。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型 |
product_id | string | POST 请求中传的商品 ID |
gid | string | 变体对应的 GID |
data_docid | string | 变体对应的 SERP 数据 ID |
pvf | string | 商品变体过滤参数,用于构造变体 URL |
title | string | 变体标题 |
url | string | Google Shopping 中该变体的 URL |
variation_category | string | 变体所属分类,例如 Storage Capacity |
沙箱调试
可以通过沙箱地址查看该端点支持返回的字段结构,字段值为模拟数据,不会计费:
https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/00000000-0000-0000-0000-000000000000
调用方式
通常有两种获取结果的方式:
- 调用
/v3/merchant/google/product_info/tasks_ready获取已完成任务列表 - 再调用
/v3/merchant/google/product_info/task_get/advanced/$id拉取单个任务结果
也可以在已知任务 ID 的,直接按 ID 获取结果。
请求示例
cURL
bash
id="04171306-0696-0188-0000-98b668ecaf09"
curl --location --request GET "https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231453-2604-0066-2000-64d39c6677d4"
url = 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 = requests.get(url, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const taskId = "02231453-2604-0066-2000-64d39c6677d4";
axios({
method: "get",
url: `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);
});响应示例
json
{
"version": "0.1.20220627",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0770 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"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": [
{
"items_count": 1,
"items": [
{
"features": [],
"rating": {
"type": "rating_element",
"position": "left",
"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用于判断单个任务是否成功 - 若任务级状态码大于等于
40000,通常表示任务执行失败或结果不可用 - 建议同时检查以下字段:
- 顶层:
status_code、status_message - 任务级:
tasks[].status_code、tasks[].status_message - 数据级:
result_count、items_count
常见处理建议:
status_code非成功:记录请求日志并重试tasks_error > 0:逐个任务排查失败原因result_count = 0:说明任务成功但无可返回结果- 字段缺失或为
null:按可选字段处理,例如gid
实用场景
- 核验商品页结构:抓取商品标题、描述、图片、规格和评分,验证聚合页或商品库中的基础信息是否完整一致。
- 监控卖家与价格分布:提取
sellers、price、delivery_info和库存状态,快速识别不同卖家的价格差异与策略。 - 分析商品规格竞争力:基于
specifications字段对比竞品参数,识别核心属性差距,支持选品和页面优化。 - 跟踪商品变体覆盖:利用
variations查看颜色、容量、型号等变体是否完整展示,评估商品与转化潜力。 - 校验商品口碑信号:结合
rating、votes_count、seller_reviews_count分析评价体量与评分表现,为投放和选品提供依据。