Skip to main content

Query Leg

One way or return

To search for one way flights, a queryLeg list with only 1 leg can be specified. If return prices are required, specify a queryLeg list with 2 legs.

Date types

Each queryLeg must only have one date type such as: dateRange or fixedDate or anytime.

A summary of the date types and their functions:

Date typeDescription
dateRangeA range of dates to search for flights for. Will search for prices from the first to last date of each month
fixedDateA specific date to search for flights for.
anytimeWill return best quotes for a given route.

See the Flights Indicative API reference for more details.

Sample date types

{
"queryLegs": [
{
...
"anytime":true
...
}
]
}

Or

{
"queryLeg": [
{
...
"fixedDate": {
"year": 2024,
"month": 7,
"day": 1
}
...
}
]
}

Or

{
"queryLeg": [
{
...
"dateRange": {
"startDate":{
"month": 7,
"year": 2024
},
"endDate":{
"month": 8,
"year": 2024
}
}
...
}
]
}
caution

The day field is ignored when specifying a dateRange - the API will search for prices from the first to last day of the given months regardless of this value.

Origin and destination place types

The Flights Indicative Prices API accepts IATA and entityId place types at the following levels:

  • airports
  • cities
  • nation or territories

Continent type places are not valid. (E.g. 205351567 - North America).

Airports and cities can be either IATA and entityId. (E.g LHR - London Heathrow, LON - London)

Nations or territories do not have IATA codes and therefore need to be inputted as entityId.

Data for IATA and entityId can be found in the Geo API reference.

Sample date types

{
"queryLegs": [
{
...
"originPlace": {
"queryPlace":{
// EntityId for the United States
"entityId": "29475087"
}
}
...
}
]
}
{
"queryLegs": [
{
...
"destinationPlace": {
"queryPlace":{
// IATA code for London Heathrow Airport
"iata": "LHR"
}
}
...
}
]
}