主题
获取 Google 商家信息(实时)
本接口用于实时获取 Google 中某个商家实体的信息。返回结果会受所选地点与语言影响,因此同一商家在不同地区、不同语言环境下,展示可能不同。
接口说明
- 请求方式:
POST - 接口地址:
https://api.seermartech.cn/v3/business_data/google/my_business_info/live
计费说明
创建任务即会产生费用。根据参考单价换算,参考价约 ¥0.0864 / 次。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
调用限制
- 每分钟最多可发起 2000 次 API 调用
- 每个 POST 请求最多 100 个任务
- 如果单次 POST 中任务数 100,出部分会返回错误
40006
请求体格式
所有 POST 数据需使用 JSON(UTF-8) 格式,且请求体为数组:
json
[
{
"location_code": 1023191,
"language_code": "en",
"keyword": "RustyBrick, Inc."
}
]请求参数
以下为设置任务时可用字段。
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。用于指定商家名称的。最长支持 700 个字符。字段中的 %## 会被解码,字符 + 会被解码为空格。如果需要传 % 字符,请写为 %25。该字段也可直接传以下标识符:cid(Google 定义的商家唯一 ID)、place_id(Google Maps 商家标识)。示例:cid:194604053573767737、place_id:GhIJQWDl0CIeQUARxks3icF8U8A |
location_name | string | 搜索位置完整名称。若未传 location_code 或 location_coordinate,则该字段填。传此字段后,无需再传 location_code 或 location_coordinate。可通过 /v3/business_data/google/locations 获取支持的位置列表。示例:London,England,United Kingdom |
location_code | integer | 搜索位置编码。若未传 location_name 或 location_coordinate,则该字段填。传此字段后,无需再传 location_name 或 location_coordinate。可通过 /v3/business_data/google/locations 获取支持的位置编码。示例:2840 |
location_coordinate | string | GPS 坐标定位。若未传 location_name 或 location_code,则该字段填。格式为:latitude,longitude,radius。纬度、经度最多支持 7 位小数;radius 最小值为 199.9(毫米),最大值为 199999(毫米)。示例:53.476225,-2.243572,200 |
language_name | string | 搜索语言完整名称。若未传 language_code,则该字段填。传此字段后,无需再传 language_code。可通过 /v3/business_data/google/languages 获取支持的语言列表。示例:English |
language_code | string | 搜索语言代码。若未传 language_name,则该字段填。传此字段后,无需再传 language_name。可通过 /v3/business_data/google/languages 获取支持的语言代码。示例:en |
tag | string | 可选,自定义任务标识。最大长度 255 字符。可用于在结果中识别和匹任务;响应的 data 对象中会返回该值。 |
keyword 字段补说明
keyword 不可传商家名称,也支持直接通过商家标识定位:
cid:{商家ID}place_id:{商家ID}
示例:
text
cid:2946633002421908862
place_id:ChIJP0warDDowokRfvXMkBqL5Cg响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表见 /v3/appendix/errors |
status_message | string | 通用状态信息,完整列表见 /v3/appendix/errors |
time | string | 执行耗时,单位秒 |
cost | float | 本次所有任务总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一 ID,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors |
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:... |
se_domain | string | 请求中指定的搜索引擎域名 |
location_code | integer | 请求中的位置编码 |
language_code | string | 请求中的语言代码 |
check_url | string | 可直接访问的搜索结果地址,用于核验结果准确性 |
datetime | string | 数据抓取时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00 |
item_types | array | items 中出现的结果类型,当前可能值:google_business_info |
items_count | integer | items 数组中的数量 |
items | array | 商家结果数组 |
items[] 字段说明
items[] 中的类型为 google_business_info。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 google_business_info |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 在所有结果中的绝对排名 |
position | string | 在搜索结果页中的展示位置 |
title | string | 商家名称 |
original_title | string | 未被 Google 翻译的原始标题 |
description | string | 商家描述 |
category | string | 商家主分类 |
category_ids | array | 局分类 ID,不随国家变化 |
additional_categories | array | 更细分的附加分类 |
cid | string | Google 定义的商家唯一 client id,可用于后续评论等分析 |
feature_id | string | 搜索结果中的唯一标识 |
address | string | 商家完整地址 |
address_info | object | 地址结构化信息 |
place_id | string | Google Maps 的商家唯一标识 |
phone | string | 商家电话 |
url | string | 商家官网 URL |
contact_url | string | 优联系页面 URL |
contributor_url | string | Local Guides 用户或实体资料页 URL(如有) |
book_online_url | string | “在线预订”按钮对应的 URL |
domain | string | 商家域名 |
logo | string | 商家资料中的 Logo 图片 URL |
main_image | string | 商家资料中的主图 URL |
total_photos | integer | 商家资料中图片总数 |
snippet | string | 商家附加信息摘要 |
latitude | float | 商家在地图中的纬度 |
longitude | float | 商家在地图中的经度 |
is_claimed | boolean | 是否已由商家所有在 Google Maps 中认领/验证 |
attributes | object | 基于用户反馈和商家分类展示的服务属性 |
place_topics | object | 评论中高频提及的商品/服务及出现次数 |
rating | object | 评分信息 |
rating_distribution | object | 1 星到 5 星的评分分布 |
people_also_search | array | 用户也常搜索的商家 |
work_time | object | 营业时间信息 |
popular_times | object | 忙碌时段信息 |
local_business_links | array | 搜索结果中可直接与商家交互的链接,如预订、点单、菜单等 |
is_directory_item | boolean | 是否属于同地址目录项中的一个商家 |
directory | array | 同地址目录中的商家信息 |
price_level | string | 价格级别,可选值:inexpensive、moderate、expensive、very_expensive |
hotel_rating | integer | 店星级,范围 1-5;无数据时为 null |
services | array | 商家提供的服务列表 |
重要嵌套字段说明
address_info
| 字段名 | 类型 | 说明 |
|---|---|---|
borough | string | 行政区/区县 |
address | string | 街道地址 |
city | string | 城市名称 |
zip | string | 邮编 |
region | string | 区域/州/DMA 区域 |
country_code | string | ISO 国家代码 |
attributes
| 字段名 | 类型 | 说明 |
|---|---|---|
available_attributes | object | 商家已提供的服务属性 |
unavailable_attributes | object | 商家未提供的服务属性 |
place_topics
示例:
json
{
"egg roll": 48,
"birthday": 33
}表示客户评论中提及这些主题词的评论数量。
rating
| 字段名 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents、CustomMax |
value | integer/float | 评分值 |
votes_count | integer | 评分/评论数 |
rating_max | integer | 该评分类型的最大值 |
rating_distribution
| 字段名 | 类型 | 说明 |
|---|---|---|
1 | integer | 1 星评分数量 |
2 | integer | 2 星评分数量 |
3 | integer | 3 星评分数量 |
4 | integer | 4 星评分数量 |
5 | integer | 5 星评分数量 |
people_also_search[]
| 字段名 | 类型 | 说明 |
|---|---|---|
cid | string | 商家的 cid |
feature_id | string | 商家的 SERP素 ID |
title | string | 商家名称 |
rating | object | 商家的评分信息 |
work_time
| 字段名 | 类型 | 说明 |
|---|---|---|
work_hours | object | 营业时间信息 |
current_status | string | 当前状态,可选值:opened、closed、temporarily_closed、closed_forever |
work_hours.timetable
按星期返回营业时段,以下字段:
sundaymondaytuesdaywednesdaythursdayfridaysaturday
每一天通常为数组,数组中的:
| 字段名 | 类型 | 说明 |
|---|---|---|
open | object | 开始营业时间 |
close | object | 结束营业时间 |
open / close部字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
hour | integer | 24 小时制小时 |
minute | integer | 分钟 |
popular_times
| 字段名 | 类型 | 说明 |
|---|---|---|
popular_times_by_days | object | 每周各天的忙碌时段数据 |
每一天(如 sunday、monday 等)为数组,数组:
| 字段名 | 类型 | 说明 |
|---|---|---|
time.hour | integer | 24 小时制小时 |
time.minute | integer | 分钟 |
popular_index | integer | 忙碌指数,范围 0-100,数值越高表示该时段越繁忙 |
local_business_links
可返回以下交互类型:
预订链接
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 reservation |
title | string | 预订系统域名/标题 |
url | string | 预订链接 |
点单链接
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 order |
delivery_services | array | 可用服务列表 |
delivery_services[]素:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 delivery_services_element |
title | string | 外卖/点单平台名称 |
url | string | 下单链接 |
菜单链接
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 menu |
title | string | 菜单系统域名/标题 |
url | string | 菜单查看链接 |
directory
当商家位于商场、商务中心等同地址目录中时,可能返回该字段。
| 字段名 | 类型 | 说明 |
|---|---|---|
title | string | 目录标题,可能值如 At this place、Directory |
items | array | 目录商家列表 |
directory.items[] 中类型通常为 maps_search,以下字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 maps_search |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
domain | string | 商家域名 |
title | string | 商家名称 |
url | string | 商家官网 URL |
rating | object | 评分信息 |
rating_distribution | object | 评分分布 |
snippet | string | 商家附加说明 |
address | string | 完整地址 |
address_info | object | 地址结构化信息 |
place_id | string | 商家 place_id |
phone | string | 电话 |
main_image | string | 主图 URL |
total_photos | integer | 图片总数 |
category | string | 主分类 |
category_ids | array | 分类 ID |
work_hours | object | 营业时间 |
feature_id | string | SERP素唯一标识 |
cid | string | 商家 cid |
latitude | float | 纬度 |
longitude | float | 经度 |
is_claimed | boolean | 是否已认领 |
local_justifications | array | 本地展示理由文本 |
is_directory_item | boolean | 是否属于目录项 |
price_level | string | 价格级别 |
hotel_rating | integer | 店星级 |
services[]
| 字段名 | 类型 | 说明 |
|---|---|---|
category | string | 服务所属分类,例如:Internet Marketing Service |
title | string | 服务名称 |
snippet | string | 商家提供的服务描述 |
price | object | 服务价格信息 |
price部字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格 |
regular | float | 原价 |
max_value | float | 非折扣最高价 |
currency | string | ISO 货币代码 |
is_price_range | boolean | 是否为价格区间 |
displayed_price | string | Google 商家资料中展示的价格文本 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/business_data/google/my_business_info/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_name": "New York,New York,United States",
"language_name": "English",
"keyword": "RustyBrick, Inc.",
"tag": "some_string_123"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/business_data/google/my_business_info/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"location_code": 1023191,
"language_code": "en",
"keyword": "RustyBrick, Inc."
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postArray = [
{
location_name: "New York,New York,United States",
language_name: "English",
keyword: "RustyBrick, Inc.",
tag: "some_string_123"
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/business_data/google/my_business_info/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postArray
})
.then((response) => {
// 返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20231117",
"status_code": 20000,
"status_message": "Ok.",
"time": "10.2468 sec.",
"cost": 0.0054,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "business_data",
"function": "my_business_info",
"se": "google",
"language_code": "en",
"location_name": "New York,New York,United States",
"keyword": "RustyBrick, Inc.",
"se_type": "business_info",
"device": "desktop",
"os": "windows"
},
"result": [
{
"items_count": 1,
"items": [
{
"additional_categories": [],
"cid": "2946633002421908862",
"feature_id": "0x89c2e830ac1a4c3f:0x28e48b1a90ccf57e",
"address": "250 W Nyack Rd #200, West Nyack, NY 10994",
"address_info": {
"borough": null,
"address": "250 W Nyack Rd #200",
"city": "West Nyack",
"zip": "10994",
"region": "New York",
"country_code": "US"
},
"place_id": "ChIJP0warDDowokRfvXMkBqL5Cg",
"phone": "+1877-467-8789",
"url": "https://www.rustybrick.com/",
"contact_url": null,
"contributor_url": "https://maps.google.com/maps/contrib/104876075931666699163",
"book_online_url": null,
"domain": "www.rustybrick.com",
"logo": "https://lh4.googleusercontent.com/-fsVsOfiYWxE/AAAAAAAAAAI/AAAAAAAAAAA/vBRv_lPQwLU/s44-p-k-no-ns-nd/photo.jpg",
"main_image": "https://lh5.googleusercontent.com/p/AF1QipMrswj0taBNYX4QIk1IY3RSj6LXipOc6UEzDW6Y=w648-h240-k-no",
"total_photos": 35,
"snippet": "250 W Nyack Rd #200, West Nyack, NY 10994",
"latitude": 41.097342999999995,
"longitude": -73.9934641,
"is_claimed": true,
"attributes": {
"available_attributes": {
"from_the_business": [],
"service_options": [],
"accessibility": [],
"planning": []
},
"unavailable_attributes": null
},
"place_topics": {
"SEO": 4,
"news": 3
},
"rating": {
"rating_type": "Max5",
"value": 4.7,
"votes_count": 49,
"rating_max": null
},
"hotel_rating": null,
"price_level": null,
"rating_distribution": {
"1": 2,
"2": 0,
"3": 2,
"4": 4,
"5": 41
},
"people_also_search": [],
"work_time": {
"work_hours": {
"timetable": {
"sunday": null,
"monday": [],
"tuesday": [],
"wednesday": [],
"thursday": [],
"friday": [],
"saturday": null
},
"current_status": "open"
}
},
"popular_times": null,
"local_business_links": null,
"is_directory_item": false,
"directory": null,
"services": []
}
]
}
]
}
]
}错误处理
建议按 status_code 与 tasks[].status_code 双层处理错误。
常见规则:
- 顶层
status_code != 20000:表示本次请求整体失败 tasks[].status_code != 20000:表示某个任务失败- 当单次 POST 中任务数 100 时,出部分返回
40006
完整错误码和说明请参考 /v3/appendix/errors。
使用建议
- 优使用
location_code和language_code,便于程序稳定调用。 - 若已知商家唯一标识,优通过
cid:或place_id:传keyword,能减少同名商家歧义。 - 对多门店品牌,建议按城市或坐标拆分请求,因地理位置不同导致结果偏差。
- 如需校验结果,可结合返回的
check_url进行人工抽样核查。
实用场景
- 核验门店资料:批量获取商家的名称、地址、电话、官网、营业时间等信息,用于本地 SEO 资料一致性检查。
- 监控品牌口碑:抓取评分、评分分布、评论高频主题词,快速识别差评风险与用户点。
- 分析竞品商家卡片:获取竞品分类、附加分类、服务项、价格级别与图片数量,优化自身商家页。
- 识别转化:提取预订、点单、菜单等
local_business_links,评估商家在本地搜索中的直接转化能力。 - 挖掘同址与商家:利用
directory和people_also_search发现同地址商户与竞品,支持本地市场格局分析。