GET
# 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

GET https://api.stayapi.com/v1/otelpuan/search 

## 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.

## Related resources

[Check rooms and prices for a stay](/docs/endpoints/otelpuan/rooms)[Search for hotel IDs by name](/docs/endpoints/otelpuan/search)[Resolve a URL to a hotel ID](/docs/endpoints/otelpuan/url-to-id)[Read reviews by hotel ID](/docs/endpoints/otelpuan/hotel-reviews)[Otelpuan API overview](/apis/otelpuan)[Use Otelpuan tools through MCP](/docs/mcp)

Request

```curl
curl -X GET "https://api.stayapi.com/v1/otelpuan/search?query=Turkler" \
  -H "X-API-Key: YOUR_API_KEY"
```

Response

```json
{
  "success": true,
  "query": "Turkler",
  "hotels": [
    {
      "hotel_id": "25322",
      "name": "Türkler Otel",
      "url": "https://www.otelpuan.com/Turkler-Otel",
      "location": "Trabzon Şehir Merkezi"
    }
  ],
  "total": 1
}
```
