如何使用 TalorData 抓取 Google 飯店評論搜尋結果
了解如何使用 TalorData 抓取 Google 飯店評論搜尋結果。本技術指南涵蓋了 Google Hotels API 參數、Python requests 庫的使用、飯店評分、評論數量、價格、地理位置、設施、預訂選項、CSV 匯出以及監控工作流程等內容。
Hotel search data 很適合用來理解飯店在 Google Hotels 中如何展示:排名、價格、評分、評論數、地點、設施、可訂狀態和 booking options。
對旅遊平台、SEO 團隊、飯店集團、OTA 和市場研究團隊來說,這些資料可以回答:
|
問題 |
為什麼重要 |
|---|---|
|
某個目的地搜尋中出現哪些飯店? |
市場可見度 |
|
哪些飯店在特定日期排名更高? |
Travel SEO 和需求追蹤 |
|
可見評分與評論數是多少? |
Reputation monitoring |
|
價格如何隨入住日期變化? |
Price intelligence |
|
每家飯店有哪些 booking providers? |
Channel monitoring |
|
哪些飯店設施、可訂狀態更有競爭力? |
Competitive analysis |
問題是,Google Hotels 不是簡單的靜態頁面。結果會因 location、check-in date、check-out date、guest count、language、device 和 availability 變化。手動複製資料,很快就會失控。
Google Hotels API workflow 可以把這些資料變成結構化 JSON。
TalorData 的 Google Hotels API 可用於收集 structured hotel search results,包括 hotel names、prices、ratings、reviews、locations、amenities、availability、booking options 和 ranking positions。TalorData Google Hotels 頁面也展示了 q、location、google_domain、check_in_date、check_out_date、adults、no_cache 等主要請求參數。
這裡的 “hotel review search results” 是什麼?
這篇指南中的 hotel review search results,不是指抓取每個 booking website 上的完整評論文字。
更常見的做法,是收集 Google Hotels 搜尋結果中可見的 review-related signals,例如:
|
欄位 |
含義 |
|---|---|
|
|
平均評分 |
|
|
可見評論數 |
|
|
Guest review score |
|
|
Guest rating label 或 score |
|
|
可見評論訊號 |
|
|
飯店結果排名 |
|
|
飯店名稱 |
|
|
顯示價格 |
|
|
Booking providers 和 links |
|
|
設施與服務 |
|
|
地址或地理資料 |
TalorData 的 Google Hotels data 頁面列出 rating、review count、review score、guest rating 和 visible review signals 等 rating & review data,也包含 price、location、amenities、availability 和 booking options。
對多數 SEO 和 travel intelligence workflow 來說,這些可見 review signals 已經足以做 reputation monitoring 和競品比較。
使用場景
|
Workflow |
Example |
|---|---|
|
Hotel reputation tracking |
監控 rating 和 review count 變化 |
|
Travel competitor analysis |
比較飯店排名、價格、評分 |
|
Destination market research |
收集城市與地區飯店結果 |
|
Booking channel monitoring |
比較不同 booking providers 的曝光 |
|
Regional price comparison |
比較不同市場飯店價格 |
|
Local SEO for hotels |
檢查飯店是否出現在目的地搜尋中 |
|
AI travel agents |
將結構化飯店選項餵給行程規劃流程 |
TalorData 也將 hotel price monitoring、travel competitor analysis、destination market research、booking channel monitoring、reputation tracking 和 regional price comparison 作為 Google Hotels data 的常見 workflow。
核心 Google Hotels 參數
先從定義搜尋上下文的參數開始。
|
Parameter |
Required |
Purpose |
Example |
|---|---|---|---|
|
|
Yes |
選擇 Google Hotels search |
|
|
|
Usually |
飯店或目的地查詢 |
|
|
|
建議使用 |
搜尋地點上下文 |
|
|
|
Optional |
Google domain |
|
|
|
Yes |
入住日期 |
|
|
|
Yes |
離店日期 |
|
|
|
Optional |
成人數 |
|
|
|
Optional |
強制取得新結果 |
|
Hotel search 沒有日期,資料價值會很低。價格和可訂狀態都高度依賴入住與離店日期,所以 check_in_date 和 check_out_date 應該被當成核心輸入。
基本請求結構
實際 endpoint 和 authentication format,請以你的 TalorData dashboard 或 API docs 為準。
典型 JSON request:
{
"engine": "google_hotels",
"q": "hotels in Tokyo",
"location": "Tokyo, Japan",
"google_domain": "google.com",
"check_in_date": "2026-07-15",
"check_out_date": "2026-07-18",
"adults": 2,
"no_cache": true
}
Response 會返回可以解析成表格、dashboard、alerts 或 AI workflows 的 structured hotel search data。
Step 1:設定 API key
將 TalorData API key 和 endpoint 存成環境變數。
export TALORDATA_API_KEY="your_api_key_here"
export TALORDATA_SERP_ENDPOINT="your_talordata_serp_endpoint_here"
Windows PowerShell:
setx TALORDATA_API_KEY "your_api_key_here"
setx TALORDATA_SERP_ENDPOINT "your_talordata_serp_endpoint_here"
安裝 Python dependencies:
pip install requests pandas
Step 2:建立可重用 Python client
這個 function 會發送 Google Hotels request 並返回 JSON。
如果你的 TalorData dashboard 使用不同 request style,請調整 endpoint、request body 或 headers。
import os
import requests
from typing import Any, Dict, Optional
TALORDATA_API_KEY = os.getenv("TALORDATA_API_KEY")
TALORDATA_SERP_ENDPOINT = os.getenv("TALORDATA_SERP_ENDPOINT")
def fetch_google_hotels(
query: str,
location: str,
check_in_date: str,
check_out_date: str,
adults: int = 2,
google_domain: str = "google.com",
no_cache: bool = True,
extra_params: Optional[Dict[str, Any]] = None
) -> Dict[str, Any]:
"""
Fetch Google Hotels search results with TalorData SERP API.
"""
if not TALORDATA_API_KEY:
raise RuntimeError("Missing TALORDATA_API_KEY environment variable.")
if not TALORDATA_SERP_ENDPOINT:
raise RuntimeError("Missing TALORDATA_SERP_ENDPOINT environment variable.")
payload: Dict[str, Any] = {
"engine": "google_hotels",
"q": query,
"location": location,
"google_domain": google_domain,
"check_in_date": check_in_date,
"check_out_date": check_out_date,
"adults": adults,
"no_cache": no_cache
}
if extra_params:
payload.update(extra_params)
headers = {
"Authorization": f"Bearer {TALORDATA_API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(
TALORDATA_SERP_ENDPOINT,
json=payload,
headers=headers,
timeout=30
)
response.raise_for_status()
return response.json()
執行基本搜尋:
if __name__ == "__main__":
data = fetch_google_hotels(
query="hotels in Tokyo",
location="Tokyo, Japan",
check_in_date="2026-07-15",
check_out_date="2026-07-18",
adults=2
)
print(data)
Step 3:檢查 raw response
寫 parser 前,先檢查 raw JSON。
import json
print(json.dumps(data, indent=2, ensure_ascii=False)[:5000])
這很重要,因為 response fields 可能會因 result type、destination、availability 和返回資料不同而變。
可以找這類 array:
hotel_results
properties
hotels
organic_results
results
不要過早猜欄位。先看 JSON 洞穴牆上的紋路,再畫地圖。
Step 4:解析 hotel results
下面是一個較保守的 parser,會檢查幾個常見結果容器。
from typing import Any, Dict, List
def get_first_available_list(data: Dict[str, Any], keys: List[str]) -> List[Dict[str, Any]]:
for key in keys:
value = data.get(key)
if isinstance(value, list):
return value
return []
def parse_hotel_results(data: Dict[str, Any]) -> List[Dict[str, Any]]:
hotel_items = get_first_available_list(
data,
keys=[
"hotel_results",
"properties",
"hotels",
"organic_results",
"results"
]
)
parsed = []
for index, item in enumerate(hotel_items, start=1):
parsed.append({
"position": item.get("position", index),
"hotel_name": item.get("name") or item.get("title"),
"hotel_id": item.get("hotel_id") or item.get("property_token") or item.get("id"),
"link": item.get("link") or item.get("hotel_link"),
"thumbnail": item.get("thumbnail"),
"rating": item.get("rating"),
"review_count": item.get("review_count") or item.get("reviews"),
"review_score": item.get("review_score"),
"guest_rating": item.get("guest_rating"),
"price": item.get("price"),
"extracted_price": item.get("extracted_price"),
"currency": item.get("currency"),
"address": item.get("address"),
"latitude": item.get("latitude"),
"longitude": item.get("longitude"),
"hotel_class": item.get("hotel_class"),
"amenities": item.get("amenities"),
})
return parsed
使用方式:
data = fetch_google_hotels(
query="hotels in Tokyo",
location="Tokyo, Japan",
check_in_date="2026-07-15",
check_out_date="2026-07-18",
adults=2
)
hotels = parse_hotel_results(data)
for hotel in hotels[:5]:
print(hotel["position"], hotel["hotel_name"], hotel["rating"], hotel["review_count"])
Step 5:提取 review signals
如果重點是飯店評價監控,可以整理成更小的表。
def parse_hotel_review_signals(data: Dict[str, Any]) -> List[Dict[str, Any]]:
hotels = parse_hotel_results(data)
rows = []
for hotel in hotels:
rows.append({
"position": hotel.get("position"),
"hotel_name": hotel.get("hotel_name"),
"rating": hotel.get("rating"),
"review_count": hotel.get("review_count"),
"review_score": hotel.get("review_score"),
"guest_rating": hotel.get("guest_rating"),
"price": hotel.get("price"),
"currency": hotel.get("currency"),
"address": hotel.get("address"),
"link": hotel.get("link")
})
return rows
這張表適合看:
|
Metric |
為什麼重要 |
|---|---|
|
Position |
搜尋可見度 |
|
Rating |
Reputation quality |
|
Review count |
信任與評論量 |
|
Guest rating |
住客體驗訊號 |
|
Price |
價格與口碑對比 |
|
Address |
Property matching |
|
Link |
人工 QA 或 deeper inspection |
Step 6:保存成 CSV
import pandas as pd
data = fetch_google_hotels(
query="hotels in Tokyo",
location="Tokyo, Japan",
check_in_date="2026-07-15",
check_out_date="2026-07-18",
adults=2
)
review_rows = parse_hotel_review_signals(data)
df = pd.DataFrame(review_rows)
df.to_csv("google_hotel_review_signals.csv", index=False)
print(df.head())
CSV 可能長這樣:
|
position |
hotel_name |
rating |
review_count |
price |
|---|---|---|---|---|
|
1 |
Example Hotel Tokyo |
4.6 |
1820 |
$210 |
|
2 |
Sample Inn Ginza |
4.4 |
960 |
$185 |
|
3 |
Central Stay Tokyo |
4.2 |
740 |
$160 |
Step 7:按 rating 和 review count 比較飯店
Review count 和 rating 應該一起看。
4.8 分但只有 12 則評論,和 4.6 分但有 3,000 則評論,不是同一件事。
df["rating_num"] = pd.to_numeric(df["rating"], errors="coerce")
df["review_count_num"] = pd.to_numeric(df["review_count"], errors="coerce")
top_reviewed = df.sort_values(
by=["review_count_num", "rating_num"],
ascending=[False, False]
)
top_reviewed.to_csv("top_reviewed_hotels.csv", index=False)
print(top_reviewed[[
"position",
"hotel_name",
"rating",
"review_count",
"price"
]].head(10))
常見分組:
|
Segment |
Meaning |
|---|---|
|
High rating + high review count |
口碑強 |
|
High rating + low review count |
有潛力但樣本少 |
|
Low rating + high review count |
知名但有口碑風險 |
|
High price + low rating |
可能有轉換問題 |
|
High rank + weak reviews |
曝光強,但信任較弱 |
Step 8:追蹤 hotel review signals 變化
抓一次有用,但定期抓更有價值。
每次保存 search context:
|
Context |
Example |
|---|---|
|
Query |
|
|
Location |
|
|
Check-in date |
|
|
Check-out date |
|
|
Adults |
|
|
Collection timestamp |
|
|
Google domain |
|
|
No cache |
|
為每列加上 metadata:
from datetime import datetime, timezone
def add_search_context(
rows: List[Dict[str, Any]],
query: str,
location: str,
check_in_date: str,
check_out_date: str,
adults: int
) -> List[Dict[str, Any]]:
collected_at = datetime.now(timezone.utc).isoformat()
for row in rows:
row["query"] = query
row["location"] = location
row["check_in_date"] = check_in_date
row["check_out_date"] = check_out_date
row["adults"] = adults
row["collected_at"] = collected_at
return rows
使用:
query = "hotels in Tokyo"
location = "Tokyo, Japan"
check_in_date = "2026-07-15"
check_out_date = "2026-07-18"
adults = 2
data = fetch_google_hotels(
query=query,
location=location,
check_in_date=check_in_date,
check_out_date=check_out_date,
adults=adults
)
rows = parse_hotel_review_signals(data)
rows = add_search_context(
rows,
query=query,
location=location,
check_in_date=check_in_date,
check_out_date=check_out_date,
adults=adults
)
pd.DataFrame(rows).to_csv("hotel_review_snapshot.csv", index=False)
可以比較:
|
Change |
Meaning |
|---|---|
|
Rating increased |
口碑改善 |
|
Review count increased |
住客回饋增加 |
|
Position changed |
搜尋可見度變化 |
|
Price changed |
價格或可訂狀態變化 |
|
Hotel disappeared |
可訂狀態或排名問題 |
|
New competitor appeared |
市場變化 |
Step 9:監控多個目的地
同一套 workflow 可以用於多個城市。
destinations = [
{"query": "hotels in Tokyo", "location": "Tokyo, Japan"},
{"query": "hotels in Seoul", "location": "Seoul, South Korea"},
{"query": "hotels in Singapore", "location": "Singapore"},
]
all_rows = []
for destination in destinations:
data = fetch_google_hotels(
query=destination["query"],
location=destination["location"],
check_in_date="2026-07-15",
check_out_date="2026-07-18",
adults=2
)
rows = parse_hotel_review_signals(data)
rows = add_search_context(
rows,
query=destination["query"],
location=destination["location"],
check_in_date="2026-07-15",
check_out_date="2026-07-18",
adults=2
)
all_rows.extend(rows)
pd.DataFrame(all_rows).to_csv("multi_destination_hotel_reviews.csv", index=False)
適合:
|
Team |
Workflow |
|---|---|
|
Hotel groups |
比較品牌在不同城市的可見度 |
|
OTAs |
追蹤供給和口碑訊號 |
|
Travel SEO teams |
監控 destination SERPs |
|
Market researchers |
比較 hotel markets |
|
AI travel agents |
建立目的地感知的飯店推薦 |
Step 10:處理錯誤與重試
Travel data 會受日期、可訂狀態和 query context 影響。正式使用時應加入 retry logic。
import time
from requests import RequestException
def fetch_with_retries(
query: str,
location: str,
check_in_date: str,
check_out_date: str,
adults: int = 2,
retries: int = 3,
delay_seconds: int = 2
) -> Dict[str, Any]:
last_error = None
for attempt in range(1, retries + 1):
try:
return fetch_google_hotels(
query=query,
location=location,
check_in_date=check_in_date,
check_out_date=check_out_date,
adults=adults
)
except RequestException as error:
last_error = error
print(f"Attempt {attempt} failed: {error}")
time.sleep(delay_seconds)
raise RuntimeError(f"Failed after {retries} attempts: {last_error}")
正式環境也建議記錄:
|
Log field |
Why |
|---|---|
|
Query |
Debug search intent |
|
Location |
Debug local context |
|
Dates |
Debug availability |
|
Status code |
Debug API errors |
|
Response time |
Monitor speed |
|
Request ID |
Support troubleshooting |
|
Error message |
Fix failures faster |
建議保存哪些欄位?
Hotel review search monitoring 可以先用這個 schema:
{
"query": "hotels in Tokyo",
"location": "Tokyo, Japan",
"check_in_date": "2026-07-15",
"check_out_date": "2026-07-18",
"adults": 2,
"collected_at": "2026-06-30T09:00:00Z",
"hotel": {
"position": 1,
"hotel_name": "Example Hotel Tokyo",
"hotel_id": "example_hotel_id",
"rating": 4.6,
"review_count": 1820,
"review_score": 9.1,
"guest_rating": "Excellent",
"price": "$210",
"currency": "USD",
"address": "Example address, Tokyo",
"latitude": 35.6762,
"longitude": 139.6503,
"amenities": ["Free Wi-Fi", "Breakfast"],
"link": "https://..."
}
}
進階 workflow 可以加:
|
Field |
Use case |
|---|---|
|
|
Price comparison |
|
|
Stay-level cost comparison |
|
|
True cost analysis |
|
|
OTA and channel monitoring |
|
|
Inventory tracking |
|
|
Segment comparison |
|
|
UI display |
|
|
Local visibility |
|
|
Booking source analysis |
TalorData 列出的 price fields 包括 price、extracted price、currency、nightly rate、total price、taxes 和 fees,也列出 provider、booking link、offer price、booking source、hotel website 和 deal details 等 booking option fields。
常見錯誤
沒有設定 check-in 和 check-out dates
Hotel search data 高度依賴日期。一定要控制並保存日期。
比較不同 guest count
一位成人和兩位成人的搜尋,價格與可訂狀態都可能不同。
只看 rating
Rating 沒有 review count,容易誤判。兩者要一起追蹤。
忽略 position
飯店評分高但可見度低,仍然可能輸給排名更靠前的競品。
不保存 raw responses
建立 parser 時,請保存 raw JSON。不同目的地或結果類型可能欄位不同。
忘記 localization
Hotel results 可能因 market、language、domain 和 search location 變化。請保存完整 search context。
結語
使用 TalorData 抓取 Google Hotel review search results,本質上是把 Google Hotels 變成結構化監控流程。開始免費測試Google Hotel API
先從核心 request fields 開始:
|
Parameter |
Start with |
|---|---|
|
|
|
|
|
Destination 或 hotel query |
|
|
Search location |
|
|
Google domain |
|
|
未來入住日期 |
|
|
未來離店日期 |
|
|
Guest count |
|
|
Freshness control |
接著解析真正重要的欄位:hotel name、position、rating、review count、price、address、amenities、availability 和 booking options。
資料變成 JSON 或 CSV 後,就可以支撐 reputation tracking、hotel price monitoring、OTA analysis、destination research、AI travel tools 和 local SEO dashboards。
Google Hotels data 像一個擁擠大廳;好的 API workflow 會把它整理成乾淨的住客名單。