How to Search for Hotels in Quick Builder

Last updated: 2026-03-03

How to Search for Hotels in Quick Builder

Quick Builder uses the same hotel autocomplete and search endpoints as the Xeni Hotels API. This article covers the two-step process: finding a location with autocomplete, then searching for available properties.

Step 1: Autocomplete — Find a Location

Use the autocomplete endpoint to search for destinations by keyword. This returns location data and a correlation ID that you need for the property search.

Request

GET /hotels/api/v2/autocomplete?key=miami
ParameterTypeRequiredDescription
keystringYesSearch keyword (city name, region, or landmark)

Response

The response returns matching locations in the data array. The critical piece is the x-correlation-id response header — you must capture this value.

JSON
{
  "data": [
    {
      "id": "place_abc123",
      "country": "US",
      "full_name": "Miami, Florida, United States",
      "location": {
        "lat": 25.7617,
        "long": -80.1918
      },
      "name": "Miami",
      "state": "Florida",
      "type": "city"
    }
  ]
}

Important: The x-correlation-id header from this response must be included in subsequent search requests. Without it, the search will fail.

Location Types

TypeDescription
cityA specific city
stateA state or province
multicityA region spanning multiple cities

Step 2: Search for Properties

Once you have a location and correlation ID, search for available hotel properties.

Request

POST /hotels/api/v2/properties?currency=USD&page=1&limit=50&amenities=true

Query Parameters

ParameterTypeRequiredDescription
currencystringYesThree-letter currency code (e.g., USD, EUR, GBP)
pagenumberYesPage number for paginated results (starts at 1)
limitnumberYesNumber of results per page (max 50)
amenitiesbooleanNoSet to true to include amenity data in results

Headers

HeaderRequiredDescription
x-correlation-idYesThe correlation ID from the autocomplete response
Content-TypeYesapplication/json

Request Body

JSON
{
  "checkin_date": "2026-04-15",
  "checkout_date": "2026-04-18",
  "occupancy": [
    {
      "adults": 2,
      "childs": 1,
      "childages": [
        8
      ]
    }
  ],
  "lat": 25.7617,
  "long": -80.1918,
  "countryofresidence": "US",
  "placeid": "placeabc123",
  "radius": 25,
  "sort": [
    {
      "key": "price",
      "order": "asc"
    }
  ],
  "is_async": false
}

Body Parameters

ParameterTypeRequiredDescription
checkindatestringYesCheck-in date in YYYY-MM-DD format
checkoutdatestringYesCheck-out date in YYYY-MM-DD format
occupancyarrayYesArray of room occupancy objects
occupancy[].adultsnumberYesNumber of adults in the room
occupancy[].childsnumberYesNumber of children in the room
occupancy[].childagesarrayConditionalRequired if childs > 0. Array of child ages.
latnumberYesLatitude from the autocomplete result
longnumberYesLongitude from the autocomplete result
countryofresidencestringYesTwo-letter country code of the guest
placeidstringYesPlace ID from the autocomplete result
radiusnumberNoSearch radius in kilometers (default varies by location)
sortarrayNoSort criteria (see filters article for details)
filtersobjectNoFilter criteria (see filters article for details)
isasyncbooleanNoSet to true for async mode. Default is false.

Correlation ID Flow

The correlation ID ties the autocomplete and search requests together. Here is the complete flow:

1. GET /hotels/api/v2/autocomplete?key=miami
   ← Response includes x-correlation-id header: "corr_xyz789"
  1. POST /hotels/api/v2/properties?currency=USD&page=1&limit=50
→ Include header: x-correlation-id: corr_xyz789 ← Response returns hotel results

Always use the correlation ID from the most recent autocomplete call. Do not reuse correlation IDs across different searches.

Multiple Rooms

To search for multiple rooms, add additional objects to the occupancy array:

JSON
{
  "occupancy": [
    {
      "adults": 2,
      "childs": 0,
      "childages": []
    },
    {
      "adults": 2,
      "childs": 2,
      "childages": [
        5,
        10
      ]
    }
  ]
}

Each object represents one room. The search returns properties that can accommodate all specified rooms.

Next Steps

Learn how to apply filters to narrow your search results by rating, amenities, price range, and more.

Was this article helpful?