Skip to main content

Query object

The query object is used when querying the endpoint for data on your search criteria.

Layout

query object
├── currency
├── market
├── locale
├── queryLegs
│ └── originPlaceId
│ │ └── iata
│ │ └── entityId
│ └── destinationPlaceId
│ │ └── iata
│ │ └── entityId
│ └── date
│ │ └── year
│ │ └── month
│ │ └── day
├── adults
└── childrenAges
└── cabinClass
└── includedAgentsIds
└── excludedAgentsIds
└── includedCarriersIds
└── excludedCarriersIds
└── nearbyAirports
└── includeSustainabilityData

Description

ParameterDescriptionExample
currencyThe currency you want the prices inGBP
marketThe market/country your user is inUK
localeThe locale you want the results in (ISO locale)en-GB
adultsNumber of adults (18+ years). Must be between 1 and 81
queryLegsAll legs to be included in the query, with a maximum of 6. The legs have to be in ascending order by flight date. For return flights, the origin from the first queryLeg needs to match the destination from the last.Query
cabinClassThe cabin class. Can be "CABIN_CLASS_ECONOMY", "CABIN_CLASS_PREMIUM_ECONOMY", "CABIN_CLASS_BUSINESS", "CABIN_CLASS_FIRST"CABIN_CLASS_ECONOMY
childrenAgesNumber of children (0-17 years). Can be between 0 and 8.[3,5,12]
includedAgentsIdsOnly return results from those agents. Comma-separated list of agent ids.["airg","ctuk"]
excludedAgentsIdsFilter out results from those agents. Comma-separated list of agent ids.["airg","ctuk"]
includedCarriersIdsOnly return results from those carriers. Comma-separated list of carrier iata codes.["FR","U2"]
excludedCarriersIdsFilter out results from those carriers. Comma-separated list of carrier iata codes.["FR","U2"]
nearbyAirportsOption to include airports near the specified origin airport.true
includeSustainabilityDataOption to include flights emissions datatrue

Query leg

ParameterDescriptionExample
originPlaceIdThe origin place. It needs to contain either an IATA or an entity ID.Place
destinationPlaceIdThe destination place. It needs to contain either an IATA or an entity ID.Place
dateThe date of flightDate

Place

ParameterDescriptionExample
iataThe IATA code of and origin or destination city or airportLHR
entityIdThe internal Skyscanner ID for an origin or destination location95565050
info

The supported place types for the requests are cities and airports. Not all supported place types have IATA codes, so you can use entity IDs for them.

What are entity IDs?

Entity IDs are internal Skyscanner unique identifiers for places. We use them because not all places we support for our searches have industry-standard identifiers like IATA or ICAO.

You can use the Autosuggest API v1 to get entity IDs for places.

You can look up places with the Autosuggest API by:

  1. SKY codes (old internal Skyscanner IDs)
  2. IP addresses
  3. The coordinates of the place (we will return the nearest place)
  4. The name of the place (partial names are also supported)

For full details on the Autosuggest API v1 check out the full documentation.

Date

ParameterDescriptionExample
yearThe year of flight2024
monthThe month of flight9
dayThe day of flight26