Otelpuan Hotel Search API
Find hotel suggestions by name and use their IDs for reviews.
Overview
Find Otelpuan hotel suggestions by name with StayAPI. Get hotel IDs, names, canonical URLs, and location labels, then use hotel_id to read guest reviews.
Scope
Hotel-only autocomplete suggestions, not exhaustive city inventory. No page, limit, or filter controls. An empty match returns success with hotels: [] and total: 0. Pass a returned hotel_id directly to Hotel Reviews; no URL resolver call is needed.
Authentication
Send your StayAPI key in the X-API-Key header. Successful requests return JSON; failures use RFC 7807 Problem Details.
Endpoint URL
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Required | Hotel name query, 2–200 characters after trimming surrounding whitespace. Unicode is accepted; control characters and dot-only path segments ("." or "..") are rejected. |
Response schema
| Field | Type | Description |
|---|---|---|
| success / query | boolean / string | Success flag and the trimmed query. |
| hotels | array | Hotel suggestions with hotel_id, name, canonical url, and nullable location label. No ratings or review counts are returned. |
| total | integer | Number of hotel suggestions returned, not the total inventory for a city. |
Errors and limitations
Errors use RFC 7807 Problem Details with provider: "otelpuan", an instance and correlation id.
- 400 INVALID_QUERY: query must contain 2–200 characters after trimming and contain no control characters or dot-only path segments.
- 422: query is required.
- 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.