Amadeus Hotels Skill 🏨
Search hotel prices, availability, and ratings via the Amadeus Self-Service API. Perfect for vacation planning and deal hunting.
Setup
- 1. Get API credentials at https://developers.amadeus.com/self-service
- Create account → My Apps → Create new app
- Copy API Key and API Secret
- 2. Set environment variables:
CODEBLOCK0
- 3. Install dependency:
CODEBLOCK1
Free tier: ~2,000 requests/month in test, pay-per-use after in production.
Quick Reference
| Task | Script | Example |
|---|
| Search by city | INLINECODE0 | INLINECODE1 |
| Get offers |
scripts/offers.py |
--hotels HTPAR123,HTPAR456 --adults 2 |
| Offer details |
scripts/details.py |
--offer-id ABC123 |
| Track price |
scripts/track.py |
--add --hotel HTPAR123 --target 150 |
| Check tracked |
scripts/track.py |
--check |
Capabilities
1. Hotel Search
Find hotels by city code (IATA) or coordinates:
CODEBLOCK2
Common city codes: PAR (Paris), NYC (New York), TYO (Tokyo), BCN (Barcelona), LON (London), LAX (Los Angeles), SFO (San Francisco)
2. Get Pricing & Availability
Once you have hotel IDs from search:
CODEBLOCK3
Returns: Room types, prices, cancellation policies, board types.
3. Offer Details
Get full details for a specific offer before booking:
CODEBLOCK4
Returns: Detailed room info, full cancellation policy, payment terms, hotel contact.
4. Hotel Ratings & Sentiment
Get aggregated review sentiment:
CODEBLOCK5
Returns: Overall score (0-100), category scores (Staff, Location, WiFi, Cleanliness, etc.)
5. Price Tracking
Track hotels and get alerts when prices drop:
CODEBLOCK6
Cron Setup for Price Alerts
Add to OpenClaw cron for automatic price monitoring:
CODEBLOCK7
When prices drop below target, the script outputs alert text. Configure your notification channel in the cron task.
Output Formatting
Scripts output JSON by default. Add --format human for readable output:
CODEBLOCK8
Human format example:
CODEBLOCK9
Amenity Codes
Common filters for --amenities:
| Code | Meaning |
|---|
| WIFI | Free WiFi |
| POOL |
Swimming pool |
| SPA | Spa/wellness |
| GYM | Fitness center |
| RESTAURANT | On-site restaurant |
| PARKING | Parking available |
| PETS_ALLOWED | Pet-friendly |
| AIR_CONDITIONING | A/C |
| KITCHEN | Kitchen/kitchenette |
Full list in references/amenities.md.
⚠️ Important: Pricing Disclaimer
Amadeus API prices are NOT retail prices. The API returns negotiated, net, or wholesale rates — not the public prices you see on Booking.com, Expedia, or hotel websites.
Key differences:
- - Net vs Retail: API returns "net rates" (raw cost), not marked-up retail prices
- B2B Pricing: Designed for travel agencies/developers to add their own markup
- Negotiated Rates: May include corporate or consortia rates unavailable to consumers
- Tax Breakdown: Prices often show base + taxes separately
Use these prices for comparison and tracking trends, not as exact retail quotes. Actual booking prices on consumer sites will differ.
Limitations & Notes
- - Test environment: Limited/cached data, not real-time. Good for development.
- Production: Real prices but requires "Move to Production" in Amadeus dashboard.
- No direct booking: API returns offer details; actual booking requires payment handling (PCI compliance).
- Rate limits: 10 TPS (test), 40 TPS (production). Scripts include backoff.
- Data freshness: Prices change frequently. Always re-check before booking elsewhere.
- Not retail prices: See pricing disclaimer above.
Error Handling
| Error | Meaning | Action |
|---|
| 401 | Auth failed | Check API key/secret |
| 429 |
Rate limited | Wait and retry (auto-handled) |
| 400 | Bad request | Check parameters (dates, codes) |
| No results | No availability | Try different dates or expand search |
References
- -
references/amenities.md — Full amenity code list - https://developers.amadeus.com/self-service/apis-docs — Official API docs
Amadeus Hotels 技能 🏨
通过 Amadeus 自助服务 API 搜索酒店价格、可用性和评分。非常适合度假规划和寻找优惠。
设置
- 1. 获取 API 凭证 访问 https://developers.amadeus.com/self-service
- 创建账户 → 我的应用 → 创建新应用
- 复制 API 密钥和 API 密钥密码
- 2. 设置环境变量:
bash
export AMADEUS
APIKEY=your-api-key
export AMADEUS
APISECRET=your-api-secret
export AMADEUS_ENV=test # 或 production 用于真实预订
- 3. 安装依赖:
bash
pip install requests
免费套餐: 测试环境每月约 2,000 次请求,生产环境按使用量付费。
快速参考
| 任务 | 脚本 | 示例 |
|---|
| 按城市搜索 | scripts/search.py | --city PAR --checkin 2026-03-15 --checkout 2026-03-20 |
| 获取报价 |
scripts/offers.py | --hotels HTPAR123,HTPAR456 --adults 2 |
| 报价详情 | scripts/details.py | --offer-id ABC123 |
| 追踪价格 | scripts/track.py | --add --hotel HTPAR123 --target 150 |
| 检查追踪 | scripts/track.py | --check |
功能
1. 酒店搜索
按城市代码(IATA)或坐标查找酒店:
bash
按城市
python3
/scripts/search.py --city PAR --checkin 2026-03-15 --checkout 2026-03-20
按坐标(地标附近)
python3 /scripts/search.py --lat 48.8584 --lon 2.2945 --radius 5 --checkin 2026-03-15 --checkout 2026-03-20
带筛选条件
python3 /scripts/search.py --city NYC --amenities WIFI,POOL,SPA --ratings 4,5
常用城市代码: PAR(巴黎)、NYC(纽约)、TYO(东京)、BCN(巴塞罗那)、LON(伦敦)、LAX(洛杉矶)、SFO(旧金山)
2. 获取价格和可用性
从搜索中获得酒店 ID 后:
bash
python3 /scripts/offers.py \
--hotels HTPAR001,HTPAR002 \
--checkin 2026-03-15 \
--checkout 2026-03-20 \
--adults 2 \
--rooms 1
返回:房型、价格、取消政策、膳食类型。
3. 报价详情
在预订前获取特定报价的完整详情:
bash
python3 /scripts/details.py --offer-id
返回:详细房间信息、完整取消政策、付款条款、酒店联系方式。
4. 酒店评分与评价
获取汇总的评论情感分析:
bash
python3 /scripts/details.py --hotel-id HTPAR001 --ratings
返回:总体评分(0-100)、分类评分(员工、位置、WiFi、清洁度等)
5. 价格追踪
追踪酒店并在价格下降时获取提醒:
bash
添加酒店到追踪列表
python3 /scripts/track.py --add \
--hotel HTPAR001 \
--checkin 2026-03-15 \
--checkout 2026-03-20 \
--adults 2 \
--target 150 # 价格低于每晚 150 美元时提醒
检查所有追踪的酒店(通过 cron 运行)
python3 /scripts/track.py --check
列出追踪的酒店
python3 /scripts/track.py --list
从追踪列表中移除
python3 /scripts/track.py --remove --hotel HTPAR001
价格提醒的 Cron 设置
添加到 OpenClaw cron 以实现自动价格监控:
yaml
每天检查两次酒店价格
task: 运行酒店价格追踪器并在价格下降时提醒
command: python3 /scripts/track.py --check
当价格低于目标时,脚本会输出提醒文本。在 cron 任务中配置您的通知渠道。
输出格式
脚本默认输出 JSON。添加 --format human 以获得可读输出:
bash
python3 /scripts/search.py --city PAR --format human
人类可读格式示例:
🏨 巴黎玛黑区水疗酒店 ★★★★
📍 圣殿路 15 号,巴黎
💰 €189/晚(原价 €220)
✨ 无线网络、水疗、餐厅
📊 评分:87/100(员工:92,位置:95)
设施代码
--amenities 的常用筛选条件:
游泳池 |
| SPA | 水疗/养生 |
| GYM | 健身中心 |
| RESTAURANT | 现场餐厅 |
| PARKING | 提供停车位 |
| PETS_ALLOWED | 允许携带宠物 |
| AIR_CONDITIONING | 空调 |
| KITCHEN | 厨房/小厨房 |
完整列表请参阅 references/amenities.md。
⚠️ 重要提示:定价免责声明
Amadeus API 价格并非零售价格。 API 返回的是协商价、净价或批发价——而非您在 Booking.com、Expedia 或酒店网站上看到的公开价格。
主要区别:
- - 净价 vs 零售价: API 返回净价(原始成本),而非加价后的零售价格
- B2B 定价: 专为旅行社/开发者设计,以便添加自己的加价
- 协商价格: 可能包含消费者无法获取的企业或联盟价格
- 税费明细: 价格通常分别显示基础价和税费
请将这些价格用于比较和趋势追踪,而非作为精确的零售报价。消费者网站上的实际预订价格会有所不同。
限制与说明
- - 测试环境: 有限/缓存数据,非实时。适合开发。
- 生产环境: 真实价格,但需要在 Amadeus 控制台中迁移至生产环境。
- 无直接预订: API 返回报价详情;实际预订需要处理支付(PCI 合规)。
- 速率限制: 10 TPS(测试环境),40 TPS(生产环境)。脚本包含退避机制。
- 数据时效性: 价格频繁变动。在其他平台预订前请务必重新检查。
- 非零售价格: 请参阅上述定价免责声明。
错误处理
| 错误 | 含义 | 操作 |
|---|
| 401 | 认证失败 | 检查 API 密钥/密钥密码 |
| 429 |
速率限制 | 等待后重试(自动处理) |
| 400 | 错误请求 | 检查参数(日期、代码) |
| 无结果 | 无可用性 | 尝试不同日期或扩大搜索范围 |
参考资料
- - references/amenities.md — 完整设施代码列表
- https://developers.amadeus.com/self-service/apis-docs — 官方 API 文档