主题
获取 Google Shopping 商品高级结果
接口说明
通过任务 id 获取 Google Shopping 商品搜索任务的高级结果。
请求方式
GET https://api.seermartech.cn/v3/merchant/google/products/task_get/advanced/$id
计费说明
该类接口在创建任务时扣费,任务结果在后续 30 天 可反复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。可在任务创建后的 30 天 随时用于获取结果。 |
沙箱调试
可通过以下沙箱地址查看本接口支持的结果结构和字段,返回值为示例数据,不产生费用:
https://sandbox.本平台.com/v3/merchant/google/products/task_get/advanced/00000000-0000-0000-0000-000000000000
返回结构
接口返回 JSON 对象, tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。建议对异常和错误状态做完整处理。 |
status_message | string | 通用状态信息。 |
time | string | 执行耗时,单位秒。 |
cost | float | 本次请求总成本,单位 USD。对于已创建任务的结果读取通常为 0。 |
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。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求路径。 |
data | object | 与创建任务时 POST 请求中传的参数一致。 |
result | array | 结果数组。 |
result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | POST 请求中提交的。返回时会对 %## 进行解码,+ 会被还原为空格。 |
type | string | POST 请求中的搜索引擎类型。 |
se_domain | string | POST 请求中的搜索引擎域名。 |
location_code | integer | POST 请求中的地区编码。 |
language_code | string | POST 请求中的语言编码。 |
check_url | string | 指向 Google Shopping 结果页的直接链接,可用于核验结果准确性。 |
datetime | string | 结果抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
spell | object | 搜索引擎自动纠错信息。 |
item_types | array | 当前 SERP 中出现的结果类型列表。 |
items_count | integer | items 数组中的数量。 |
items | array | SERP素列表。 |
spell 对象
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索引擎纠正后的。 |
type | string | 自动纠错类型。可选值:did_you_mean、showing_results_for、no_results_found_for、including_results_for |
item_types 可能值
google_shopping_sponsored_carouselgoogle_shopping_paidgoogle_shopping_serp
items素类型说明
本接口会返回多种 Google Shopping SERP素,不同 type 对应不同字段结构。
1) google_shopping_sponsored_carousel
赞助轮播商品组。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_sponsored_carousel |
rank_group | integer | 同类型的分组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 页面位置,可能值:left、right |
xpath | string | 素的 XPath。 |
title | string | 素标题。 |
items | array|null | 轮播中的商品项,无则为 null。 |
google_shopping_sponsored_carousel.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_sponsored_carousel_element |
xpath | string | 素 XPath。 |
title | string | 商品标题。 |
tags | array | 商品标签。 |
seller | string | 商家名称。 |
price | float | 商品价格。 |
currency | string | 货币代码,ISO 4217 格式,例如 USD。 |
product_rating | object | 商品评分信息。 |
product_images | array | 商品图片 URL 列表,第一张通常为主图。 |
shop_ad_aclk | string | 广告点击引用参数,可用于获取广告跳转链接。 |
delivery_info | object | 送信息。 |
special_offer_info | object | 商家优惠信息。 |
product_rating / shop_rating 通用结构
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 rating_element |
position | string | 评分在 SERP 中的位置,left 或 right |
rating_type | string | 评分类型,可见值:Max5、Percents、CustomMax |
value | string | 评分值。 |
votes_count | integer | 评价/投票数量。 |
rating_max | integer | 该评分类型的最大值。 |
delivery_info 通用结构
| 字段 | 类型 | 说明 |
|---|---|---|
delivery_message | string | 送说明文案。 |
delivery_price | object|null | 送价格信息;若运费则为 null。 |
delivery_price 结构
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 原始未折扣价格。 |
max_value | float | 最大未折扣价格。 |
currency | string | 货币代码,ISO 4217 格式。 |
is_price_range | boolean | 是否为价格区间。 |
displayed_price | string | 页面展示的价格文本。 |
special_offer_info 结构
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 优惠标题。 |
sub_title | string | 优惠副标题。 |
fixed_discount | integer | 固定优惠金额。 |
fixed_discount_currency | string | 固定优惠金额币种。 |
percentage_discount | integer | 折扣百分比。 |
coupon_code | string | 优惠码。 |
coupon_info | string | 优惠码说明。 |
url | string | 优惠页面 URL。已废弃,返回 null。 |
domain | string | 优惠页面域名。已废弃,返回 null。 |
2) google_shopping_carousel
自然商品轮播组。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_carousel |
rank_group | integer | 同类型分组排名。 |
rank_absolute | integer | 整体绝对排名。 |
position | string | 页面位置:left、right |
xpath | string | 素 XPath。 |
title | string | 轮播标题。 |
items | array|null | 轮播中的商品。 |
google_shopping_carousel.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_carousel_element |
xpath | string | 素 XPath。 |
title | string | 商品标题。 |
tags | array | 商品标签。 |
seller | string | 商家名称。 |
price | float | 商品价格。 |
currency | string | 货币代码。 |
product_rating | object | 商品评分。 |
product_images | array | 商品图片 URL 列表。 |
shopping_url | string | Google Shopping 商品页链接。 |
product_id | string | Google Shopping 商品唯一标识,动态值,可能为 null。 |
data_docid | string | SERP 数据唯一标识,动态值。 |
gid | string | Google Shopping局商品标识,动态值,可能为 null。 |
delivery_info | object | 送信息。 |
special_offer_info | object | 优惠信息。 |
3) google_shopping_paid
付费商品广告位。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_paid |
rank_group | integer | 同类型分组排名。 |
rank_absolute | integer | 整体绝对排名。 |
position | string | 页面位置:left、right |
xpath | string | 素 XPath。 |
domain | string | SERP 中展示的域名。 |
title | string | 商品标题。 |
description | string | 商品描述。 |
url | string | 商家网站商品页链接。已废弃,返回 null。 |
shop_ad_aclk | string | 广告点击引用参数,可用于进一步获取广告目标链接。 |
4) google_shopping_serp
Google Shopping 商品主结果项。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 google_shopping_serp |
rank_group | integer | 同类型分组排名。 |
rank_absolute | integer | 整体绝对排名。 |
position | string | 页面位置:left、right |
xpath | string | 素 XPath。 |
domain | string | 展示域名。 |
title | string | 商品标题。 |
description | string | 商品描述。 |
url | string | 商家站商品页链接。已废弃,返回 null。 |
shopping_url | string | Google Shopping 商品页链接。 |
tags | array | 商品标签。 |
price | float | 当前价格。 |
price_multiplier | integer | 分期付款倍数,表示月供覆盖的月份数。 |
old_price | float | 原价,如有价格变动时返回。 |
currency | string | 货币代码。 |
product_id | string | Google Shopping 商品唯一标识,动态值,可能为 null。 |
data_docid | string | SERP 数据唯一标识。 |
seller | string | 商家名称。 |
additional_specifications | object | 附加 URL 参数对象,可用于后续请求商品规格或商家接口。 |
reviews_count | integer | 商品评论数,可能为 null。 |
is_best_match | boolean | 是否带有 “best match” 标签,可能为 null。 |
product_rating | object | 商品评分。 |
shop_rating | object | 店铺评分。 |
product_images | array | 商品图片 URL 列表。 |
shop_ad_aclk | string | 广告点击引用参数。 |
delivery_info | object | 送信息。 |
stores_count_info | object | 同款商品可购买店铺数量信息。 |
gid | string | Google Shopping局商品标识,动态值,可能为 null。 |
stores_count_info 结构
| 字段 | 类型 | 说明 |
|---|---|---|
count | string | 提供该商品的店铺数量。 |
displayed_text | string | Google Shopping 页面的展示文本。 |
count_from_text | boolean | 是否从展示文本中提取店铺数量。若页面 HTML 中存在明确数量则为 false,否则为 true。 |
5) related_searches
搜索词模块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_searches |
rank_group | integer | 同类型分组排名。 |
rank_absolute | integer | 整体绝对排名。 |
position | string | 页面位置:left、right |
xpath | string | 素 XPath。 |
items | array|null | 列表,无则为 null。 |
调用示例
cURL
bash
id="04171054-0696-0179-0000-e56ea58342c5"
curl --location --request GET "https://api.seermartech.cn/v3/merchant/google/products/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/products/task_get/advanced/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.status_code)
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/products/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.20210617",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1346 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"se_type": "shopping",
"se": "google",
"api": "merchant",
"function": "products",
"language_code": "en",
"location_code": 2840,
"keyword": "buy iphone",
"price_min": "5",
"device": "desktop",
"os": "windows"
},
"result": [
{
"items_count": 160,
"items": [
{
"type": "google_shopping_sponsored_carousel",
"title": "Shop anker solix ps400 portable solar panel 400w",
"items": [
{
"type": "google_shopping_sponsored_carousel_element",
"title": "Anker SOLIX PS400 Portable Solar Panel (400W)",
"tags": null,
"seller": "Wellbots",
"price": 599,
"currency": "USD",
"product_rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.5,
"votes_count": 77,
"rating_max": 5
},
"product_images": [],
"shop_ad_aclk": "DChcSEwjUhtL2-NeNAxXXSf8BHdzXNBQYABABGgJtZA",
"delivery_info": null,
"special_offer_info": {
"title": "Get 5% OFF this product",
"sub_title": "Wellbots",
"fixed_discount": null,
"fixed_discount_currency": null,
"percentage_discount": 5,
"coupon_code": "ANKER5",
"coupon_info": "Enter code at checkout. Ends in 88 days.",
"url": null,
"domain": null
}
}
]
},
{
"type": "google_shopping_carousel",
"rank_group": 1,
"rank_absolute": 2,
"position": "left",
"title": "Leather sofas",
"items": [
{
"type": "google_shopping_carousel_element",
"title": "Member's Mark Harrison Leather Sofa",
"tags": null,
"seller": "Sam's Club",
"price": 1099,
"currency": "USD",
"product_rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": 4.1,
"votes_count": 10,
"rating_max": 5
},
"product_images": [],
"shopping_url": "https://google.com/search?ibp=oshop&q=gid:8594841601800484681",
"product_id": "9875690875641841227",
"data_docid": null,
"gid": "8594841601800484681",
"delivery_info": null,
"special_offer_info": null
}
]
},
{
"type": "google_shopping_serp",
"rank_group": 1,
"rank_absolute": 3,
"position": "left",
"domain": null,
"title": "Apple iPhone 12 - 128 GB - Black - Unlocked",
"description": "5G to download movies on the fly and stream high-quality video.",
"url": null,
"shopping_url": null,
"tags": [],
"price": 1099.99,
"price_multiplier": null,
"old_price": null,
"currency": "USD",
"product_id": "3805205938126402128",
"data_docid": "9874368152810998595",
"seller": "Back Market",
"additional_specifications": null,
"reviews_count": 9134,
"is_best_match": false,
"product_rating": {
"type": "rating_element",
"position": "left",
"rating_type": "Max5",
"value": "4.53",
"votes_count": 9134,
"rating_max": null
},
"shop_rating": null,
"product_images": [],
"shop_ad_aclk": "DChcSEwikz5aloKHxAhX8R5EFHc8oBzsYABA-GgJscg",
"delivery_info": {
"delivery_message": "$124.88 delivery",
"delivery_price": {
"current": 124.88,
"regular": null,
"max_value": null,
"currency": "USD",
"is_price_range": false,
"displayed_price": "$124.88"
}
},
"stores_count_info": {
"count": 5,
"displayed_text": "Compare prices from 5+ stores",
"count_from_text": false
},
"gid": "9961958114952839788"
},
{
"type": "google_shopping_paid",
"rank_group": 1,
"rank_absolute": 103,
"position": "left",
"domain": "www.visible.com",
"title": "Visible® $40/mo Phone Service - Up to $150 Prepaid Mastercard",
"description": "Includes Unlimited Data, Messages & Minutes on Verizon’s 4G LTE Network.",
"url": null,
"shop_ad_aclk": null
}
]
}
]
}
]
}状态码与错误处理
status_code表示接口或任务执行状态。- 建议同时检查顶层
status_code与tasks[].status_code。 - 当
tasks[].status_code >= 40000,通常表示任务级错误,应结合status_message进行处理。 - 实项目中建议建立统一的重试、告警和异常分流机制。
使用建议
- 通过创建任务接口创建商品搜索任务。
- 再通过就绪任务接口
/v3/merchant/google/products/tasks_ready获取已完成任务。 - 使用返回的任务
id或endpoint_advanced调用本接口获取高级结果。 - 如需提取广告目标链接,可结合
shop_ad_aclk调用卖家广告 URL 接口。 - 如需查看更细的商品规格或卖家信息,可结合
additional_specifications调用接口。
实用场景
- 监控商品形态:识别下是否出现赞助轮播、自然商品卡片、付费广告位等模块,评估 Shopping SERP 的版位结构变化。
- 追踪竞品价格与策略:采集
price、old_price、delivery_info、stores_count_info等字段,分析竞品价格带、运费和履约优势。 - 挖掘高转化商品线索:结合
product_rating、reviews_count、is_best_match判断哪些商品更受欢迎,选品和广告投放。 - 识别商家促销动作:通过
special_offer_info、coupon_code、折扣字段监控竞品优惠活动,支持营销节奏制定。 - 构建商品报库:沉淀
product_id、gid、data_docid、shopping_url等标识,用于后续商品抓取、同款聚合和跨期比对。