Autocomplete API

Autocomplete API

Download RAML

Overview

The Autocomplete API returns a list of places that match a specified search term. It can be used to power other affiliate APIs that require place selection (ex. Price Insights API)

Resources:

/flights

GET
/api/affiliate/autocomplete/v1/flights?apiKey=<string>&searchTerm=<string>
Query parameterDescription
apiKey
Required
searchTerm
Required

The search term used to find matching places.

Responses
200 - application/json

Retrieve a list of results. Maximum of 6 items are returned.

{
    "results": [
        {
            "placeId": 175485,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "name": "John F Kennedy Intl",
            "fullName": "John F Kennedy Intl, New York, United States, (JFK)",
            "countryName": "United States",
            "regionName": "New York",
            "cityName": "New York",
            "iataCode": "JFK",
            "isMetro": false
        }
    ]
}

/cars

GET
/api/affiliate/autocomplete/v1/cars?apiKey=<string>&searchTerm=<string>
Query parameterDescription
apiKey
Required
searchTerm
Required

The search term used to find matching places.

Responses
200 - application/json

Retrieve a list of results. Maximum of 6 items are returned.

{
    "results": [
        {
            "placeId": 59560,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "fullName": "New York, United States",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "New York",
            "cityName": "New York",
            "cityId": 15830
        }
    ]
}

/hotels

GET
/api/affiliate/autocomplete/v1/hotels?apiKey=<string>&searchTerm=<string>
Query parameterDescription
apiKey
Required
searchTerm
Required

The search term used to find matching places.

Responses
200 - application/json

Retrieve a list of results. Maximum of 6 items are returned.

{
    "results": [
        {
            "placeId": 59560,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "name": "Las Vegas",
            "fullName": "Las Vegas, Nevada",
            "location": {
                "latitude": 36.09024,
                "longitude": -115.17246
            },
            "places": [
                "Nevada"
            ],
            "entityKey": "kplace:59560",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "Nevada",
            "cityName": "Las Vegas",
            "cityId": 15830
        },
        {
            "placeId": 61746,
            "primaryPlaceType": "hotel",
            "displayPlaceType": {
                "type": "hotel",
                "displayName": "Hotel"
            },
            "name": "Four Seasons Hotel Las Vegas",
            "fullName": "Four Seasons Hotel Las Vegas, Las Vegas",
            "location": {
                "latitude": 36.09024,
                "longitude": -115.17246
            },
            "entityKey": "kplace:61746",
            "places": [
                "Las Vegas"
            ],
            "hotelName": "Four Seasons Hotel Las Vegas",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "Nevada",
            "cityName": "Las Vegas",
            "cityId": 15830,
            "hotelId": 12345
        }
    ]
}

Types:

FlightsAutocompleteResponse

Properties
results
Required

Flights autocomplete results

Example:
{
    "results": [
        {
            "placeId": 175485,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "name": "John F Kennedy Intl",
            "fullName": "John F Kennedy Intl, New York, United States, (JFK)",
            "countryName": "United States",
            "regionName": "New York",
            "cityName": "New York",
            "iataCode": "JFK",
            "isMetro": false
        }
    ]
}

FlightsAutocompleteRecordResponse

Properties
placeId
Required

The unique identifier of a place that could be used in other KAYAK APIs

primaryPlaceType
Required

Primary place type code for the place

displayPlaceType
Required

Display place type code for the place that is more granular than primary place type and could be used for display purposes

name
Required

Localised name of the place (e.g., airport name, city name)

fullName
Required

Localised full name that might include city, region, country and airport name in the result

countryName

Localised country name of the place

regionName

Localised region name of the place

cityName

Localised city name of the place

iataCode

IATA code for the airport or metro area

isMetro

Whether the place is a metro area, which includes multiple airports and is treated as a city (placeType=city and placeId is a city object). For example SEA metro code includes: SEA, BFI, and LKE airports.

Example:
{
    "placeId": 175485,
    "primaryPlaceType": "city",
    "displayPlaceType": {
        "type": "city",
        "displayName": "City"
    },
    "name": "John F Kennedy Intl",
    "fullName": "John F Kennedy Intl, New York, United States, (JFK)",
    "countryName": "United States",
    "regionName": "New York",
    "cityName": "New York",
    "iataCode": "JFK",
    "isMetro": false
}

CarsAutocompleteResponse

Properties
results
Required

Cars autocomplete results

Example:
{
    "results": [
        {
            "placeId": 59560,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "fullName": "New York, United States",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "New York",
            "cityName": "New York",
            "cityId": 15830
        }
    ]
}

CarsAutocompleteRecordResponse

