Skip to main content

Flights

Endpoint

POST https://partners.api.skyscanner.net/apiservices/v3/autosuggest/flights

Request

Requests to autosuggest/flights contain the following:

Field nameDescription
queryObject containing parameters for flights autosuggest search.
isDestination (Optional)Alters ranking logic of entities. Defaults to false if not sent.
limit (Optional)Limits number of entities returned in response. Take a min value of 1 and max of 50.

The query object contains the following fields:

Field nameDescription
marketMarket where search is coming from. E.g. UK.
localeLanguage to be used for the search. E.g. en-GB.
searchTermThe string to get autosuggest results for. If left blank, the most popular flights will be returned.
includedEntityTypes(Optional)Can be used to filter type of places returned. See below for full list of supported entity types.

Here is a sample of a query object:

{
"query": {
"market": "UK",
"locale": "en-GB",
"searchTerm": "united",
"includedEntityTypes": [
"PLACE_TYPE_AIRPORT",
"PLACE_TYPE_CITY",
"PLACE_TYPE_COUNTRY"
]
},
"limit": 10,
"isDestination": true
}

Response

Responses from the autosuggest/flights are returned as a list of places. Each places item will contain the following fields:

Field nameDescription
entityIdA unique ID for the place. It's an internal ID and it doesn't have any meaning outside of our APIs.
iataCodeThe IATA code of the entity. E.g. LHR
parentIdParent entity Id for this entity.
nameName of the entity. E.g London Heathrow
countryIdCountry code for where the entity is located. E.g. London will have a countryId of GB.
countryNameName of country entity is located in. E.g. United Kingdom
cityNameName of the city the entity is located in. E.g. London
locationCoordinates of the entity. Expressed as a latitude/longitude pair. E.g. 51.471389,-0.452778
hierarchyShows hierarchy of places related to this entity. E.g. London Heathrow (LHR), London|England|United Kingdom
highlightingTwo dimensional list displaying keywords in entity to be highlighted. E.g. [[7,15]]
typeType of place. See section below for possible values for PLACE_TYPE.
airportInformationObject containing information about nearest airport to entity. See section below for more detailed information

Entity Types

Below are the possible entity types. They can be used to filter the response by being passed in the includedEntityTypes field in the request. They are also used in the type field in the response.

Type
PLACE_TYPE_COUNTRY
PLACE_TYPE_AIRPORT
PLACE_TYPE_CITY

Airport Information

Results where the entity type is PLACE_TYPE_CITY will have information about the nearest airport. It is an object with the following information:

Field nameDescription
iataCodeThe IATA code of the airport.
entityIdThe entityId of the airport.
parentIdParent entity Id of the airport.
countryIdCountry code that airport is located in.
cityIdCity code that airport is located in.
locationCoordinates of the airport. Expressed as a latitude/longitude pair. E.g. 13.735556,-60.952222
distanceObject with the distance from the entity. E.g. {"value": 3.8603525,"unitCode": "mile"}

Autosuggest API reference

See the Autosuggest API reference for more details.