Skip to content

获取 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 为准

路径参数

字段类型说明
idstring任务唯一标识符,UUID 格式。可在任务创建后的 30 天 随时用于获取结果。

返回结果说明

接口返回 JSON 数据,顶层 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次返回对应任务总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务结果数组

建议在接时建立完善的异常处理机制,根据 status_code 和任务级 status_code 统一处理失败、重试与空结果场景。

tasks[] 字段

字段类型说明
idstring任务 ID,UUID 格式
status_codeinteger任务状态码,通常在 10000-60000 范围
status_messagestring任务状态信息
timestring任务执行耗时,单位秒
costfloat该任务成本,单位 USD
result_countintegerresult 数组中的结果数量
patharray请求路径
dataobject与创建任务时一致的请求参数
resultarray结果数组

tasks[].data 字段

字段类型说明
se_typestring搜索引擎类型
apistringAPI 类型
functionstring功能类型
sestring搜索引擎
language_codestring语言代码
location_codeinteger地区代码
product_idstring创建任务时传的商品 ID
devicestring设备类型
osstring操作系统

tasks[].result[] 字段

字段类型说明
product_idstringPOST 请求中传的商品 ID
typestring搜索类型。固定为 product_info
se_domainstring创建任务时指定的搜索引擎域名
location_codeinteger创建任务时指定的地区代码
language_codestring创建任务时指定的语言代码
titlestring商品标题
descriptionstring商品描述
image_urlstring商品主图 URL
tagsarray商品标签
check_urlstring搜索引擎结果直达链接,可用于人工核验结果准确性
datetimestring结果获取时间,格式如 2019-11-15 12:57:46 +00:00
item_typesarray商品页中识别到的类型
items_countintegeritems 数组中的数量
itemsarray商品页面中的集合,商品属性及数据

items[] 字段说明

items 数组商品页中的结构化,通常为 product_info_element 类型。

字段类型说明
typestring素类型,可能值:product_info_element
rank_groupinteger同类型分组的位置
rank_absoluteinteger在整个商品页中的绝对位置
positionstring素所在位置,可能值:rightleft
product_idstring创建任务时传的商品 ID
titlestring商品标题
descriptionstring商品描述
urlstringGoogle Shopping 中该商品的页 URL
imagesarray商品图片 URL 列表
featuresarray商品特性摘要
ratingobject商品评分信息
seller_reviews_countinteger卖家评论数量
data_docidstringSERP 数据唯一标识,动态生成,无固定枚举
gidstringGoogle Shopping局商品标识;若无值则返回 null
specificationsarray商品规格参数
sellersarray售卖该商品的卖家列表
variationsarray商品变体列表

rating 字段说明

字段类型说明
typestring素类型
positionstring素位置,可能值:rightleft
rating_typestring评分类型,可能值:Max5PercentsCustomMax
valuestring当前评分值
votes_countinteger评分/反馈数量
rating_maxstring当前评分体系的满分值

specifications[] 字段说明

商品规格参数数组,商品属性与属性值。

字段类型说明
typestring素类型,可能值:shopping_specification
block_namestring属性区块名称,即该参数所属的规格分组
specification_namestring商品属性名称
specification_valuestring商品属性值

sellers[] 字段说明

卖家列表商品在不同卖家处的销售信息。

字段类型说明
typestring素类型,固定为 product_seller
titlestring卖家名称
urlstring商品销售页面 URL
seller_ratingobject卖家评分信息
priceobject商品价格信息
delivery_infoobject送信息
product_availabilitystring库存状态
seller_reviews_countinteger卖家评论数量

seller_rating 字段

字段类型说明
typestring素类型,通常为 rating_element
positionstring素位置,可能值:rightleft
rating_typestring评分类型,可能值:Max5PercentsCustomMax
valuestring评分值
votes_countinteger评价数量
rating_maxstring满分值

price 字段

字段类型说明
currentfloat当前价格
regularfloat原价
max_valuefloat最高价格
currencystring价格币种,ISO 货币代码
is_price_rangeboolean是否为价格区间
displayed_pricestring页面展示的原始价格字符串

delivery_info 字段

字段类型说明
delivery_messagestring卖家展示的说明
delivery_priceobject基于创建任务时所选地区返回的价格信息

product_availability 可选值

  • in_stock
  • limited_stock
  • out_of_stock
  • backordered
  • pre_order_available
  • on_display_to_order

variations[] 字段说明

商品变体用于表示同一商品的不同版本,如存储容量、颜色、尺寸等。

字段类型说明
typestring素类型
product_idstringPOST 请求中传的商品 ID
gidstring变体对应的 GID
data_docidstring变体对应的 SERP 数据 ID
pvfstring商品变体过滤参数,用于构造变体 URL
titlestring变体标题
urlstringGoogle Shopping 中该变体的 URL
variation_categorystring变体所属分类,例如 Storage Capacity

沙箱调试

可以通过沙箱地址查看该端点支持返回的字段结构,字段值为模拟数据,不会计费

https://api.seermartech.cn/v3/merchant/google/product_info/task_get/advanced/00000000-0000-0000-0000-000000000000

调用方式

通常有两种获取结果的方式:

  1. 调用 /v3/merchant/google/product_info/tasks_ready 获取已完成任务列表
  2. 再调用 /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_codestatus_message
  • 任务级:tasks[].status_codetasks[].status_message
  • 数据级:result_countitems_count

常见处理建议:

  1. status_code 非成功:记录请求日志并重试
  2. tasks_error > 0:逐个任务排查失败原因
  3. result_count = 0:说明任务成功但无可返回结果
  4. 字段缺失或为 null:按可选字段处理,例如 gid

实用场景

  • 核验商品页结构:抓取商品标题、描述、图片、规格和评分,验证聚合页或商品库中的基础信息是否完整一致。
  • 监控卖家与价格分布:提取 sellerspricedelivery_info 和库存状态,快速识别不同卖家的价格差异与策略。
  • 分析商品规格竞争力:基于 specifications 字段对比竞品参数,识别核心属性差距,支持选品和页面优化。
  • 跟踪商品变体覆盖:利用 variations 查看颜色、容量、型号等变体是否完整展示,评估商品与转化潜力。
  • 校验商品口碑信号:结合 ratingvotes_countseller_reviews_count 分析评价体量与评分表现,为投放和选品提供依据。

统一入口:官网 · LLM API · 控制台