Skip to Content

Search hotels (JSON body)

The same search, with its fields in a JSON body

POST
/v1/hotels/search

Authorization

apiKey
headerX-API-Key<token>

vl_live_... for live prices, vl_test_... for saved samples at no cost. Authorization: Bearer is also read.

Request Body

application/json
  1. body

Say where in exactly one way: city and country, latitude and longitude, place_id, or hotel_ids.

city?string
country?string
latitude?number
longitude?number
radius_km?number
place_id?string
hotel_ids?array<string>
Itemsitems <= 200
check_in*string
Formatdate
check_out*string
Formatdate
rooms?array<>
Items1 <= items
adults?integer
child_ages?array<integer>
currency?string
nationality?string
sort?string
Value in"price""rating"
limit?integer
Range1 <= value <= 100
cursor?string
response_mode?string
Value in"complete""partial"
wait_ms?integer
max_age_s?integer

Response Body

The page asked for.

application/json
  1. response
data*
meta*
Example Request
curl -X POST 'https://api.voyagelabs.ai/v1/hotels/search' \  -H 'X-API-Key: ' \  -H 'Content-Type: application/json' \  -d '{  "check_in": "2019-08-24",  "check_out": "2019-08-24"}'
Example Response
{  "data": {    "search_id": "string",    "status": "complete",    "retry_after_ms": 0,    "query": {},    "pricing": {      "priced_at": "2019-08-24T14:15:22Z",      "age_s": 0    },    "counts": {      "found": 0,      "returned": 0    },    "next_cursor": "string",    "hotels": [      {        "hotel": {          "id": "string",          "name": "string",          "stars": 0,          "rating": 0,          "review_count": 0,          "address": "string",          "city": "string",          "country": "string",          "latitude": 0,          "longitude": 0,          "photo": "string"        },        "offers": [          {            "rooms": [              {                "name": "string",                "room_id": 0,                "adults": 0,                "child_ages": [                  0                ]              }            ],            "board_code": "string",            "board": "string",            "total": 0,            "currency": "string",            "per_night": 0,            "taxes_included": 0,            "due_at_property": [              {                "description": "string",                "amount": 0,                "currency": "string"              }            ],            "refundable": true,            "free_cancellation_until": "string",            "cancellation": [              {                "from": "string",                "charge": {                  "amount": 0,                  "currency": "string"                }              }            ]          }        ],        "booking_links": [          {            "site": "hotels_com",            "name": "string",            "url": "string",            "lands_on": "property",            "found_by": "id",            "verified": true,            "checked": "string",            "note": "string"          }        ]      }    ]  },  "meta": {    "request_id": "string",    "mode": "live"  }}