微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🏨

实时比价全球酒店,一键锁定最优价格

Google Hotels · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
效率 安全 A 级 作者 skillhq-ai 公开目录收录
1.1k 下载 1 安装 3.6k 收藏 7 浏览

简介

通过浏览器自动化搜索 Google Hotels,实时获取酒店价格、评分和房态,支持日期编码与智能比价。

原始描述

Search Google Hotels for hotel prices, ratings, and availability using browser automation. Use when user asks to search hotels, find accommodation, compare h...

通过你的 Agent 添加

安装目录:google-hotels/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/google-hotels/
Codex CLI~/.codex/skills/google-hotels/
DeepSeek Harness~/.agents/skills/google-hotels/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

google-hotels 是一项基于浏览器自动化(agent-browser)的酒店搜索技能,专为用户实时查询酒店价格、评分、设施及房态而设计。核心工作流采用 URL Fast Path 策略:通过 base64 编码的 ts 参数将入住/退房日期直接嵌入 URL,仅需 3 条命令即可完成带日期的搜索,相比传统交互式流程(10+ 命令)效率提升显著。

显著优点

  1. 极速加载:URL Fast Path 预编码日期参数,避免逐层点击日历,直接呈现价格结果
  2. 精准搜索:支持城市、地标、机场、特定酒店名称等多维度定位格式
  3. 智能比价:结果聚合 Booking.com、Expedia、Agoda 等 OTA 价格,并支持跳转酒店官网核查直订优惠
  4. 并行对比:允许同时开启多 session 对比不同区域酒店(如涩谷 vs 新宿)
  5. 会员福利提示:自动识别万豪、希尔顿、IHG 等连锁品牌,提醒用户会员专属价格与积分权益

潜在缺点与局限性

  • 仅搜索不预订:明确禁止完成支付流程,用户需自行跳转预订
  • 无度假租赁:不覆盖 Airbnb 等短租房源,仅限传统酒店
  • 日期编码约束:自定义 ts 参数仅支持 2025-2030 年,且需通过 bash 函数生成
  • 房客数需手动设置:URL 无法预置房间/人数,需进入页面后交互调整
  • 筛选器交互繁琐:星级、价格区间、设施等过滤条件需逐一点击,无 URL 快捷方式

适合人群

  • 差旅规划者:需快速对比多城市/多日期酒店价格
  • 价格敏感型旅客:希望对比 OTA 与官网直订价差,挖掘促销码
  • 常旅客计划会员:万豪、希尔顿等会籍用户,需识别可累积积分的预订渠道

常规风险

  • 价格实时波动:Google Hotels 展示价格为动态库存,快照后可能变化,需提示用户
  • CAPTCHA 阻断:高频或异常流量可能触发人机验证,系统禁止自动破解,需用户介入
  • 货币显示偏差:依赖浏览器 locale,可能与用户预期币种不符
  • 日历导航易错:月份跳转需使用 "<"/">" 箭头,误操作易偏离目标日期

技术亮点

技能文档提供了完整的 hotel_ts bash 函数实现,通过 protobuf 字节级编码生成 Google 专有的日期参数,体现了对目标系统内部协议的深度逆向理解。

技能正文


name: google-hotels description: Search Google Hotels for hotel prices, ratings, and availability using browser automation. Use when user asks to search hotels, find accommodation, compare hotel prices, check availability, or look up places to stay. Triggers include "search hotels", "find hotels", "hotels in", "where to stay", "accommodation", "hotel prices", "cheapest hotel", "best hotel", "places to stay", "hotel near", "book a hotel", "hotel ratings". allowed-tools: Bash(agent-browser:), Bash(echo), Bash(printf*)

Google Hotels Search

Search Google Hotels via agent-browser to find hotel prices, ratings, amenities, and availability.

When to Use

  • User asks to search, find, or compare hotels or accommodation
  • User wants hotel prices in a city, neighborhood, or near a landmark
  • User asks about hotel availability for specific dates
  • User wants the best-rated or cheapest hotel in an area

When NOT to Use

  • Booking: This skill searches only — never complete a purchase
  • Vacation rentals / Airbnb: Google Hotels shows hotels, not rentals
  • Flights: Use the flight-search skill
  • Historical prices: Google Hotels shows current prices only
  • NEVER leave Google Hotels during search — do not navigate to Booking.com, Expedia, Hotels.com, or any OTA as a search workaround. Exception: after presenting results, you MAY visit the hotel's own website for direct booking/promo checks (see Post-Search).

Session Convention

Always use --session hotels for isolation.

URL Fast Path (Preferred)

Build a URL with location and dates encoded. Loads results directly — 3 commands total.

URL Template

https://www.google.com/travel/search?q={QUERY}&qs=CAE4AA&ts={TS_PARAM}&ap=MAE

Where {QUERY} is the location/hotel name and {TS_PARAM} is a base64-encoded date parameter.

Encoding Dates in the URL

Google Hotels uses a protobuf-encoded ts parameter for dates. The byte layout is fixed for years 2025-2030. Use this bash function to generate it:

