主题
通过任务 ID 获取 Google Hotel Info 高级结果
接口说明
该接口用于根据任务 id 获取 Google Hotel Info 高级结果。返回为指定实体在 Google Hotels 页面上的结构化信息:
-店描述
- 地理位置与周边信息
- 评分与点评
- 设施服务
- 图片
- 房价与第三方报价
- 更多字段
返回结果与创建任务时传的 hotel_identifier、location、language 等参数严格对应。本平台会尽可能高精度模拟这些参数,因此返回结果通常与任务创建时对应条件下的页面一致。
你也可以使用响应中的 check_url 在浏览器无痕模式下打开,以核验结果准确性。
请求方式
GET https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/$id
计费说明
该接口本身用于获取已创建任务的结果,在创建任务时扣费;任务结果在 30 天可重复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。可在任务创建后的 30 天 随时用于获取结果。 |
Sandbox
你可以使用以下沙箱地址查看该端点支持的完整字段结构,返回值为模拟数据:
https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/00000000-0000-0000-0000-000000000000
调用 Sandbox 不会产生费用。
返回结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表见参考文档 |
status_message | string | 通用状态信息 |
time | string | 执行时间,单位秒 |
cost | float | 本次请求总成本,单位 USD |
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 数组字段说明
基础信息
| 字段名 | 类型 | 说明 |
|---|---|---|
hotel_identifier | string | 店唯一标识;即请求中使用的 hotel_identifier。示例:CgoI-KWyzenM_MV3EAE |
location_code | integer | POST 请求中使用的地区编码 |
language_code | string | POST 请求中使用的语言编码 |
check_url | string | 搜索结果直达链接,可用于核验数据 |
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 | 住时间 |
hour | integer | 住小时 |
minute | integer | 住分钟 |
check_out_time | object | 退房时间 |
hour | integer | 退房小时 |
minute | integer | 退房分钟 |
full_address | string | 标准化完整地址 |
domain | string | 店官网域名 |
url | string | 店官网链接 |
amenities店设施
| 字段名 | 类型 | 说明 |
|---|---|---|
amenities | array | 店设施分类列表 |
category | string | 标准化设施分类 |
category_label | string | 分类展示名称 |
items | array | 设施项 |
amenity | string | 标准化设施名称 |
amenity_label | string | 展示用设施名称 |
hint | string | 标准化补说明 |
hint_label | string | 展示用补说明 |
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 | 店在地图中的链接 |
overall_score | float | 地理位置综合评分,范围通常为 1-5 |
score_by_categories | object | 各维度位置评分 |
overall | float | 综合位置评分 |
things_to_do | float | 周边可玩性评分 |
restaurants | float | 周边餐饮评分 |
transit | float | 周边交通评分 |
airport_access | float | 机场可达性评分 |
latitude | float | 纬度。示例:39.4806397 |
longitude | float | 经度。示例:-106.0512973 |
location_chain | array | 位置链路信息 |
location_chain 子字段
| 字段名 | 类型 | 说明 |
|---|---|---|
card_id | string | 卡片标识 |
feature_id | string | feature 标识 |
cid | string | client id |
title | string | 位置链标题 |
reviews 点评信息
| 字段名 | 类型 | 说明 |
|---|---|---|
reviews | object | 店点评汇总 |
value | float | 店总体评分 |
votes_count | integer | 参与评分的用户数 |
mentions | array | 按评价维度拆分的评论信息 |
title | string | 被评价维度名称 |
positive_score | float | 该维度正向评分 |
positive_count | integer | 该维度正向评论数 |
negative_count | integer | 该维度负向评论数 |
total_count | integer | 该维度总评论数 |
visible_by_default | boolean | 是否默认展示 |
rating_distribution | object | 1-5 分评分分布 |
5 | integer | 5 分票数 |
4 | integer | 4 分票数 |
3 | integer | 3 分票数 |
2 | integer | 2 分票数 |
1 | integer | 1 分票数 |
other_sites_reviews | array | 第三方站点评信息 |
other_sites_reviews 子字段
| 字段名 | 类型 | 说明 |
|---|---|---|
title | string | 点评来源站点名称 |
url | string | 第三方点评页面链接 |
review_text | string | 评论正文 |
rating | object | 点评分值信息 |
rating_type | string | 评分类型,可选:CustomMax、Max5 |
value | float | 评分值;CustomMax 通常为 1-10,Max5 为 1-5 |
votes_count | integer | 点评中的投票数 |
rating_max | integer | 对应评分体系的最大值 |
overview_images 概览图片
| 字段名 | 类型 | 说明 |
|---|---|---|
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 | 第三方价格来源列表 |
prices_by_dates | array | 按日期拆分的房价列表 |
prices.items 子字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定值:hotel_info_price |
title | string | 来源站点名称 |
price | integer | 第三方站点显示的每晚价格 |
currency | integer | 价格币种 |
url | string | 第三方报价页面链接 |
domain | string | 第三方域名 |
is_paid | boolean | 是否为付费预订链接;true 表示广告,false 表示预订链接 |
official_site | boolean | 是否带有 “Official Site” 标识 |
free_cancellation_until | string | 可取消的截止时间;如不可取消则为 null |
offers | array | 特色报价列表 |
offers 子字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定值:hotel_info_price_offer |
title | string | 报价标题 |
price | integer | 报价值 |
currency | string | 报价币种 |
url | string | 报价落地页链接 |
max_visitors | integer | 该报价适用的最大人数 |
offer_images | array | 报价图片 URL 列表 |
free_cancellation_until | string | 取消截止时间;不可用时为 null |
prices_by_dates 子字段
| 字段名 | 类型 | 说明 |
|---|---|---|
price | integer | 对应日期的每晚价格 |
currency | string | 币种。示例:USD |
check_in_date | string | 住日期,UTC 格式 |
check_out_date | string | 退房日期,UTC 格式 |
调用示例
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 = "02231934-2604-0066-2000-570459f04879"
url = f"https://api.seermartech.cn/v3/business_data/google/hotel_info/task_get/advanced/{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/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);
});获取已完成任务后再获取结果
通常你可以调用已完成任务列表接口,再逐个获取高级结果:
- 获取已完成任务列表:
GET /v3/business_data/google/hotel_info/tasks_ready - 获取单个任务高级结果:
GET /v3/business_data/google/hotel_info/task_get/advanced/$id
响应示例
json
{
"version": "0.1.20260420",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0736 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"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": [
{
"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/",
"location": {
"neighborhood": "Central Athens Regional Unit",
"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.989081399999996,
"longitude": 23.7638777
},
"reviews": {
"value": 4.2,
"votes_count": 8552,
"rating_distribution": {
"1": 5,
"2": 3,
"3": 10,
"4": 26,
"5": 56
}
},
"prices": {
"price": 165,
"currency": "USD",
"check_in": "2026-04-25 00:00:00 +00:00",
"check_out": "2026-04-26 00:00:00 +00:00",
"visitors": 2
}
}
]
}
]
}状态码说明
| 状态码 | 说明 |
|---|---|
20000 | 请求成功 |
10000-60000 | 任务级状态码范围,含义请参考错误码文档 |
建议同时检查顶层
status_code与tasks[].status_code。即使顶层请求成功,单个任务仍可能返回错误。
使用建议
- 通过创建任务接口提交
hotel_identifier、地区、语言等参数。 - 通过
/v3/business_data/google/hotel_info/tasks_ready轮询已完成任务。 - 对已完成任务调用本接口获取完整高级结果。
- 使用
check_url做抽样核验。 - 对
prices.items、offers、reviews等嵌套数组做好空值判断。
实用场景
- 监控页信息完整度:抓取描述、设施、联系方式、官网链接等字段,发现信息缺失或展示异常,帮助提升在搜索场景下的转化表现。
- 对比多渠道房价:分析
prices.items中不同 OTA、官网和广告链接的报价,识别最低价来源与价格倒挂问题,支持价格策略优化。 - 评估地理位置竞争力:使用
location.overall_score及各分类评分衡量周边餐饮、交通、景点便利度,为选址分析和竞品对比提供依据。 - 提炼用户口碑重点:基于
reviews.mentions、总评分和评分分布识别用户最的优缺点,运营团队优化服务和卖点表达。 - 追踪房型与促销变化:通过
offers和prices_by_dates观察不同日期、房型和促销条件的价格波动,为投放、促销和收益管理提供数据支持。