GET

Hyatt URL to Hotel ID API

Extract a hotel code for a Hyatt room request.

Copy for your AI agent

Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.

Overview

Extracts the code from a supported URL without verifying that the hotel exists. Authenticate with X-API-Key; normal StayAPI quota applies. Also available through MCP as hyatt_hotel_url_to_id(url).

Endpoint URL

GET https://api.stayapi.com/v1/hyatt/hotel/url-to-id

Parameters

Parameter Type Required Description
url string Required Canonical HTTPS hyatt.com or www.hyatt.com URL, 1–2048 characters; optional port 443. No other parameters are supported.

Supported paths: branded /brand/ll-CC/code-slug, legacy /ll-CC/hotel/location/name/code, /shop/rooms/code with an optional locale prefix, and /mr-and-mrs-smith/code-slug. Branded and legacy paths may end in /rooms, /gallery, or /policies. The code is exactly five ASCII letters or digits.

Query strings, fragments, and a trailing slash are removed. The returned host is www.hyatt.com; path case is preserved. Percent encoding, whitespace, control characters, non-ASCII characters, backslashes, and repeated query names (case-insensitive) are rejected. Any spiritCode, hotelCode, or hotel_code query value must match the path code. Unsupported URL paths return 400.

Response

FieldTypeMeaning
successbooleantrue on success
hotel_codestringFive lowercase ASCII letters or digits
urlstringNormalized HTTPS www.hyatt.com URL without query or fragment
existence_verifiedbooleanAlways false; extraction does not establish hotel existence

No pagination, date, locale, currency, or filtering parameters apply. Use hotel_code with the rooms endpoint; URL resolution does not establish room availability.

Errors and limitations

Invalid URL semantics return 400; missing or invalid parameter types return 422. Authentication and quota errors use the normal StayAPI status codes. Errors follow RFC 7807 Problem Details; a failed resolution never returns a successful response.

Related resources

Hyatt rooms · Hyatt API · MCP tools

Browse documentation