Get flights with a specific origin and destination
This endpoint is quite similar to the FindFlight operator in prior versions of AeroAPI. Results may include both non-stop and one-stop flights. Note that because the returned flights can include multiple legs, the response format differs from most other flight-returning endpoints. If the optional start or end query parameters are not provided start will default to 1 day in the future, while end will default to 7 days in the past relative to the time the query is made.
Request
- Base URLhttps://aeroapi.flightaware.com/aeroapi
- AuthAPI key in header x-apikey
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ICAO, IATA or LID ID of destination airport to fetch. ICAO is highly preferred to prevent ambiguity.
ICAO, IATA or LID ID of destination airport to fetch. ICAO is highly preferred to prevent ambiguity.
Query parameters
Type of flights to return.
Whether flights should be filtered based on their connection status. If setting start/end date parameters then connection must be set to nonstop, and will default to nonstop if left blank. If start/end are not specified then leaving this blank will result in a mix of nonstop and one-stop flights being returned, with a preference for nonstop flights. One-stop flights are identified with a custom heuristic, which may be incomplete.
The starting date range for flight results. The format is ISO8601 date or datetime, and the bound is inclusive. Specified start date must be no further than 10 days in the past and 2 days in the future. If using date instead of datetime, the time will default to 00:00:00Z.
The ending date range for flight results. The format is ISO8601 date or datetime, and the bound is exclusive. Specified end date must be no further than 10 days in the past and 2 days in the future. If using date instead of datetime, the time will default to 00:00:00Z.
Maximum number of pages to fetch. This is an upper limit and not a guarantee of how many pages will be returned.
Opaque value used to get the next batch of data from a paged collection.
Response
OK
Example response
{
"flights": [
{
"segments": [
{
"origin": {
"timezone": "America/New_York",
"name": "LaGuardia",
"city": "New York"
},
"destination": {
"timezone": "America/New_York",
"name": "LaGuardia",
"city": "New York"
},
"scheduled_out": "2021-12-31T19:59:59Z",
"estimated_out": "2021-12-31T19:59:59Z",
"actual_out": "2021-12-31T19:59:59Z",
"scheduled_off": "2021-12-31T19:59:59Z",
"estimated_off": "2021-12-31T19:59:59Z",
"actual_off": "2021-12-31T19:59:59Z",
"scheduled_on": "2021-12-31T19:59:59Z",
"estimated_on": "2021-12-31T19:59:59Z",
"actual_on": "2021-12-31T19:59:59Z",
"scheduled_in": "2021-12-31T19:59:59Z",
"estimated_in": "2021-12-31T19:59:59Z",
"actual_in": "2021-12-31T19:59:59Z"
}
]
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.