Properties
placeId
Required

The unique identifier of a place that could be used in other KAYAK APIs

primaryPlaceType
Required

Primary place type code for the place

displayPlaceType
Required

Display place type code for the place that is more granular than primary place type and could be used for display purposes

fullName
Required

Localised full name that might include city, region, country and airport name in the result

countryName

Localised country name of the place

countryCode

ISO 3166-1 alpha-2 country code

regionName

Localised region name of the place

cityName

Localised city name of the place

cityId

The unique identifier of a city that could be used in other KAYAK APIs

iataCode

IATA code for the airport

Example:
{
    "placeId": 59560,
    "primaryPlaceType": "city",
    "displayPlaceType": {
        "type": "city",
        "displayName": "City"
    },
    "fullName": "New York, United States",
    "countryName": "United States",
    "countryCode": "US",
    "regionName": "New York",
    "cityName": "New York",
    "cityId": 15830
}

HotelsAutocompleteResponse

Properties
results
Required

Hotels autocomplete results

Example:
{
    "results": [
        {
            "placeId": 59560,
            "primaryPlaceType": "city",
            "displayPlaceType": {
                "type": "city",
                "displayName": "City"
            },
            "name": "Las Vegas",
            "fullName": "Las Vegas, Nevada",
            "location": {
                "latitude": 36.09024,
                "longitude": -115.17246
            },
            "places": [
                "Nevada"
            ],
            "entityKey": "kplace:59560",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "Nevada",
            "cityName": "Las Vegas",
            "cityId": 15830
        },
        {
            "placeId": 61746,
            "primaryPlaceType": "hotel",
            "displayPlaceType": {
                "type": "hotel",
                "displayName": "Hotel"
            },
            "name": "Four Seasons Hotel Las Vegas",
            "fullName": "Four Seasons Hotel Las Vegas, Las Vegas",
            "location": {
                "latitude": 36.09024,
                "longitude": -115.17246
            },
            "entityKey": "kplace:61746",
            "places": [
                "Las Vegas"
            ],
            "hotelName": "Four Seasons Hotel Las Vegas",
            "countryName": "United States",
            "countryCode": "US",
            "regionName": "Nevada",
            "cityName": "Las Vegas",
            "cityId": 15830,
            "hotelId": 12345
        }
    ]
}

HotelsAutocompleteRecordResponse

Properties
placeId
Required

The unique identifier of a place that could be used in other KAYAK APIs

primaryPlaceType
Required

Primary place type code for the place

displayPlaceType
Required

Display place type code for the place that is more granular than primary place type and could be used for display purposes

name
Required

Localised name of the place (e.g., hotel name, airport name, city name)

fullName
Required

Localised full name created by concatenating the name and places fields, separated by a comma.

location
Required

The latitude and longitude of the place

places
Required

Places hierarchy for the result (e.g., city, region, country)

entityKey
Required

Entity key that can be used for calling the Hotel Search API

hotelName

Localised hotel display name. Only present for hotel records

countryName

Localised country name of the place

countryCode

ISO 3166-1 alpha-2 country code

regionName

Localised region name of the place

cityName

Localised city name of the place

cityId

The unique identifier of a city that could be used in other KAYAK APIs

hotelId

The unique identifier of a hotel that could be used in other KAYAK APIs

iataCode

IATA code for the airport

Example:
{
    "placeId": 59560,
    "primaryPlaceType": "hotel",
    "displayPlaceType": {
        "type": "hotel",
        "displayName": "Hotel"
    },
    "name": "Four Seasons Hotel Las Vegas",
    "fullName": "Four Seasons Hotel Las Vegas, Las Vegas",
    "location": {
        "latitude": 36.09024,
        "longitude": -115.17246
    },
    "places": [
        "Las Vegas"
    ],
    "entityKey": "khotel:59560",
    "hotelName": "Four Seasons Hotel Las Vegas",
    "countryName": "United States",
    "countryCode": "US",
    "regionName": "Nevada",
    "cityName": "Las Vegas",
    "cityId": 15830,
    "hotelId": 12345
}

PrimaryPlaceTypeenum

Primary place type

airport | city | country | hotel | trainstation | region | touristregion | neighborhood | landmark | nationalpark | island

DisplayPlaceType

Properties
type
Required

Display place type

displayName
Required

Localised display type name

Coordinates

Properties
latitude
Required

Latitude of the place

longitude
Required

Longitude of the place

The KAYAK Affiliate Network lets you link from any brand you likeEnhance and monetize your travel content with flights, hotels, cars and more!

KAYAK logo
HotelsCombined logo
Momondo logo
Cheapflights logo
Cookie preferences