Skip to content

获取商家问答数据(实时)

接口说明

该接口用于实时获取指定商家在 Google 商家资料中的问答信息:

  • 问题
  • 回答
  • 提问/回答时间
  • 用户资料信息
  • 问答对应链接
  • 商家实体标识信息

返回结果受所选地区语言影响。地区与语言可分别通过以下容路径查询:

  • /v3/business_data/google/locations
  • /v3/business_data/google/languages

请求地址

POST https://api.seermartech.cn/v3/business_data/google/questions_and_answers/live

计费说明

按每 20 条问题计费;每个问题最多返回 5 条回答

如果设置的 depth 大于 20,且搜索引擎返回 20 条问题,可能产生额外费用。 如果设置的 depth 高于返回的问题数量,差额会自动退回账户余额。

参考价约按平台价格换算,扣费以响应头 X-SeerMarTech-Charge-CNY 为准

调用限制

  • 每分钟最多发起 2000 次 API 调用
  • 每次 POST 最多提交 100 个任务 -过 100 个任务时,出部分将返回错误 40006

请求体格式

所有 POST 数据使用 UTF-8 编码的 JSON,且请求体格式为 JSON 数组:

json
[
 {
 "location_name": "Los Angeles,California,United States",
 "language_code": "en",
 "keyword": "The Last Bookstore"
 }
]

请求参数

字段名类型说明
keywordstring。用于指定商家名称。最长 700 个字符%## 会被解码,+ 会被解码为空格。如果需要在 keyword 中使用 %,请写为 %25。该字段也可传商家标识:cidplace_id。示例:cid:194604053573767737place_id:GhIJQWDl0CIeQUARxks3icF8U8A
location_namestring搜索引擎地区名。当未提供 location_codelocation_coordinate 时填。使用该字段时,无需再传 location_codelocation_coordinate。示例:London,England,United Kingdom
location_codeinteger搜索引擎地区编码。当未提供 location_namelocation_coordinate 时填。使用该字段时,无需再传 location_namelocation_coordinate。示例:2840
location_coordinatestringGPS 坐标。当未提供 location_namelocation_code 时填。格式:latitude,longitude,radiuslatitudelongitude 最多 7 位小数;radius 最小值 199.9(毫米),最大值 199999(毫米)。示例:53.476225,-2.243572,200
language_namestring搜索引擎语言名。当未提供 language_code 时填。使用该字段时,无需再传 language_code。示例:English
language_codestring搜索引擎语言代码。当未提供 language_name 时填。使用该字段时,无需再传 language_name。示例:en
depthinteger解析深度,可选。表示要获取的结果数量。默认值:20;最大值:100。账户按每 20 条结果计费。设置 20 可能因返回结果增多而产生额外费用。
tagstring自定义任务标识,可选。最长 255 个字符。可用于任务追踪与结果匹。响应中的 data 对象会返回该值。

keyword 字段补说明

keyword 不可以传商家名称,也可以直接传商家唯一标识:

  • cid:{商家ID}
  • place_id:{地点ID}

例如:

text
cid:2946633002421908862
place_id:GhIJQWDl0CIeQUARxks3icF8U8A

当请求时传 cid,响应中的 keyword 字段会返回对应的 cid 值。

响应结构

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

顶层字段

字段名类型说明
versionstringAPI 当前版本
status_codeinteger通用状态码
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次所有任务总费用
tasks_countintegertasks 数组中的任务数
tasks_errorinteger返回错误的任务数
tasksarray任务数组

tasks[] 字段

字段名类型说明
idstring任务 ID,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000
status_messagestring任务状态信息
timestring任务执行耗时
costfloat当前任务费用
result_countintegerresult 数组数量
patharrayURL 路径
dataobject回显请求时提交的参数
resultarray结果数组

result[] 字段

字段名类型说明
keywordstring请求中传的 keyword,会返回解码后的值;若请求中使用了 cid,此处返回 cid:...
se_domainstring搜索引擎域名
location_codeinteger请求中的地区编码
language_codestring请求中的语言代码
check_urlstring结果校验链接,可用于人工核验
datetimestring结果获取时间,UTC 格式,如 2019-11-15 12:57:46 +00:00
cidstring商家实体的 Google 定义客户端 ID
feature_idstringSERP 功能唯一标识
item_typesarrayitems 中出现的类型,可能值:google_business_question_item
items_without_answersarray无回答的问题列表
items_countintegeritems 数组中的问题数量
itemsarray带回答的问题列表

