主题
获取 Google Events SERP 高级结果(按任务 ID)
GET /v3/serp/google/events/task_get/advanced/{id}
接口说明
通过任务 ID 获取 Google Events 搜索结果页(SERP)的高级结果。
- 请求方式:
GET - 请求地址:
https://api.seermartech.cn/v3/serp/google/events/task_get/advanced/$id
该接口用于查询已创建任务的执行结果。任务提交成功后,结果可在 30 天重复获取。
计费说明
本接口本身不会重复扣费,在创建任务时计费;任务结果在后续 30 天可获取。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准 - 当前结果获取接口通常返回
cost: 0
路径参数
| 参数名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。可在任务创建后的 30 天 用于随时获取结果。 |
Sandbox
可使用以下 Sandbox 地址查看该端点支持的结果结构和字段(返回模拟数据,不计费):
https://sandbox.本平台.com/v3/serp/google/events/task_get/advanced/00000000-0000-0000-0000-000000000000
Sandbox 响应会 Google Events SERP Advanced 端点下所有可用及示例字段值。
返回结构
接口返回 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 | 任务结果数组。 |
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 | 语言代码。该接口场景下该值为 null。 |
check_url | string | 指向搜索结果页的直达链接。 |
datetime | string | 结果抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
spell | object | 搜索引擎自动纠错信息。 |
refinement_chips | object | 搜索细化筛选项。 |
item_types | array | 当前 SERP 中出现的结果类型。 |
se_results_count | integer | SERP 总结果数。该搜索类型下通常为 0,表示搜索引擎未提供总量。 |
items_count | integer | items 数组中的结果数量。 |
items | array | SERP 结果项。 |
spell 对象
当搜索引擎对进行了自动纠错时,会返回该对象。
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索引擎纠正后的。 |
type | string | 自动纠错类型。 |
type 可选值:
did_you_meanshowing_results_forno_results_found_forincluding_results_for
refinement_chips 对象
表示 SERP 中的搜索细化标签。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips。 |
xpath | string | 素的 XPath。 |
items | array | 细化项列表。 |
refinement_chips.items[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips_element。 |
title | string | 细化项标题。 |
url | string | 带筛选参数的搜索链接。 |
domain | string | SERP 中展示的域名。 |
options | array | 更进一步的筛选选项。 |
refinement_chips.items[].options[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 refinement_chips_option。 |
title | string | 选项标题。 |
url | string | 带筛选参数的搜索链接。 |
domain | string | SERP 中展示的域名。 |
item_types 可选值
当前端点支持的结果类型:
event_item
items[] 字段说明
event_item 事件结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 event_item。 |
rank_group | integer | 分组排名。在相同 type 的组计数,不同类型不会计。 |
rank_absolute | integer | SERP 中的绝对排名。 |
position | string | 素在 SERP 中的位置,可为 left 或 right。 |
xpath | string | 素的 XPath。 |
title | string | 事件标题。 |
description | string | 事件描述。 |
url | string | 链接。 |
image_url | string | 事件图片地址。 |
event_dates | object | 事件日期信息;若无则为 null。 |
location_info | object | 活动地点信息。 |
feature_id | string | 该在 SERP 中的唯一标识。 |
information_and_tickets | array | 更多信息与购票选项。 |
event_dates 字段
| 字段 | 类型 | 说明 |
|---|---|---|
start_datetime | string | 活动开始时间。若事件中指定时区,则返回 UTC 格式 yyyy-mm-ddThh-mm-ss+00:00;若未指定时区,则返回本地未指明时区格式 yyyy-mm-ddThh-mm-ss。 |
end_datetime | string | 活动结束时间。格式规则与 start_datetime 相同。 |
displayed_dates | string | 搜索结果页中展示的日期或日期范围原文。 |
location_info 字段
| 字段 | 类型 | 说明 |
|---|---|---|
name | string | 场馆/地点名称。 |
address | string | 场馆/地点地址。 |
url | string | 指向 Google Maps 的地点链接。 |
cid | string | 搜索引擎定义的客户端 ID。可结合评论接口获取评论列表。 |
feature_id | string | 场馆地点的唯一标识。 |
information_and_tickets[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 information_and_tickets_element。 |
title | string | 标题。 |
description | string | 描述。 |
url | string | 链接。 |
domain | string | SERP 中展示的域名。 |
请求示例
cURL
bash
id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET "https://api.seermartech.cn/v3/serp/google/events/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231256-2604-0066-2000-57133b8fc54e"
url = f"https://api.seermartech.cn/v3/serp/google/events/task_get/advanced/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json
print(data)TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/serp/google/events/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);
});获取已完成任务后再取结果
通常推荐调用已完成任务列表接口,再逐个获取高级结果:
- 获取已完成任务:
GET /v3/serp/google/events/tasks_ready - 获取单个任务结果:
GET /v3/serp/google/events/task_get/advanced/$id
这种方式适合批量轮询与自动化消费任务结果。
响应示例
json
{
"version": "0.1.20241101",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0518 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "serp",
"function": "task_get",
"se": "google",
"se_type": "events",
"language_code": "en",
"location_name": "Los Angeles,California,United States",
"keyword": "concerts",
"device": "desktop",
"os": "windows",
"date_range": "today"
},
"result": [
{
"se_results_count": 0,
"items_count": 10,
"items": [
{
"type": "event_item",
"rank_group": 1,
"rank_absolute": 1,
"position": "right",
"xpath": "/html/body/div/div/div/div/div/div/div/ul/li",
"title": "USC Thornton Winds Concert",
"description": "USC Thornton Winds Concert | Opera | Cast and Crew | Performances, schedule and tickets | View more information on Operabase",
"url": "https://www.operabase.com/productions/usc-thornton-winds-concert-288717/en",
"image_url": "https://api.seermartech.cn/cdn/i/11071149-1535-0066-0000-04277357960b:0",
"event_dates": {
"start_datetime": "2024-11-07T16:00:00",
"end_datetime": null,
"displayed_dates": "Thu, Nov 7, 4 PM"
},
"location_info": {
"name": "Bovard Auditorium",
"address": "Bovard Administration Building, 3551 Trousdale Pkwy, Los Angeles, CA",
"url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c7e19c55535f:0x40cc3d456c923735?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQICRAA&hl=en&gl=US",
"cid": "4669174282059921205",
"feature_id": "0x80c2c7e19c55535f:0x40cc3d456c923735"
},
"information_and_tickets": []
},
{
"type": "event_item",
"rank_group": 2,
"rank_absolute": 2,
"position": "right",
"xpath": "/html/body/div/div/div/div/div/div/div/ul/li",
"title": "Porches",
"description": "Find tickets for Porches with sweet93 at Fonda Theatre in Los Angeles on 11/7/2024 at 8:30 PM",
"url": "https://open.spotify.com/concert/4QRbanGpEaLc4SPxtof43l",
"image_url": "https://api.seermartech.cn/cdn/i/11071149-1535-0066-0000-04277357960b:1",
"event_dates": {
"start_datetime": "2024-11-07T20:00:00",
"end_datetime": "2024-11-07T22:00:00",
"displayed_dates": "Thu, Nov 7, 8–10 PM"
},
"location_info": {
"name": "The Fonda Theatre",
"address": "6126 Hollywood Blvd, Los Angeles, CA",
"url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bf387b884131:0x8f02ec38fce98388?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIERAA&hl=en&gl=US",
"cid": "10305058626882601864",
"feature_id": "0x80c2bf387b884131:0x8f02ec38fce98388"
},
"information_and_tickets": []
}
]
}
]
}
]
}状态码与错误处理
建议重点以下字段:
- 顶层
status_code/status_message tasks[].status_code/tasks[].status_message
通用规则:
20000:请求成功40000及以上:通常表示任务或请求存在错误,需要按返回信息处理
建议在生产环境中:
- 检查顶层状态码是否成功
- 再逐个检查
tasks任务状态 - 若
result为空或状态码异常,记录原始响应并进行重试或告警
实用场景
- 监控活动类,抓取
concerts、exhibitions、festivals等查询下的事件结果,评估品牌或客户活动在搜索结果中的可见性。 - 跟踪票务与聚合平台排名,分析不同活动结果的
rank_absolute、url、domain,判断自有站点与第三方票务平台的竞争格局。 - 提取活动时间与地点,利用
event_dates和location_info构建本地活动数据库,支持策划、城市页聚合和落地页生成。 - 识别搜索细化需求,基于
refinement_chips分析用户在活动搜索中的二级筛选偏好,用于扩展长尾与专题页结构。 - 场馆口碑数据,利用
location_info.cid和feature_id将活动结果与地点评价数据打通,本地 SEO 与场馆合作分析。