hotel_ts() {
  local ci_y=$1 ci_m=$2 ci_d=$3 co_y=$4 co_m=$5 co_d=$6 nights=$7
  local cyl=$(printf '%02x' $(( ($ci_y & 0x7f) | 0x80 )))
  local cyh=$(printf '%02x' $(($ci_y >> 7)))
  local col=$(printf '%02x' $(( ($co_y & 0x7f) | 0x80 )))
  local coh=$(printf '%02x' $(($co_y >> 7)))
  echo -n "08011a200a021a00121a12140a0708${cyl}${cyh}10$(printf '%02x' $ci_m)18$(printf '%02x' $ci_d)120708${col}${coh}10$(printf '%02x' $co_m)18$(printf '%02x' $co_d)18$(printf '%02x' $nights)32020801" \
    | xxd -r -p | base64 | tr -d '\n='
}
# Usage: hotel_ts CHECKIN_YEAR MONTH DAY CHECKOUT_YEAR MONTH DAY NIGHTS
# Example: hotel_ts 2026 3 15 2026 3 20 5
# Output: CAEaIAoCGgASGhIUCgcI6g8QAxgPEgcI6g8QAxgUGAUyAggB

Constraints: Years 2025-2030, months 1-12, days 1-31, nights 1-127. These cover all realistic hotel searches.

Location Formats

Format Example
City Hotels+in+Bangkok
City + country Hotels+in+Bangkok+Thailand
Neighborhood Hotels+in+Shibuya+Tokyo
Near landmark Hotels+near+Eiffel+Tower
Region Hotels+in+Amalfi+Coast
Airport Hotels+near+BKK+airport
Specific hotel Haus+im+Tal+Munich

URL vs Interactive Features

Feature Via URL?
Location ✅ Yes (via q=)
Dates ✅ Yes (via ts=)
Guests / rooms ❌ Set interactively (default: 1 room, 2 guests)
Filters (stars, price, amenities) ❌ Set interactively

Example: Hotels in Bangkok, March 15-20

# Step 1: Generate ts parameter
ts=$(hotel_ts 2026 3 15 2026 3 20 5)

# Step 2: Open with location + dates — results load immediately
agent-browser --session hotels open "https://www.google.com/travel/search?q=Hotels+in+Bangkok&qs=CAE4AA&ts=${ts}&ap=MAE"
agent-browser --session hotels wait --load networkidle
agent-browser --session hotels snapshot -i

# Step 3: Extract results from snapshot, then close
agent-browser --session hotels close

Example: Specific Hotel with Dates

ts=$(hotel_ts 2026 3 9 2026 3 12 3)
agent-browser --session hotels open "https://www.google.com/travel/search?q=Haus+im+Tal+Munich&qs=CAE4AA&ts=${ts}&ap=MAE"
agent-browser --session hotels wait --load networkidle
agent-browser --session hotels snapshot -i
agent-browser --session hotels close

Without Dates (Location Only)

If the user doesn't specify dates, omit the ts, qs, and ap parameters:

agent-browser --session hotels open "https://www.google.com/travel/search?q=Hotels+in+Bangkok"
agent-browser --session hotels wait --load networkidle
agent-browser --session hotels snapshot -i

Results will show "starting from" prices. Set dates interactively if the user provides them later (see deep-dive reference).

For detailed interactive workflows (calendar navigation, guest/room selector, filters), see the deep-dive reference.

Result Format

Present results as a single rich table:

| # | Hotel | Stars | Rating | Price/Night | Total | Via | Key Amenities |
|---|-------|-------|--------|-------------|-------|-----|---------------|
| 1 | Sukhothai Bangkok | ★★★★★ | 9.2 | $185 | $925 | Hotels.com | Pool, Spa, WiFi |
| 2 | Centara Grand | ★★★★★ | 8.8 | $165 | $825 | Booking.com | Pool, Gym, WiFi |
| 3 | Ibis Sukhumvit | ★★★ | 7.4 | $45 | $225 | Agoda | WiFi, Restaurant |

Parallel Sessions

Only use when the user explicitly asks for a comparison between distinct searches (e.g., "Compare hotels in Shibuya vs Shinjuku").

agent-browser --session shibuya open "https://www.google.com/travel/search?q=Hotels+in+Shibuya+Tokyo" &
agent-browser --session shinjuku open "https://www.google.com/travel/search?q=Hotels+in+Shinjuku+Tokyo" &
wait

agent-browser --session shibuya wait --load networkidle &
agent-browser --session shinjuku wait --load networkidle &
wait

# Set dates in both sessions, then snapshot both
agent-browser --session shibuya snapshot -i
agent-browser --session shinjuku snapshot -i

agent-browser --session shibuya close &
agent-browser --session shinjuku close &
wait

Key Rules

Rule Why
Prefer URL fast path with ts= 3 commands with dates vs 10+ interactive
wait --load networkidle Smarter than fixed wait 5000
Always encode dates in URL when available Use hotel_ts to generate the ts parameter
Use fill not type for text Clears existing text first
Wait 2s after typing location Autocomplete needs API roundtrip
Click suggestions, never Enter Enter is unreliable for autocomplete
Re-snapshot after every interaction DOM changes invalidate refs
Check for "View prices" Means dates aren't set yet
Never leave Google Hotels during search Exception: hotel's own site for direct booking check after results
Navigate calendar with "<" and ">" Calendar may open on wrong month — use arrows to go backward or forward

