跨平台房源日历实时查询
简介
StayingAPI 官方提供的 Booking.com 房源可用性查询技能,支持批量查询多平台房源日历,帮助用户快速锁定可预订日期。
原始描述
Check day-by-day Booking.com availability (the booking calendar) for a known listing over a date window. Use when a user asks whether a listing on Booking.com is open on specific dates. Powered by StayingAPI.
通过你的 Agent 添加
安装目录:booking-com-availability/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
booking-com-availability 是一款专注于房源日历查询的 Agent Skill,由 StayingAPI 官方开发维护。该技能通过调用 StayingAPI 的统一接口,支持查询 Booking.com、Airbnb、Vrbo 等主流短租平台的房源可用性数据。
核心调用方式为 GET /v1/availability 端点,需提供平台标识(如 booking)、房源 ID 或 URL、以及起止日期。返回结果包含每日可用状态、最少入住夜数、是否允许入住/退房等关键信息。技能支持单房源查询和批量查询两种模式,满足个人出行规划与商业数据分析的不同场景。
对于 MCP 兼容的运行时,可直接连接 https://mcp.stayingapi.com/mcp 使用 check_availability 工具,无需手动管理 API 密钥。
显著优点
跨平台统一架构:StayingAPI 的最大亮点在于将 Booking.com、Airbnb、Vrbo、Google Hotels 四大平台的数据纳入同一套 Schema,一次集成即可覆盖主流 OTA 平台,大幅降低多平台对接的技术成本。
零成本测试机制:提供 stay_test_ 前缀的 Sandbox 密钥,测试调用完全免费,便于开发者在正式付费前充分验证接口能力。
智能计费策略:失败请求、空结果、被拦截调用均不计费,仅在成功获取数据时扣减额度,有效控制使用成本。
异步任务支持:对于需要实时抓取的数据,系统返回 202 状态码并提供轮询机制,避免长时间阻塞等待。
潜在缺点与局限性
数据覆盖不均:技能依赖上游平台的数据开放程度,部分房源可能因平台限制返回空结果或部分字段缺失。Google Hotels 平台暂不支持房源详情和评论查询。
ID 来源敏感:Vrbo 房源 ID 若非来自 /v1/search 端点,可能存在解析失败风险,建议优先使用官方搜索接口获取的标准化 ID。
分页逻辑复杂:不同端点的分页行为受上游数据源影响,需以 meta.pagination 返回的 hasMore 和 nextCursor 为准,不能假设固定页大小。
轮询频率限制:异步任务轮询需遵守 Retry-After 头部提示,频繁请求会触发 429 限流(120次/分钟),需实现合理的退避策略。
适合的目标群体
- 旅行规划用户:快速确认目标房源在特定日期的可用性,辅助出行决策
- 民宿运营者:监控竞品房源的预订状态,制定动态定价策略
- 数据分析师:批量获取多平台房源日历数据,进行市场趋势研究
- 旅游科技公司:构建房源比价、智能推荐等增值服务的底层数据支撑
使用风险
密钥安全风险:STAYINGAPI_KEY 需妥善保管,避免硬编码或泄露至版本控制。生产环境建议使用环境变量或密钥管理服务。
网络依赖风险:所有请求需访问 api.stayingapi.com,网络波动或 DNS 故障可能导致服务不可用。
数据时效性:可用性数据存在同步延迟,极端情况下可能出现"查询可用但实际已售罄"的情况,建议重要预订前进行二次确认。
平台政策变更:Booking.com 等平台可能调整数据开放策略,存在 API 行为变更或接口废弃的潜在风险。
成本控制:虽然失败调用免费,但高频批量查询仍可能产生可观费用,建议设置预算告警和用量监控。
技能正文
name: booking-com-availability description: "Check day-by-day Booking.com availability (the booking calendar) for a known listing over a date window. Use when a user asks whether a listing on Booking.com is open on specific dates. Powered by StayingAPI." version: "1.0.0" license: MIT-0 author: StayingAPI homepage: https://stayingapi.com repository: https://github.com/stayingapi/booking-com-skills user-invocable: true compatibility: Requires internet access to reach api.stayingapi.com. No additional runtimes or dependencies needed. required_environment_variables:
- name: STAYINGAPI_KEY prompt: Your StayingAPI key (starts with stay_) help: Free key at https://stayingapi.com/signup — no card. A stay_test_ sandbox key returns fixtures at zero cost. required_for: all API requests tags: ["booking-com", "booking-com-api", "availability", "calendar", "travel", "accommodation"] metadata: {"openclaw":{"emoji":"📅","requires":{"env":["STAYINGAPI_KEY"]},"primaryEnv":"STAYINGAPI_KEY","homepage":"https://stayingapi.com"},"hermes":{"tags":["booking-com","booking-com-api","availability","calendar","travel","accommodation"],"category":"integrations"}}
Booking.com availability
Check day-by-day availability for a known Booking.com listing — the booking calendar over any date window.
Setup
If $STAYINGAPI_KEY is not set, read references/auth-setup.md and follow it to get and store the key. A stay_test_ sandbox key works for evaluation at zero cost.
When to use this skill
DO use when the user asks:
- "Is this Booking.com listing free the first week of August?"
- "Show the calendar for this Booking.com place"
Do NOT use when:
- You do not yet have a listing id — search first
- The user wants a price, not open/closed dates — use the prices skill
Required headers
Every request needs:
- Authorization:
Bearer $STAYINGAPI_KEY - User-Agent: your agent's name (e.g.
ClaudeCode/1.0).
Base URL: https://api.stayingapi.com/v1.
Tools
GET /v1/availability
GET /v1/availabilityGet day-by-day availability for a known listing (or a batch of listings) on one platform over a date window. Each day reports whether it is available, its minimum-night requirement, and whether check-in / check-out / booking is allowed.
Key parameters:
platform— Required. vrbo | booking | airbnb | google. Single platform (not a fan-out endpoint). Use the API value, not the brand name — "booking", not "booking-com"; "google", not "google-hotels".listingId— A single listing id on platform.listingIds[]— A batch of listing ids on platform.url— Full listing URL (alternative to an id).startDate— Required. YYYY-MM-DD; not in the past.endDate— Required. After startDate; window ≤ 365 days.
MCP (no key pasted into the agent)
On an MCP-capable runtime, connect https://mcp.stayingapi.com/mcp (OAuth 2.1 + PKCE) and use: check_availability.
Platform × endpoint support
Not every endpoint supports every platform. Verified:
| platform | search | availability | price | price-compare | listing | reviews |
|---|---|---|---|---|---|---|
airbnb |
yes | yes | yes | yes | yes | yes |
booking |
yes | yes | yes | yes | yes | yes |
vrbo |
yes | yes | yes | yes | yes | yes |
google |
yes | yes | yes | yes | no | no |
GET /v1/listing/google/… and GET /v1/reviews?platform=google return
400 platform_not_enabled ("google is not enabled for this endpoint"). Use booking,
airbnb or vrbo for listing detail and reviews; use google for search, price and
cross-OTA price-compare.
The cross-OTA advantage
StayingAPI is cross-platform: Booking.com data comes back in the same unified schema as Airbnb, Vrbo and Google Hotels, so one integration covers them all. /v1/price-compare resolves a property through the Google Hotels backbone and returns the offers it exposes plus a StayingAPI-computed min and median over those offers, as first-class fields.
Coverage varies by property and by what the backbone returns: some properties come back with several OTA offers, others with a single aggregated-lowest offer (in which case
minequalsmedianandoffershas one entry, sometimes a direct-supplier rate rather than an OTA). Readoffers.lengthbefore describing a result as a multi-platform comparison.
Async & partial failures
A live call that has to scrape returns 202 with data.jobId, data.pollUrl and
data.estimatedSeconds (the 202 itself charges 0). Poll GET /v1/jobs/{jobId} (free)
until data.status is TERMINAL — completed or failed.
completed→ the payload is atdata.result(the same schema the sync call returns;dataitself is just{jobId, result, status}).metacarriespartial,platformResults[]andwarnings[]. A completed job may still return an empty result (data.result: []) — the reason is inmeta.warnings[](e.g.no_results), and empty results charge 0.failed→ HTTP is still 200, not an HTTP error. The failure is nested atdata.error(code,type,message,retryable). Detect it withdata.status === "failed", not a top-levelerror.creditsChargedis 0, andmetacarries only{requestId, creditsCharged, platforms}— do not readpartial,platformResultsorwarningson a failed job.
Pace your polling: honour the Retry-After header, back off between attempts, and cap the
number of attempts. A tight loop hits 429 rate_limit_exceeded (120 requests/minute).
Known limitations
- Pagination:
limit/cursor are accepted where documented, but availability depends on the endpoint and the upstream source — treat meta.pagination as authoritative and stop when hasMore is false or nextCursor is null.
- Externally-sourced ids: a Vrbo id obtained somewhere other than
/v1/search may not resolve upstream and can produce a failed job (all_actors_failed). Prefer ids from /v1/search (platformListingId).
- Platform gaps: see the support matrix above —
google has no listing or reviews endpoint.
Credits
limit/cursor are accepted where documented, but availability depends on the endpoint and the upstream source — treat meta.pagination as authoritative and stop when hasMore is false or nextCursor is null./v1/search may not resolve upstream and can produce a failed job (all_actors_failed). Prefer ids from /v1/search (platformListingId).google has no listing or reviews endpoint.Number-free by design — failed, empty and blocked calls are never billed, and stay_test_ sandbox calls are always free. Current costs: https://stayingapi.com/pricing · full contract: https://api.stayingapi.com/openapi.json.
Trademark
StayingAPI is an independent service and is not affiliated with, endorsed by, or sponsored by Booking.com. Booking.com is a trademark of its respective owner.
Get your free key → https://stayingapi.com/signup · Docs: https://stayingapi.com/docs
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。