Browse documentation
GET

Otelpuan URL to Hotel ID API

Turn a public Otelpuan hotel URL into a hotel ID.

Overview

Resolve an Otelpuan URL to hotel ID, name, canonical URL, rating, and review count with StayAPI. Use hotel_id for guest reviews through REST or MCP.

Scope

Resolve the URL once, then pass the returned hotel_id to Hotel Reviews. Retain the name, URL, and aggregate rating for display; ID-based reviews return null for these fields. A known hotel ID works directly without a previous resolver call. Hotels with zero reviews can still be resolved.

Authentication

Send your StayAPI key in the X-API-Key header. Successful requests return JSON; failures use RFC 7807 Problem Details.

Endpoint URL

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

Parameters

Parameter Type Required Description
url string Required Public Otelpuan root-slug hotel URL, for example https://www.otelpuan.com/Turkler-Otel. HTTP(S) on otelpuan.com or www.otelpuan.com is accepted and normalized to HTTPS www. Maximum 2,048 characters. Tracking queries and fragments are removed.

Response schema

Field Type Description
success boolean True only for a successful response.
hotel_id string Hotel identifier to pass to Hotel Reviews.
name string Hotel name from the public property page.
url string Canonical HTTPS www.otelpuan.com hotel URL.
rating / rating_scale number or null / integer Hotel page aggregate rating on a 0–10 scale; rating_scale is 10.
review_count integer Hotel page review count, including zero for hotels without reviews.

Errors and limitations

Errors use RFC 7807 Problem Details with provider: "otelpuan", an instance and correlation id.

  • 400 INVALID_URL: supply a valid Otelpuan hotel URL.
  • 422: url is required and must be no longer than 2,048 characters.
  • 404 NOT_FOUND: the hotel is not found.
  • 502 UPSTREAM_ERROR or 504 UPSTREAM_TIMEOUT: the source request could not complete.
  • 503: service temporarily unavailable.
  • 500 CONTENT_EXTRACTION_FAILED: the source response could not be interpreted.

Related resources