主题
获取 Google My Business Updates 任务结果
接口说明
通过任务 ID 获取 Google My Business Updates 结果。
本接口返回企业在 Google My Business 资料中发布的帖子。返回结果与创建任务时指定的 cid(客户 ID)或 keyword、location、language 参数一致。平台 API 会尽可能高精度模拟这些参数,因此返回结果通常可对应到任务创建时该条件下的搜索结果。
你也可以使用响应中的 check_url,在浏览器无痕模式下打开,以核验结果准确性。
请求方式
GET https://api.seermartech.cn/v3/business_data/google/my_business_updates/task_get/{id}
计费说明
在创建任务时扣费,任务结果在 30 天可重复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 参数名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务创建后可在 30 天随时通过该 ID 获取结果。 |
返回结构
接口返回 JSON 数据,顶层 tasks 数组,每个任务对象中对应结果。
沙箱说明
你可以通过沙箱端点获取模拟字段的数据结构,用于联调和字段适。沙箱请求不扣费。
示例:
https://sandbox.seermartech.cn/v3/business_data/google/hotel_searches/task_get/00000000-0000-0000-0000-000000000000
说明:该沙箱示例返回的是对应端点的模拟结果结构。
顶层返回字段
| 字段名 | 类型 | 说明 |
|---|---|---|
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 | 任务 ID,UUID 格式。 |
status_code | integer | 任务状态码,范围通常为 10000–60000。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行时间,单位秒。 |
cost | float | 该任务成本,单位 USD。 |
result_count | integer | result 数组中的数量。 |
path | array | URL 路径。 |
data | object | 创建任务时提交的原始参数。 |
result | array | 结果数组。 |
result 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 创建任务时提交的。返回时会对 %## 进行解码,+ 会被解码为空格。若创建任务时在 keyword 字段中传 cid,这里会直接返回该值,例如:cid:2946633002421908862。 |
se_domain | string | 创建任务时指定的搜索引擎域名。 |
location_code | integer | 创建任务时指定的位置编码。 |
language_code | string | 创建任务时指定的语言编码。 |
check_url | string | 搜索结果直达链接,可用于核验结果准确性。 |
datetime | string | 获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
business_updates_id | string | SERP 中 business updates 模块的标识符。 |
cid | string | Google 定义的客户 ID,本地商户唯一标识。 |
feature_id | string | SERP素唯一标识。 |
item_types | array | items 数组中的结果类型列表。当前可能值:google_business_post。 |
items_count | integer | items 数组中的数量。 |
items | array | 帖子结果列表。 |
items 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 google_business_post。 |
rank_group | integer | 同类型的排名。不同 type 的不会计该排序。 |
rank_absolute | integer | 在已返回更新中的绝对排名。 |
position | string | 素在 SERP 中的位置,当前为 right。 |
xpath | string | 素的 XPath。 |
author | string | 帖子。 |
snippet | string | 帖子的附加。 |
post_text | string | 帖子正文。 |
url | string | 帖子链接。 |
images_url | string | 帖子所含图片链接。 |
post_date | string | 帖子发布时间,格式:mm/dd/yyyy hh:mm:ss。 |
timestamp | string | 帖子发布时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
links | array | 帖子中的链接列表。 |
links 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 链接类型,当前为 link_element。 |
title | string | 锚文本。 |
url | string | 链接目标地址。 |
请求示例
curl
bash
id="09091111-0696-0243-0000-1e835179296a"
curl --location --request GET "https://api.seermartech.cn/v3/business_data/google/my_business_updates/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231934-2604-0066-2000-570459f04879"
url = f"https://api.seermartech.cn/v3/business_data/google/my_business_updates/task_get/{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 = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/business_data/google/my_business_updates/task_get/${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.20200909",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1259 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"se_type": "business_updates",
"se": "google",
"api": "business_data",
"function": "my_business_updates",
"language_code": "en",
"location_name": "New York,New York,United States",
"keyword": "RustyBrick, Inc.",
"device": "desktop",
"os": "windows"
},
"result": [
{
"items_count": 10,
"items": [
{
"type": "google_business_post",
"rank_group": 1,
"rank_absolute": 1,
"position": "right",
"xpath": "/div/span",
"author": "RustyBrick, Inc.",
"snippet": null,
"post_text": "The RustyBrick team is working from home. We are fully up and operational. But we are not physically in the office. Please be safe and stay home.",
"url": "https://search.google.com/local/posts?q=RustyBrick,+Inc.&ludocid=2946633002421908862&lpsid=1410215436954082713&source=sh/x/localposts&lsig=AB86z5VWpF0lsMxd28ZU-_oXjiYQ",
"images_url": "https://lh4.googleusercontent.com/-qgmI_Ron5SQ/AAAAAAAAAAI/AAAAAAAAAAA/cbSEs9rPOZE/s40-c-k-mo/photo.jpg",
"post_date": "04/02/2020 00:00:00",
"timestamp": "2020-04-02 00:00:00 +00:00",
"links": null
},
{
"type": "google_business_post",
"rank_group": 2,
"rank_absolute": 2,
"position": "right",
"xpath": "/div/span",
"author": "RustyBrick, Inc.",
"snippet": null,
"post_text": "We hope everyone is safe and healthy. Virtually all of our staff will be working remotely. Thankfully, we are set up to allow for remote work. Phone calls will be returned but it is best to email. Be safe!",
"url": "https://search.google.com/local/posts?q=RustyBrick,+Inc.&ludocid=2946633002421908862&lpsid=1037575848925112213&source=sh/x/localposts&lsig=AB86z5VWpF0lsMxd28ZU-_oXjiYQ",
"images_url": "https://lh4.googleusercontent.com/-qgmI_Ron5SQ/AAAAAAAAAAI/AAAAAAAAAAA/cbSEs9rPOZE/s40-c-k-mo/photo.jpg",
"post_date": "03/16/2020 00:00:00",
"timestamp": "2020-03-16 00:00:00 +00:00",
"links": null
}
]
}
]
}
]
}状态码说明
| 状态码 | 说明 |
|---|---|
20000 | 请求成功。 |
10000–60000 | 任务级状态码范围,表示处理状态或异常信息。建议结合 status_message 一并处理。 |
建议对顶层
status_code和tasks[].status_code同时进行校验;当任务未完成、结果为空或状态码大于等于40000时,应按失败或重试逻辑处理。
使用建议
- 通过对应的任务创建接口提交查询任务,再使用本接口按
id获取结果。 - 如果需要批量拉取已完成任务,可调用
/v3/business_data/google/my_business_updates/tasks_ready获取已完成任务列表。 - 使用
check_url可快速人工复核抓取结果。 - 当
keyword中传的是cid:xxxx形式时,可更稳定地定位指定商户。
实用场景
- 监控门店动态更新:定期抓取品牌门店帖子,及时掌握营业通知、活动推广、节假日安排等变化。
- 分析竞品本地运营:获取竞品商户发布的帖子,观察促销节奏、主题与发布时间策略。
- 校验多门店发布一致性:对连锁品牌不同地区门店进行批量采集,检查总部活动是否按计划同步落地。
- 提取本地搜索素材:收集商户帖子正文、图片和链接,为本地 SEO、运营和舆分析提供素材源。
- 追踪历史帖子变化:结合定时任务保存返回结果,建立门店动态时间线,用于复盘活动、和品牌沟通策略。