问题对象字段说明

items_without_answers[]items[] 中的问题对象字段基本一致。

字段名类型说明
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[].items[] 中该问题对应的回答列表。

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

错误处理

请根据响应中的:

  • 顶层 status_code
  • 任务级 tasks[].status_code

进行错误处理。建议在集成时设计完善的异常处理机制。 常见限制错误:

  • 40006:单次 POST 提交的任务数 100

更多错误码请参考 /v3/appendix/errors

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/business_data/google/questions_and_answers/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
 {
 "location_name": "Los Angeles,California,United States",
 "language_code": "en",
 "keyword": "The Last Bookstore"
 }
]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/business_data/google/questions_and_answers/live"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}
payload = [
 {
 "location_name": "Los Angeles,California,United States",
 "language_code": "en",
 "keyword": "The Last Bookstore"
 }
]

response = requests.post(url, headers=headers, json=payload)
data = response.json

if data.get("status_code") == 20000:
 print(data)
else:
 print(f"error. Code: {data.get('status_code')} Message: {data.get('status_message')}")

TypeScript

typescript
const url = "https://api.seermartech.cn/v3/business_data/google/questions_and_answers/live";

const payload = [
 {
 location_name: "Los Angeles,California,United States",
 language_code: "en",
 keyword: "The Last Bookstore"
 }
];

async function fetchQuestionsAndAnswers {
 const response = await fetch(url, {
 method: "POST",
 headers: {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
 },
 body: JSON.stringify(payload)
 });

 const data = await response.json;

 if (data.status_code === 20000) {
 console.log(data);
 } else {
 console.error(`error. Code: ${data.status_code} Message: ${data.status_message}`);
 }
}

fetchQuestionsAndAnswers;

响应示例

json
{
 "version": "0.1.20240422",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "7.2446 sec.",
 "cost": 0.0054,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "business_data",
 "function": "questions_and_answers",
 "se": "google",
 "language_code": "en",
 "location_name": "Los Angeles,California,United States",
 "keyword": "The Last Bookstore",
 "se_type": "questions_and_answers",
 "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-US",
 "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-25 12:49:03 +00:00",
 "items": []
 }
 ]
 }
 ]
 }
 ]
}

响应结果解读

  • items_without_answers:没有回答的问题
  • items:已有回答或可展开回答的问题
  • 每个问题最多返回 5 条回答
  • 可通过 timestamp 分析问答时间分布
  • 可通过 profile_nameprofile_url 判断提问或回答身份特征
  • 可通过 question_textanswer_text 提取高频咨询主题

使用建议

  1. 优使用 cidplace_id 若您已经掌握商家唯一标识,建议通过 keyword 直接传 cid:...place_id:...,可以减少因名称重名造成的识别偏差。

  2. 地区和语言要与业务场景一致 问答结果会随地区与语言变化。做本地 SEO 分析时,建议固定目标市场的 location_code / language_code

  3. depth 控制成本与覆盖度 默认 20 适合常规监控;若需完整抓取更多历史问题,可适当提升,但应费用变化。

实用场景

  • 监控门店高频咨询问题:定期拉取商家问答,识别用户最常问的营业时间、停车、库存、预约等问题,帮助优化门店信息展示与客服话术。
  • 挖掘本地搜索需求:从 question_text 中提取用户真实表达,沉淀为 FAQ、落地页文案和本地 SEO ,提升自然流量转化。
  • 评估商家响应质量:分析是否存在未回答问题、回答是否及时、由谁回答,评估门店运营与口碑管理水平。
  • 对比竞品用户点:抓取竞品商家的问答,识别行业性疑问与差异化需求,为策略和服务设计提供依据。
  • 预警负面或敏感咨询:基于问题文本和时间戳监控近期异常问题,如服务争议、价格质疑、营业异常等,帮助团队及时介处理。

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