Search hotels
search_hotelsUse this when the user wants hotels in a destination (e.g. 'quiet hotels in Bangkok under $150'), or asks about a hotel by name (hotel_name). Returns up to 10 hotels per page, ranked by the OKstays Comfort Score (0-10 from what guests report: Comfort & Essentials 60%, the five must-haves (cleanliness, beds, shower, bugs and safety) 30% and sleep and room 30%; Perks & Facilities 15%; Service & Hospitality 15%; Location & Access 10%; repeated complaints about cleanliness, beds, showers or bugs keep a hotel out; feeling unsafe in the area shows as a complaint; a high score from few reviews leans toward the destination's typical score until more guests review the place) or by a travel style's score (half the Comfort Score, half how well it fits the style), highest first (ties go to the better Comfort & Essentials score, then the hotel more guests reviewed), each with strengths, complaints, indicative price and its okstays.com link. Filters: travel style, signals the hotel must score 8+ on, price, minimum score, neighbourhood, distance from a point, and the kind of stay: property_type hotels (default), apartments, guest-houses, hostels or any (the long-stays persona defaults to any). Pass the user's dates and guests when known. Places to stay only, not flights or car hire. Read-only, no sign-in.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"location": "<location>"
},
"name": "search_hotels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page of results (default 1; up to 5) for 'show me more'. | |
| tags | No | Filter ids the hotel must score 8+ on, e.g. ['soundproofing', 'reliable_wifi']; their names work too ('quiet'). See get_filters. | |
| limit | No | Hotels per page (default 10). | |
| adults | No | Guests per room (1-8), if given. | |
| checkin | No | User's check-in date, YYYY-MM-DD (e.g. 2027-03-12), if given: links then open on this stay. | |
| persona | No | Travel style to rank for: digital-nomad, deep-sleep, avoid-crowds, romantic, family, business, solo-safe, luxury, budget-comfort, long-stays. | |
| sort_by | No | best = Comfort Score (default); value = Comfort Score per $100; nearest needs near_lat/near_lng. | |
| checkout | No | Check-out date, YYYY-MM-DD (e.g. 2027-03-15). | |
| district | No | Neighbourhood to restrict to, e.g. 'Gothic Quarter'. get_city_overview lists the districts and its where_to_stay areas; another area name is matched against hotel addresses. | |
| location | Yes | City name or slug, e.g. 'Barcelona' or 'new-york'. Use list_cities for coverage. An area of a grouped destination works too ('Canggu' or 'Ubud' in Bali, 'Positano' on the Amalfi Coast, 'Maafushi' in the Maldives): its places are shown. | |
| near_lat | No | Latitude of a landmark or address the user names (not the user's own location); with near_lng restricts results to hotels within radius_km and reports distance_km. | |
| near_lng | No | Longitude of the point of interest. | |
| max_price | No | Maximum indicative price per night in USD. | |
| min_score | No | Minimum Comfort Score (0-10). | |
| radius_km | No | Search radius around near_lat/near_lng in km (default 3). | |
| hotel_name | No | Find a hotel by name in this city (part of the name works, e.g. 'Pestana'), including hotels outside our rankings; the other filters are then ignored. | |
| property_type | No | property_type: hotels (default), apartments, guest-houses, hostels or any. hotels includes resorts, riads and ryokans; apartments includes aparthotels, holiday homes, villas and chalets; guest-houses includes B&Bs and homestays; any adds every kind, boats and campsites too. The long-stays persona defaults to any. |