KAYAK URL to Hotel ID API
URL to Hotel ID from a public KAYAK property URL.
Copy for your AI agent
Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.
Overview
URL to Hotel ID from a public KAYAK property URL. Use StayAPI REST or MCP with your API key.
Scope
Extracts the identifier from the URL without checking that the hotel exists. existence_checked is false. Pass hotel_id to Hotel Reviews. Keep the canonical URL for Details, Photos, and Amenities.
Authentication
Send your StayAPI key in the X-API-Key header. Each successful request uses one credit and returns JSON; failures use RFC 7807 Problem Details.
Endpoint URL
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | HTTPS kayak.com or www.kayak.com property URL, at most 2,048 characters, with a slug of ASCII alphanumeric segments separated by single hyphens followed by a positive hotel ID and .ksp. ID range: 1–2147483647, no leading zero. Only absent port or 443 is accepted; no userinfo, percent-encoding in the property path, backslashes, or control characters. Tracking queries (including encoded values) and fragments are removed and host normalized to www.kayak.com. Details, Photos, and Amenities require this URL; Reviews requires hotel_id. |
Response schema
| Field | Type | Description |
|---|---|---|
| success | boolean | True on success. |
| hotel_id | string | KAYAK hotel identifier. |
| url | string | Canonical KAYAK property URL. |
| existence_checked | boolean | Always false; resolving an ID does not verify hotel existence. |
Errors and limitations
Errors use RFC 7807 Problem Details with provider: "kayak", an instance and correlation id.
- 400 INVALID_URL: invalid property URL.
- 422: required url is missing.
- 401/402/429: authentication, credit, or rate-limit error.
- 502: source data unavailable or unexpected response.
- 503: service temporarily unavailable.
- 504: source request timed out.