GetMyHotels Hotels API
The hotels API from GetMyHotels — 4 operation(s) for hotels.
The hotels API from GetMyHotels — 4 operation(s) for hotels.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/getmyhotels-com:getmyhotels-com-hotels-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: GetMyHotels REST Hotels API
version: 1.0.0
description: REST surface for the native GetMyHotels apps. Every route is a thin transport over the shared tRPC routers — inputs are validated with the same Zod schemas the web client uses, and responses are returned verbatim. Authentication uses Better Auth bearer session tokens issued by the /api/auth/* endpoints (not part of this spec). Native clients send X-GMH-App-Version and X-GMH-Platform on every request; versions below the configured floor receive a typed 426 UpgradeRequiredError.
servers:
- url: https://api.getmyhotels.com
description: Production API
tags:
- name: hotels
paths:
/v1/hotels/search:
post:
tags:
- hotels
summary: Search hotels for a resolved place
description: 'Runs `hotel.searchByPlace`. The client resolves the destination to a placeId + coordinates first (same contract as the web autosuggest flow). Response fields the native client decodes: `hotels[]` (each with `ref`, `name`, `starRating`, `userRating?`, `reviewCount?`, `address`, `city`, `country`, `latitude` and `longitude` (always numbers, for the map), `distanceKm?`, `images`, `amenities`, `taxesIncluded` (true/false when the supplier disclosed whether the cheapest price is all-in, null when unknown — only true may be shown as "includes taxes & fees"), and `rooms` holding at most the cheapest `{ price, currency, available, cancellationPolicy, mealPlan?, taxesIncluded }`, a stay total); `total`, `page`, `limit`; `priceStats` and `filteredPriceStats` (null or `{ min, max, currency, buckets[] }`, the stay-total distribution before and after the price filter); `guestScoreCounts` `{ scored, min7, min8, min9 }`; `relaxed` (null, or `{ field }` with `field` one of `guestScore`, `stars`, `price`, `amenities`, naming the one filter dropped because nothing matched them all — only when `relaxFilters` is sent); `amenityFilter` (null, or `{ requested, probed, matched, unchecked }`, where `unchecked` hotels had no amenity data and were left out); `radiusExpanded` (null or `{ requestedKm, nearestKm }`); the effective `checkIn`/`checkOut`/`rooms`/`adults`/`children`; and `diagnostics`/`health`.'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
placeId:
type: string
minLength: 1
destination:
type: string
maxLength: 255
lat:
type: number
lng:
type: number
checkIn:
type: string
format: date
checkOut:
type: string
format: date
rooms:
type: integer
minimum: 1
maximum: 6
default: 1
adults:
type: integer
minimum: 1
maximum: 6
default: 2
children:
type: integer
minimum: 0
maximum: 4
default: 0
childrenAges:
type: array
items:
type: integer
minimum: 1
maximum: 18
maxItems: 4
default: []
guestNationality:
type: string
minLength: 2
maxLength: 2
page:
type: integer
minimum: 1
default: 1
limit:
type: integer
minimum: 10
maximum: 100
default: 20
hotelName:
type: string
maxLength: 200
minStars:
type: integer
minimum: 1
maximum: 5
minPrice:
type: number
minimum: 0
maxPrice:
type: number
minimum: 0
priceCurrency:
type: string
enum:
- USD
- GBP
- EUR
- INR
minGuestScore:
type: number
minimum: 0
maximum: 10
relaxFilters:
type: boolean
propertyType:
type: string
maxLength: 30
sortBy:
type: string
enum:
- best
- price
- rating
- distance
default: best
sortOrder:
type: string
enum:
- asc
- desc
default: asc
currency:
type: string
enum:
- USD
- GBP
- EUR
- INR
maxDistanceKm:
type: number
minimum: 0.5
maximum: 200
supplierCodes:
type: array
items:
type: string
minLength: 1
maxItems: 8
previewOnly:
type: boolean
amenities:
type: array
items:
type: string
enum:
- wifi
- pool
- breakfast
- parking
- gym
- spa
- pet-friendly
preferPlaceCity:
type: boolean
seenHotels:
type: array
items:
type: string
pattern: ^[0-9a-f]{12}$
required:
- placeId
- lat
- lng
- checkIn
- checkOut
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `hotel.searchByPlace` tRPC procedure, WITHOUT the `bySupplier` field(s) — internal-only data stripped from this surface; clients must never depend on them. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1HotelsSearch
x-operation-id-source: derived
/v1/hotels/autosuggest:
get:
tags:
- hotels
summary: Resolve a destination query to place suggestions
description: Runs `hotel.autosuggest`. Returns supplier place suggestions (cities, regions, POIs, hotels) for a free-text destination — the id/lat/lng of a pick is what `POST /v1/hotels/search` expects as placeId + coordinates (#1062). Results are ranked server-side; the first entry is the resolver's best match.
parameters:
- schema:
type: string
minLength: 1
maxLength: 200
example: Dubai
required: true
name: query
in: query
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `hotel.autosuggest` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: getV1HotelsAutosuggest
x-operation-id-source: derived
/v1/hotels/{ref}:
get:
tags:
- hotels
summary: Supplier hotel detail
description: Runs `hotel.getSupplierDetails` for an opaque supplier hotel ref (`sh_…`). Carries `latitude`/`longitude` and, when the supplier lists them, `attractions` (nearby landmarks as display strings) — the supplier detail has no structured nearby list with distances.
parameters:
- schema:
type: string
minLength: 1
required: true
name: ref
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `hotel.getSupplierDetails` tRPC procedure, WITHOUT the `raw` field(s) — internal-only data stripped from this surface; clients must never depend on them. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: getV1HotelsByRef
x-operation-id-source: derived
/v1/hotels/{ref}/rooms:
post:
tags:
- hotels
summary: Live room availability and pricing
description: Runs `hotel.getSupplierRooms` for the hotel ref with the stay in the body. Each `rooms[]` rate carries `taxesIncluded` (true/false when the supplier disclosed whether `price` is all-in, null when unknown — only true may be shown as "includes taxes & fees").
parameters:
- schema:
type: string
minLength: 1
required: true
name: ref
in: path
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
checkIn:
type: string
format: date
checkOut:
type: string
format: date
adults:
type: integer
minimum: 1
default: 2
children:
type: integer
minimum: 0
default: 0
rooms:
type: integer
minimum: 1
maximum: 9
default: 1
childrenAges:
type: array
items:
type: integer
minimum: 0
maximum: 18
maxItems: 6
default: []
currency:
type: string
enum:
- USD
- GBP
- EUR
- INR
required:
- checkIn
- checkOut
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `hotel.getSupplierRooms` tRPC procedure, WITHOUT the `rawRooms` field(s) — internal-only data stripped from this surface; clients must never depend on them. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1HotelsByRefRooms
x-operation-id-source: derived
components:
schemas:
UpgradeRequiredError:
type: object
properties:
error:
type: object
properties:
code:
type: string
enum:
- UPGRADE_REQUIRED
message:
type: string
minVersion:
type: string
example: 1.2.0
platform:
type:
- string
- 'null'
required:
- code
- message
- minVersion
- platform
required:
- error
ApiError:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: NOT_FOUND
message:
type: string
example: Booking not found
domainCode:
type: string
example: NON_REFUNDABLE_CONSENT_REQUIRED
issues:
type: array
items:
type: object
properties:
path:
type: string
message:
type: string
required:
- path
- message
required:
- code
- message
required:
- error
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Better Auth session token. Obtain it from the native /api/auth/* endpoints (Better Auth bearer plugin — out of scope for this spec, see #922).'
x-provenance:
method: harvested
publisher: GetMyHotels
source: https://api.getmyhotels.com/v1/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)