Skip to content

获取指定任务的 Google 商家问答结果

本接口用于根据任务 id 获取指定商家的 Google 商家问答结果。返回该商家的问题与回答明细问题、回答,以及发布时间、用户信息等数据。

接口说明

  • 请求方式GET
  • 接口地址https://api.seermartech.cn/v3/business_data/google/questions_and_answers/task_get/$id

说明:

  • $id:任务唯一标识,UUID 格式
  • 该任务结果可在任务创建后的 30 天 随时获取
  • 计费说明:在创建任务时扣费,结果获取接口在 30 天可调用
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准

路径参数

字段名类型说明
idstring任务标识符,UUID 格式。在本平台系统中唯一,可在 30 天用于查询任务结果

沙箱调试

可使用以下沙箱地址获取模拟结果:

https://sandbox.seermartech.cn/v3/business_data/google/questions_and_answers/task_get/00000000-0000-0000-0000-000000000000

说明:

  • 沙箱响应会返回该接口可用字段的模拟数据
  • 调用沙箱接口不产生费用

响应结构

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

顶层响应字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表请参考 /v3/appendix/errors
status_messagestring通用状态信息,完整列表请参考 /v3/appendix/errors
timestring执行耗时,单位秒
costfloat本次请求总任务成本,单位 USD
tasks_countintegertasks 数组中的任务数
tasks_errorintegertasks 数组中返回错误的任务数
tasksarray任务结果数组

建议在接时完善异常处理与错误状态处理逻辑。

tasks 数组字段

字段名类型说明
idstring任务标识符,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表请参考 /v3/appendix/errors
status_messagestring任务状态说明
timestring任务执行耗时,单位秒
costfloat该任务成本,单位 USD
result_countintegerresult 数组中的数量
patharrayURL 路径
dataobject与创建任务时 POST 请求中提交的参数一致
resultarray结果数组

result 数组字段

字段名类型说明
keywordstring创建任务时提交的。返回时会对 %## 进行解码,+ 会解码为空格
se_domainstring创建任务时指定的搜索引擎域名
location_codeinteger创建任务时指定的位置编码
language_codestring创建任务时指定的语言编码
check_urlstring搜索结果直达链接,可用于核验结果准确性
datetimestring获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
cidstring商家 cid,即本地商家唯一标识
feature_idstringSERP 特性唯一标识
item_typesarrayitems 中出现的结果类型。当前可能值:google_business_question_item
items_without_answersarray无回答的问题数组
items_countintegeritems 数组中的数量
itemsarray带回答的问题数组

如果创建任务时在 keyword 中传的是 cid,这里的 keyword 字段会返回形如 cid:2946633002421908862 的值。

问题对象字段

items_without_answersitems 中的问题对象类型均为 google_business_question_item

字段名类型说明
typestring素类型,固定为 google_business_question_item
rank_groupinteger在相同 type素组的位置
rank_absoluteinteger在中的绝对排名
question_idstring问题 ID
urlstring问题链接
profile_image_urlstring提问用户头像链接
profile_urlstring提问用户资料页链接
profile_namestring提问用户显示名称
question_textstring当前问题文本
original_question_textstring原始问题文本
time_agostring问题发布时间的相对时间描述
timestampstring问题发布时间,精确时间
itemsarray该问题下的子项;对于带回答的问题,这里回答列表;对于无回答问题,通常为空数组

回答对象字段

在带回答的问题中,items 数组回答对象,类型为 google_business_answer_element

每个问题最多返回 5 条回答

字段名类型说明
typestring素类型,固定为 google_business_answer_element
answer_idstring回答 ID
profile_image_urlstring回答用户头像链接
profile_urlstring回答用户资料页链接
profile_namestring回答用户显示名称
answer_textstring当前回答文本
original_answer_textstring原始回答文本
time_agostring回答发布时间的相对时间描述
timestampstring回答发布时间,精确时间

请求示例

cURL

bash
id="04261229-1535-0577-0000-e3c2f0a46daf"

curl --location --request GET "https://api.seermartech.cn/v3/business_data/google/questions_and_answers/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"

Python

python
import requests

