主题
按任务 ID 获取高级 Google店信息结果
本接口使用 GET 方法,通过任务 ID 获取高级 Google店信息结果:
GET https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/$id
高级信息接口可返回指定实体的结构化数据描述、地址、地理位置、星级、设施、评价、图片、价格、第三方预订渠道及按日期的价格信息等。
返回结果与创建任务时指定的 hotel_identifier、位置和语言参数。本平台会尽可能还原指定参数下的搜索结果。你可以通过响应中的 check_url 在无痕模式下打开搜索结果页面,以核验数据准确性。
计费说明
- 在创建任务时计费。
- 任务创建后 30 天可获取结果。
- 结果查询不会重复扣费。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求参数
请求路径中的 $id 替换为任务的唯一标识。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识。格式为 UUID,可在任务创建后的 30 天重复用于查询结果。 |
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。完整状态码请参考错误码文档。建议客户端实现异常和错误处理机制。 |
status_message | string | 通用状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
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 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | 店信息结果数组。 |
result 字段说明
基本信息
| 字段 | 类型 | 说明 |
|---|---|---|
hotel_identifier | string | 店唯一标识,即创建任务时提交的标识。例如:CgoI-KWyzenM_MV3EAE。 |
location_code | integer | 创建任务时提交的位置代码。 |
language_code | string | 创建任务时提交的语言代码。 |
check_url | string | 可直接访问的搜索结果 URL,可用于核验返回结果。 |
datetime | string | 获取结果的 UTC 日期和时间,格式为 yyyy-mm-dd hh-mm-ss +00:00。 |
title | string | 店名称。 |
stars | integer | 店星级,取值范围为 1 至 5。 |
stars_description | string | 店星级的文字描述。 |
address | string | 店实体的物理地址。 |
phone | string | 店联系电话。 |
about:介绍
| 字段 | 类型 | 说明 |
|---|---|---|
about | object | 店介绍信息。 |
description | string | 店主要描述。 |
sub_descriptions | array | 店补描述信息。 |
###住和退房时间
| 字段 | 类型 | 说明 |
|---|---|---|
check_in_time | object | 店时间。 |
check_in_time.hour | integer | 住时间的小时部分。 |
check_in_time.minute | integer | 住时间的分钟部分。 |
check_out_time | object | 店退房时间。 |
check_out_time.hour | integer | 退房时间的小时部分。 |
check_out_time.minute | integer | 退房时间的分钟部分。 |
full_address | string | 标准化格式的完整地址。 |
domain | string | 店官方网站域名。 |
url | string | 店官方网站 URL。 |
amenities:设施
amenities 是按标准化类别组织的设施信息。
| 字段 | 类型 | 说明 |
|---|---|---|
amenities | array | 店设施分类数组。 |
category | string | 设施标准化类别。 |
category_label | string | 设施类别的展示名称。 |
items | array | 该类别下的设施。 |
items.amenity | string | 设施标准化名称。 |
items.amenity_label | string | 设施展示名称。 |
items.hint | string | 设施的标准化补说明。 |
items.hint_label | string | 设施补说明的展示文本。 |
items.is_available | boolean | 指示该设施是否在提供。 |
popular_amenities:热门设施
| 字段 | 类型 | 说明 |
|---|---|---|
popular_amenities | array | 被标记为热门的设施。 |
amenity | string | 设施标准化名称。 |
amenity_label | string | 设施展示名称。 |
hint | string | 设施标准化补说明。 |
hint_label | string | 设施补说明的展示文本。 |
is_available | boolean | 指示该设施是否在提供。 |
location:位置
| 字段 | 类型 | 说明 |
|---|---|---|
location | object | 店位置信息。 |
neighborhood | string | 店所在街区或区域名称。 |
neighborhood_description | string | 所在街区或区域的描述。 |
maps_url | string | 店在地图中的位置 URL。 |
overall_score | float | 店位置综合评分,范围为 1 至 5。评分综合考虑附近景点、餐、交通和机场等因素,各因素权重可能不同。 |
score_by_categories | object | 按位置类别划分的评分。 |
score_by_categories.overall | float | 位置综合评分,范围为 1 至 5。 |
score_by_categories.things_to_do | float | 附近景点及休闲活动评分,范围为 1 至 5。 |
score_by_categories.restaurants | float | 附近餐评分,范围为 1 至 5。 |
score_by_categories.transit | float | 附近交通评分,范围为 1 至 5。 |
score_by_categories.airport_access | float | 机场通达性评分,范围为 1 至 5。 |
latitude | float | 店纬度。例如:39.4806397。 |
longitude | float | 店经度。例如:-106.0512973。 |
location_chain | array | 位置层级链中的。 |
location_chain素
| 字段 | 类型 | 说明 |
|---|---|---|
card_id | string | 卡片标识。 |
feature_id | string | 功能特征标识。 |
cid | string | 客户或地点标识。 |
title | string | 位置层级名称。 |
reviews:评价
| 字段 | 类型 | 说明 |
|---|---|---|
reviews | object | 店评价信息。 |
value | float | 基于用户投票计算的综合评分。 |
votes_count | integer | 用于计算评分的用户投票数量。 |
mentions | array | 按评价维度统计的提及信息。 |
rating_distribution | object | 1 至 5 分评价的投票分布。 |
rating_distribution.5 | integer | 5 分评价数量。 |
rating_distribution.4 | integer | 4 分评价数量。 |
rating_distribution.3 | integer | 3 分评价数量。 |
rating_distribution.2 | integer | 2 分评价数量。 |
rating_distribution.1 | integer | 1 分评价数量。 |
other_sites_reviews | array | 第三方网站上的评价。 |
mentions素
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 被评价维度的名称。 |
positive_score | float | 该维度的正面评价分数。 |
positive_count | integer | 正面评价数量。 |
negative_count | integer | 负面评价数量。 |
total_count | integer | 该维度的评价数量。 |
visible_by_default | boolean | 该评价维度是否默认展示。 |
other_sites_reviews素
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 第三方评价网站名称。 |
url | string | 第三方评价页面 URL。 |
review_text | string | 评价正文。 |
rating | object | 第三方评价中的评分信息。 |
rating.rating_type | string | 评分类型,可为 CustomMax 或 Max5。 |
rating.value | float | 评分值。CustomMax 的取值范围为 1 至 10,Max5 的取值范围为 1 至 5。 |
rating.votes_count | integer | 该评价的投票数量。 |
rating.rating_max | integer | 当前评分类型的最大评分值。 |
图片
| 字段 | 类型 | 说明 |
|---|---|---|
overview_images | array | 店概览页面展示的图片 URL 数组。 |
prices:价格
| 字段 | 类型 | 说明 |
|---|---|---|
prices | object | 店住宿价格信息。 |
price | integer | 当前每晚价格。 |
price_without_discount | integer | 未应用折扣时的每晚价格。 |
currency | string | 价格货币。默认通常为 USD,取决于创建任务时的设置。 |
discount_text | string | 折扣说明文本。 |
check_in | string | 住日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
check_out | string | 退房日期和时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
visitors | integer | 住人数。 |
items | array | 第三方网站提供的价格明细。 |
offers | array | 重点展示的价格优惠。 |
prices_by_dates | array | 按日期列出的住宿价格。 |
prices.items素
支持的 type 值为 hotel_info_price。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 hotel_info_price。 |
title | string | 第三方价格网站或渠道名称。 |
price | integer | 第三方网站显示的每晚价格。 |
currency | string | 价格货币。 |
url | string | 第三方预订页面 URL。 |
domain | string | 第三方网站域名。 |
is_paid | boolean | 是否为付费预订链接。true 表示广告,false 表示预订链接。 |
official_site | boolean | 是否展示“官方网站”标签。 |
free_cancellation_until | string | null | 取消截止时间,使用 UTC 格式。如果所选日期不支持取消,则为 null。 |
prices.offers素
type 固定为 hotel_info_price_offer。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 hotel_info_price_offer。 |
title | string | 价格优惠名称。 |
price | integer | 优惠价格。 |
currency | string | 价格货币。 |
url | string | 展示该优惠的网站页面 URL。 |
max_visitors | integer | 该价格适用的最大人数。 |
offer_images | array | 价格优惠图片 URL。 |
free_cancellation_until | string | null | 取消截止时间,使用 UTC 格式;不支持取消时为 null。 |
prices.prices_by_dates素
| 字段 | 类型 | 说明 |
|---|---|---|
price | integer | 指定日期的每晚价格。 |
currency | string | 价格货币,例如 USD。 |
check_in_date | string | 住日期和时间,UTC 格式。例如:2025-05-20 12:00:00 +00:00。 |
check_out_date | string | 退房日期和时间,UTC 格式。例如:2025-05-21 12:00:00 +00:00。 |
请求示例
cURL
bash
id="09171517-0696-0242-0000-a96bc1ad0bce"
curl --location --request GET \
"https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "09171517-0696-0242-0000-a96bc1ad0bce"
url = (
"https://api.seermartech.cn/v3/business_data/google/"
f"hotel_info/task_get/advanced/{task_id}"
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
response.raise_for_status()
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
f"请求失败,状态码:{result.get('status_code')},"
f"信息:{result.get('status_message')}"
)TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios
.get(
`https://api.seermartech.cn/v3/business_data/google/hotel_info/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.response?.data || error.message);
});响应示例
以下示例展示主要字段,数组中的部分已省略。响应可能更多设施、评价、图片和第三方价格条目。
json
{
"version": "0.1.20260420",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0736 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09171517-0696-0242-0000-a96bc1ad0bce",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0500 sec.",
"cost": 0,
"result_count": 1,
"data": {
"se_type": "hotel_info",
"se": "google",
"api": "business_data",
"function": "hotel_info",
"location_name": "New York,New York,United States",
"language_name": "English",
"hotel_identifier": "ChYIq6SB--i6p6cpGgovbS8wN2s5ODZfEAE",
"device": "desktop",
"os": "windows"
},
"result": [
{
"hotel_identifier": "ChYIq6SB--i6p6cpGgovbS8wN2s5ODZfEAE",
"location_code": 2840,
"language_code": "en",
"check_url": "https://www.google.com/travel/hotels",
"datetime": "2026-04-24 13:19:22 +00:00",
"title": "President Hotel Athens",
"stars": 4,
"stars_description": "4-star hotel",
"address": "Leof. Kifisias 43, Athina 115 23, Greece",
"phone": null,
"about": {
"description": "Hotel description",
"sub_descriptions": []
},
"check_in_time": {
"hour": 15,
"minute": 0
},
"check_out_time": {
"hour": 11,
"minute": 0
},
"full_address": "President Hotel Athens, Leof. Kifisias 43, Athina 115 23, Greece",
"domain": "president.gr",
"url": "https://president.gr/",
"amenities": [
{
"category": "food_and_drink",
"category_label": "Food & drink",
"items": [
{
"amenity": "restaurant",
"amenity_label": "Restaurant",
"hint": null,
"hint_label": null,
"is_available": true
}
]
}
],
"popular_amenities": [],
"location": {
"neighborhood": "Central Athens Regional Unit",
"neighborhood_description": "Busy Central Athens is known for classical landmarks.",
"maps_url": "https://maps.google.com/",
"overall_score": 3.1,
"score_by_categories": {
"overall": 3.1,
"things_to_do": 3.2,
"restaurants": 3.3,
"transit": 4.1,
"airport_access": 3.9
},
"latitude": 37.9890814,
"longitude": 23.7638777,
"location_chain": []
},
"reviews": {
"value": 4.2,
"votes_count": 8552,
"mentions": [],
"rating_distribution": {
"1": 5,
"2": 3,
"3": 10,
"4": 26,
"5": 56
},
"other_sites_reviews": []
},
"overview_images": [],
"prices": {
"price": 165,
"price_without_discount": null,
"currency": "USD",
"discount_text": null,
"check_in": "2026-04-25 00:00:00 +00:00",
"check_out": "2026-04-26 00:00:00 +00:00",
"visitors": 2,
"items": [
{
"type": "hotel_info_price",
"title": "Booking.com",
"price": 169,
"currency": "USD",
"url": "https://example.com/booking",
"domain": "example.com",
"is_paid": true,
"official_site": false,
"free_cancellation_until": null,
"offers": []
}
],
"prices_by_dates": null
}
}
]
}
]
}错误处理
请同时检查顶层和任务级别的 status_code:
20000:请求或任务成功。40000及以上:任务通常存在错误,应结合status_message进行处理。- 当
result为null或result_count为0时,应视为没有可用结果,并记录任务状态信息。
实用场景
- 采集设施与服务信息,构建页或住宿目录,帮助用户快速比较不同的条件。
- 监测评分和评价维度,分析星级、综合评分、正负面提及及评分分布,支持口碑管理。
- 比较不同预订渠道的房价,汇总官网、在线平台及渠道的价格,发现价格差异和渠道机会。
- 跟踪指定日期的价格变化,利用
prices_by_dates分析日期与退房日期对应的房价趋势, SEO 和价格规划。 - 评估位置竞争力,结合景点、餐、交通和机场通达性评分,优化“近景点”“交通便利”等本地搜索。