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

跨平台酒店房源日历实时查询

Google Hotels availability · v1.1.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 stayingapi 公开目录收录
210 下载 0 安装 693 收藏 17 浏览

简介

StayingAPI 官方出品的酒店可用性查询技能,支持 Google Hotels/Airbnb/Booking/Vrbo 四大平台日历数据,零成本沙盒测试,失败不扣费。

原始描述

Check day-by-day Google Hotels availability (the booking calendar) for a known listing over a date window. Use when a user asks whether a listing on Google Hotels is open on specific dates. Powered by StayingAPI.

通过你的 Agent 添加

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

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

或者手动安装

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

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

中文使用说明 来自收录源

核心用法

google-hotels-availability 是 StayingAPI 提供的酒店房源可用性查询技能,专为需要精确掌握特定房源日历状态的场景设计。用户可通过 GET /v1/availability 端点,查询单个或批量房源在指定日期窗口内的逐日可用性数据,包括是否可预订、最小入住夜数限制、是否允许入住/退房等关键信息。

该技能采用平台参数化设计,platform 字段支持 google/airbnb/booking/vrbo 四种值,实现一套 API 覆盖主流 OTA 平台。请求需提供 startDate 和 endDate(窗口不超过 365 天),支持通过 listingId 单查或 listingIds[] 批量查询,也可用完整房源 URL 作为替代参数。

针对实时抓取场景,API 采用异步任务模式:首次请求返回 202 状态码及 jobId,需轮询 GET /v1/jobs/{jobId} 直至状态变为 completed 或 failed。轮询需遵守 Retry-After 头部建议,避免触发 429 限流(120 次/分钟)。

显著优点

跨平台统一 Schema 是本技能最大亮点。Google Hotels、Airbnb、Booking.com、Vrbo 四大平台的数据以相同结构返回,大幅降低多平台接入成本。配合 /v1/price-compare 端点,可获取同一房源在多个 OTA 的价格对比及 StayingAPI 计算的最低价/中位数参考。

零成本评估机制 极具吸引力:stay_test_ 前缀的 sandbox key 完全免费,适合开发测试;生产环境采用"成功才计费"模式——失败、空结果、被封禁的请求均不扣费,降低试错成本。

MCP 原生支持 让密钥管理更安全。支持通过 https://mcp.stayingapi.com/mcp 以 OAuth 2.1 + PKCE 协议连接,无需在 Agent 中硬编码 API key。

潜在缺点与局限性

平台能力不均 是明显短板:Google Hotels 虽支持搜索、价格、比价,但缺失房源详情(/v1/listing)和评价(/v1/reviews)端点,需切换至其他平台补齐信息。

异步流程增加复杂度。实时抓取需轮询任务状态,开发者需自行实现退避策略和最大尝试次数限制,否则易触发速率限制。

外部 ID 可靠性问题。非 StayingAPI 搜索渠道获取的 Vrbo 房源 ID 可能解析失败(all_actors_failed),建议优先使用 /v1/search 返回的 platformListingId。

分页行为因端点而异。limit/cursor 参数虽被接受,但实际分页逻辑取决于上游源和端点实现,需以响应中的 meta.pagination 为准。

适合的目标群体

  • 旅行规划 Agent:需为用户查询特定房源档期可用性的对话式 AI
  • 价格监控工具:追踪多平台房源日历变化的价格情报系统
  • 民宿运营工具:管理跨平台房源状态的短租运营 SaaS
  • 企业差旅平台:集成酒店查询能力的 B2B 差旅管理系统

使用风险

网络依赖:必须能访问 api.stayingapi.com,无离线能力。

速率限制:生产环境 120 请求/分钟,高频轮询需配合退避策略。

数据时效性:异步任务可能耗时数秒至数十秒,estimatedSeconds 仅为估计值。

平台政策风险:OTA 平台可能调整反爬策略,导致抓取失败率上升。

密钥安全:虽支持 MCP OAuth,但传统 Bearer Token 模式需妥善保管 STAYINGAPI_KEY。

技能正文


name: google-hotels-availability description: "Check day-by-day Google Hotels availability (the booking calendar) for a known listing over a date window. Use when a user asks whether a listing on Google Hotels 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/google-hotels-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: ["google-hotels", "google-hotels-api", "availability", "calendar", "travel", "accommodation"] metadata: {"openclaw":{"emoji":"📅","requires":{"env":["STAYINGAPI_KEY"]},"primaryEnv":"STAYINGAPI_KEY","homepage":"https://stayingapi.com"},"hermes":{"tags":["google-hotels","google-hotels-api","availability","calendar","travel","accommodation"],"category":"integrations"}}

Google Hotels availability

Check day-by-day availability for a known Google Hotels 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 Google Hotels listing free the first week of August?"
  • "Show the calendar for this Google Hotels 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 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: Google Hotels data comes back in the same unified schema as Airbnb, Booking.com and Vrbo, 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 min equals median and offers has one entry, sometimes a direct-supplier rate rather than an OTA). Read offers.length before 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 at data.result (the same schema the sync call returns; data itself is just {jobId, result, status}). meta carries partial, platformResults[] and warnings[]. A completed job may still return an empty result (data.result: []) — the reason is in meta.warnings[] (e.g. no_results), and empty results charge 0.
  • failed → HTTP is still 200, not an HTTP error. The failure is nested at data.error (code, type, message, retryable). Detect it with data.status === "failed", not a top-level error. creditsCharged is 0, and meta carries only {requestId, creditsCharged, platforms} — do not read partial, platformResults or warnings on 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

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 Google Hotels. Google Hotels is a trademark of its respective owner.


Get your free key → https://stayingapi.com/signup · Docs: https://stayingapi.com/docs

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

标签

apitravelaccommodationcontent-mediaautomation

同类 Skill