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
Parameter | Description | Example |
---|---|---|
currency | The currency you want the prices in | GBP |
market | The market/country your user is in | UK |
locale | The locale you want the results in (ISO locale) | en-GB |
adults | Number of adults (18+ years). Must be between 1 and 8 | 1 |
queryLegs | All 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 |
cabinClass | The cabin class. Can be "CABIN_CLASS_ECONOMY", "CABIN_CLASS_PREMIUM_ECONOMY", "CABIN_CLASS_BUSINESS", "CABIN_CLASS_FIRST" | CABIN_CLASS_ECONOMY |
childrenAges | Number of children (0-17 years). Can be between 0 and 8. | [3,5,12] |
includedAgentsIds | Only return results from those agents. Comma-separated list of agent ids. | ["airg","ctuk"] |
excludedAgentsIds | Filter out results from those agents. Comma-separated list of agent ids. | ["airg","ctuk"] |
includedCarriersIds | Only return results from those carriers. Comma-separated list of carrier iata codes. | ["FR","U2"] |
excludedCarriersIds | Filter out results from those carriers. Comma-separated list of carrier iata codes. | ["FR","U2"] |
nearbyAirports | Option to include airports near the specified origin airport. | true |
includeSustainabilityData | Option to include flights emissions data | true |
Query leg
Parameter | Description | Example |
---|---|---|
originPlaceId | The origin place. It needs to contain either an IATA or an entity ID. | Place |
destinationPlaceId | The destination place. It needs to contain either an IATA or an entity ID. | Place |
date | The date of flight | Date |
Place
Parameter | Description | Example |
---|---|---|
iata | The IATA code of and origin or destination city or airport | LHR |
entityId | The internal Skyscanner ID for an origin or destination location | 95565050 |
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:
- SKY codes (old internal Skyscanner IDs)
- IP addresses
- The coordinates of the place (we will return the nearest place)
- The name of the place (partial names are also supported)
For full details on the Autosuggest API v1 check out the full documentation.
Date
Parameter | Description | Example |
---|---|---|
year | The year of flight | 2024 |
month | The month of flight | 9 |
day | The day of flight | 26 |