Troubleshooting

Problem Solution
Consent popup Click "Accept all" or "Reject all"
URL fast path fails Fall back to google.com/travel/hotels interactive flow
No results / "View prices" Set check-in and check-out dates
Calendar opens on wrong month Use "<" arrow to navigate backward or ">" to go forward. Always re-snapshot after navigating to confirm target month is visible
Snapshot blocked by calendar overlay Press Escape to close the calendar, re-snapshot, then re-open the date picker and try again
Stale pricing Prices are real-time and indicative — mention this caveat
Currency mismatch Google uses browser locale currency — note any discrepancy
CAPTCHA Inform user. Do NOT solve. Retry after a short wait
Map view instead of list Click "List" or "View list" toggle
Hotel not found Try variations: full name, shorter name, name + city, name + neighborhood

Post-Search: Direct Booking & Deals

After presenting results, always ask the user if they'd like you to check for better deals. Phrase it like:

"Want me to check [hotel name]'s direct website for promo codes or member rates? Direct booking is often cheaper than OTAs."

When to Offer

  • Always when the user searches for a specific hotel by name
  • Always when results show a single clear winner the user is interested in
  • On request when comparing multiple hotels — offer for whichever they pick

What to Check

Open the hotel's own website in a new session (--session direct) and look for:

  1. Direct booking price — often 5-15% cheaper than OTAs (Booking.com, Expedia, etc.)
  2. Promo codes — look for banners, pop-ups, or a "offers"/"deals"/"promotions" page
  3. Member/loyalty rates — "sign up for X% off first booking" or free membership discounts
  4. Package deals — breakfast included, free cancellation, parking bundles
  5. Seasonal promotions — holiday specials, early bird rates, last-minute deals
# After Google Hotels search is done, visit hotel's direct site
agent-browser --session direct open "https://www.example-hotel.com"
agent-browser --session direct wait --load networkidle
agent-browser --session direct snapshot -i
# Look for: promo banners, "offers" or "deals" links, booking widget prices
agent-browser --session direct close

Chain Hotel Loyalty Programs

If the hotel belongs to a major chain, mention the loyalty program — members often get better rates, room upgrades, or points:

Chain Brands Loyalty Program Typical Member Perks
IHG Holiday Inn, InterContinental, Crowne Plaza, Kimpton, Indigo IHG One Rewards Member rate (often cheapest), points earning, 4th night free on reward stays
Marriott Marriott, Sheraton, Westin, W, Ritz-Carlton, Courtyard, Aloft Marriott Bonvoy Member rate, mobile check-in, points/miles
Hilton Hilton, DoubleTree, Hampton, Conrad, Waldorf Astoria Hilton Honors Member discount, 5th night free on reward stays, digital key
Accor Sofitel, Novotel, ibis, Mercure, Moxy, Fairmont ALL - Accor Live Limitless Member rates, status benefits
Hyatt Hyatt, Andaz, Park Hyatt, Thompson World of Hyatt Member rate, free night awards, suite upgrades

How to Identify the Chain

The Google Hotels snapshot often includes the chain name:

  • "Holiday Inn Express Bangkok Sukhumvit 11 by IHG" → IHG
  • "Courtyard by Marriott Bangkok" → Marriott
  • "Hilton Munich City" → Hilton
  • "Novotel Muenchen City" → Accor
  • No chain suffix → likely independent (check their website directly)

Independent Hotels

For independent/boutique hotels (like Haus im Tal):

  • Check their website for promo codes (often shown in banners or a dedicated "Offers" page)
  • Look for "Book Direct" incentives (best price guarantee, free extras)
  • Check if they offer a newsletter signup discount
  • Mention the hotel name + "promo code" in a web search if the site doesn't show any

Present the Comparison

After checking, present a direct vs OTA comparison:

## Haus im Tal — Booking Comparison

| Source | Room Type | Price/Night | Total (3 nights) | Notes |
|--------|-----------|-------------|-------------------|-------|
| Booking.com | Downtown Cozy | €183 | €549 | Free cancellation |
| Hotel direct | Downtown Cozy | €175 | €525 | Use code HIT24 for 5% off |
| Hotel direct (with code) | Downtown Cozy | €166 | €499 | Best price |

Tip: Always remind the user that you cannot complete the booking — just provide the link and any promo codes found.

Deep-Dive Reference

See references/interaction-patterns.md for:

  • Full annotated walkthrough (every command + expected output)
  • Location autocomplete failure modes and recovery
  • Date picker calendar navigation
  • Guest & room selector (the most complex widget)
  • Filters (stars, price, amenities, cancellation)
  • Scrolling for more results
  • Hotel detail drill-down with provider price comparison
  • Direct booking & promo check workflow

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

hotelsprice-comparisonbrowser-automationtravel-planningaccommodation

同类 Skill