Skip to content

按任务 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 为准。

请求参数

参数类型说明
idstring任务唯一标识,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 数组。

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。
status_messagestring通用状态说明。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务数量。
tasks_errorintegertasks 数组中返回错误的任务数量。
tasksarray任务结果数组。

tasks 任务字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger当前任务的状态码,通常在 10000–60000 范围。
status_messagestring当前任务的状态说明。
timestring任务执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求路径信息。
dataobject提交任务时使用的请求参数。
resultarray商品信息结果数组。

data 请求数据字段

data 保存创建任务时提交的参数,常见字段如下:

字段类型说明
se_typestring搜索类型,例如 product_info
apistringAPI 类型,例如 merchant
functionstring功能名称,例如 product_info
sestring搜索引擎类型,例如 google
language_codestring语言代码,例如 en
location_codeinteger地理位置代码。
product_idstringGoogle Shopping 商品 ID。
devicestring设备类型,例如 desktop
osstring操作系统,例如 windows

result 商品结果字段

字段类型说明
product_idstring请求中提交的商品 ID。
typestring搜索引擎类型,固定值为 product_info
se_domainstring搜索引擎域名。
location_codeinteger请求使用的地理位置代码。
language_codestring请求使用的语言代码。
titlestring商品标题。
descriptionstring商品描述。
image_urlstring商品主图 URL。
tagsarray商品标签。
check_urlstring对应搜索结果页面的直接 URL,可用于核验返回结果。
datetimestring获取结果的日期和时间,格式为 年-月-日 时:分:秒 UTC 时差,例如 2019-11-15 12:57:46 +00:00
item_typesarray商品页中识别到的类型,可能 product_info_element
items_countintegeritems 数组中的数量。
itemsarray商品页面中的商品属性及信息。
specificationsarray商品规格信息。
sellersarray商品销售商列表。
variationsarray商品不同规格或变体的信息。

items 商品页面

字段类型说明
typestring素类型,可能为 product_info_element
rank_groupinteger在相同 type素组中的位置。不同类型不会该分组排名。
rank_absoluteinteger素在商品规格页面中的绝对位置。
positionstring素在页面中的对齐方向,可取 rightleft
product_idstring请求中提交的商品 ID。
titlestring商品标题。
descriptionstring商品描述。
urlstringGoogle Shopping 商品页面 URL。
imagesarray商品图片 URL 列表。
featuresarray商品特性摘要列表。
ratingobject商品评分信息。
seller_reviews_countinteger商品销售商账户的评价数量。
data_docidstringSERP 数据的唯一标识。该值由搜索引擎动态分,不存在固定完整枚举。
gidstring/nullGoogle Shopping局商品标识。无值时返回 null
specificationsarray商品规格和属性信息。
sellersarray商品销售商信息。
priceobject商品价格信息。
delivery_infoobject商品信息。
variationsarray商品变体信息。

rating 评分对象

字段类型说明
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销售商评分信息。
positionstring销售商在搜索结果页中的对齐方向,可取 rightleft
seller_reviews_countinteger销售商账户的评价数量。

seller_rating 销售商评分字段

字段类型说明
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_availabilitystring商品库存状态,可取以下值:in_stocklimited_stockout_of_stockbackorderedpre_order_availableon_display_to_order

variations 商品变体字段

字段类型说明
typestring素类型,通常为 rating_element
product_idstring请求中提交的商品 ID。
gidstring商品的 Google Shopping局标识。
data_docidstringSERP 数据的唯一标识。
pvfstring商品变体筛选值,用作变体 URL 中特定变体的标识。
titlestring商品变体标题。
urlstringGoogle Shopping 商品变体 URL。
variation_categorystring商品变体分类,例如 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_code20000:请求成功。
  • 任务级 status_code20000:任务结果成功返回。
  • 任务级 status_code 为错误码或 result 为空:表示该任务处理失败或暂无可用结果。

建议客户端同时检查顶层和任务级状态码,并根据 status_message 记录和处理异常。

实用场景

  • 核验商品:获取商品标题、描述、图片、规格和变体信息,发现商品页面与站商品库之间的数据差异。
  • 监控竞品价格:采集商品当前价、常规价、价格区间和货币类型,支持竞品价格变化监测与调价决策。
  • 分析销售商竞争:汇总同一商品的销售商、评分、评价数量和商品链接,评估市场竞争强度与渠道分布。
  • 跟踪商品库存:读取 product_availability送和库存状态,识别缺货、预售及有限库存商品, SEO 落地页和广告投放策略调整。
  • 完善商品 SEO 数据:提取商品属性、特性摘要、图片和变体分类,为结构化商品页、类目页和优化提供数据依据。

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