task_id = "09151804-0696-0242-1000-94020b2b7bf5"
url = f"https://api.seermartech.cn/v3/business_data/google/questions_and_answers/task_get/{task_id}"

headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
data = response.json

if data.get("status_code") == 20000:
 print(data)
else:
 print(f"请求失败: {data.get('status_code')} - {data.get('status_message')}")

TypeScript

typescript
const taskId = "04261229-1535-0577-0000-e3c2f0a46daf";

fetch(`https://api.seermartech.cn/v3/business_data/google/questions_and_answers/task_get/${taskId}`, {
 method: "GET",
 headers: {
 "Content-Type": "application/json",
 "Authorization": "Bearer smt_live_YOUR_KEY"
 }
})
 .then(res => res.json)
 .then(data => {
 console.log(data);
 })
 .catch(err => {
 throw err;
 });

响应示例

json
{
 "version": "0.1.20240422",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.1082 sec.",
 "cost": 0,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "se_type": "questions_and_answers",
 "se": "google",
 "api": "business_data",
 "function": "questions_and_answers",
 "language_code": "en",
 "location_name": "Los Angeles,California,United States",
 "keyword": "The Last Bookstore",
 "device": "desktop",
 "os": "windows"
 },
 "result": [
 {
 "items_without_answers": [],
 "items_count": 20,
 "items": [
 {
 "type": "google_business_question_item",
 "rank_group": 2,
 "rank_absolute": 2,
 "question_id": "8@1:CAESGUNWX0I0cUFQSFFOMXc5aXBJVkdBQUZwMGc|",
 "url": "https://www.google.com/maps/place/data=!4m5!3m4!1s0x0:0x8591a1380838a935!10e4!18m1!1s8%401%3ACAESGUNWX0I0cUFQSFFOMXc5aXBJVkdBQUZwMGc%7C?hl=en&gl=US&gws_rd=cr&uule=w+CAIQIFISCRPaJ9xdx8KAEfQIRiVv3y_i",
 "profile_image_url": "https://lh3.googleusercontent.com/a/ACg8ocKM4j1jcO_7SFYlri5AK5VkfiLganwMkgGGvRcAGenJ6m-bWvM=s120-c-rp-mo-ba3-br100",
 "profile_url": "https://www.google.com/maps/contrib/106548099572226128293?hl=en-VN",
 "profile_name": "Charles Kang",
 "question_text": "Hi. Do you still trade used books--during pandemic etc?",
 "original_question_text": null,
 "time_ago": "3 years ago",
 "timestamp": "2021-04-26 09:29:33 +00:00",
 "items": []
 }
 ]
 }
 ]
 }
 ]
}

状态码与错误处理

请重点处理以下两层状态:

  1. 顶层状态status_code / status_message
  2. 任务级状态tasks[].status_code / tasks[].status_message

建议:

  • 当顶层 status_code != 20000 时,视为整个请求失败
  • 当顶层成功但 tasks[].status_code >= 40000 时,视为该任务获取失败
  • result 为空时,需结合任务状态判断是否仍在处理中,或任务不存在/已过期
  • 详细错误码请参考 /v3/appendix/errors

使用说明

  • 本接口是结果获取接口,不能直接发起采集任务
  • 使用前需通过对应的任务创建接口提交采集请求,并拿到任务 id
  • 同一个任务结果可在 30 天 反复查询,无额外费用
  • 如果需要按 cid 精确匹商家,建议在创建任务时传 cid:xxxx 形式的,以提高识别准确性

实用场景

  • 监控门店咨询热点:抓取商家页面中的高频提问,识别用户最心的营业时间、库存、停车、儿童友好等问题,门店运营优化 FAQ。
  • 发现未回复问题:提取 items_without_answers 中的问题,快速定位未处理咨询,提升商家响应速度与转化机会。
  • 分析用户真实需求:基于 question_textanswer_text 归纳主题,为本地 SEO 页面、问答和门店介绍文案提供依据。
  • 跟踪品牌口碑与服务质量:结合提问时间、回答时间和用户信息,观察商家互动是否及时,评估本地商家运营表现。
  • 构建竞品问答库:采集竞品商家问答,整理常见购买顾虑与服务问题,用于优化自身门店页面和客服知识库。

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