Search for flights using advanced syntax
Returns currently or recently airborne flights based on geospatial search parameters.
Query parameters include a latitude/longitude box, aircraft ident with wildcards, type with wildcards, prefix, origin airport, destination airport, origin or destination airport, groundspeed, and altitude. It takes search terms in a single string comprising of {operator key value} elements and returns an array of flight structures. Each search term must be enclosed in curly braces. Multiple search terms can be combined in an implicit boolean "and" by separating the terms with at least one space. This function only searches flight data representing approximately the last 24 hours. Codeshares and alternate idents are NOT searched when matching against the ident key.
The supported operators include (note that operators take different numbers of arguments):
- false - results must have the specified boolean key set to a value of false. Example: {false arrived}
- true - results must have the specified boolean key set to a value of true. Example: {true lifeguard}
- null - results must have the specified key set to a null value. Example: {null waypoints}
- notnull - results must have the specified key not set to a null value. Example: {notnull aircraftType}
- = - results must have a key that exactly matches the specified value. Example: {= aircraftType C172}
- != - results must have a key that must not match the specified value. Example: {!= prefix H}
- < - results must have a key that is lexicographically less-than a specified value. Example: {< arrivalTime 1276811040}
- > - results must have a key that is lexicographically greater-than a specified value. Example: {> speed 500}
- <= - results must have a key that is lexicographically less-than-or-equal-to a specified value. Example: {<= alt 8000}
- >= - results must have a key that is lexicographically greater-than-or-equal-to a specified value.
- match - results must have a key that matches against a case-insensitive wildcard pattern. Example: {match ident AAL*}
- notmatch - results must have a key that does not match against a case-insensitive wildcard pattern. Example: {notmatch aircraftType B76*}
- range - results must have a key that is numerically between the two specified values. Example: {range alt 8000 20000}
- in - results must have a key that exactly matches one of the specified values. Example: {in orig {KLAX KBUR KSNA KLGB}}
- orig_or_dest - results must have either the origin or destination key exactly match one of the specified values. Example: {orig_or_dest {KLAX KBUR KSNA KLGB}}
- airline - results will only include airline flight if the argument is 1, or will only include GA flights if the argument is 0. Example: {airline 1}
- aircraftType - results must have an aircraftType key that matches one of the specified case-insensitive wildcard patterns. Example: {aircraftType {B76* B77*}}
- ident - results must have an ident key that matches one of the specified case-insensitive wildcard patterns. Example: {ident {N123* N456* AAL* UAL*}}
- ident_or_reg - results must have an ident key or was known to be operated by an aircraft registration that matches one of the specified case-insensitive wildcard patterns. Example: {ident_or_reg {N123* N456* AAL* UAL*}}
The supported key names include (note that not all of these key names are returned in the result structure, and some have slightly different names):
- actualDepartureTime - Actual time of departure, or null if not departed yet. UNIX epoch timestamp seconds since 1970
- aircraftType - aircraft type ID (for example: B763)
- alt - altitude at last reported position (hundreds of feet or Flight Level)
- altChange - altitude change indication (for example: "C" if climbing, "D" if descending, and empty if it is level)
- arrivalTime - Actual time of arrival, or null if not arrived yet. UNIX epoch timestamp seconds since 1970
- arrived - true if the flight has arrived at its destination.
- cancelled - true if the flight has been cancelled. The meaning of cancellation is that the flight is no longer being tracked by FlightAware. There are a number of reasons a flight may be cancelled including cancellation by the airline, but that will not always be the case.
- cdt - Controlled Departure Time, set if there is a ground hold on the flight. UNIX epoch timestamp seconds since 1970
- clock - Time of last received position. UNIX epoch timestamp seconds since 1970
- cta - Controlled Time of Arrival, set if there is a ground hold on the flight. UNIX epoch timestamp seconds since 1970
- dest - ICAO airport code of destination (for example: KLAX)
- edt - Estimated Departure Time. Epoch timestamp seconds since 1970
- eta - Estimated Time of Arrival. Epoch timestamp seconds since 1970
- fdt - Field Departure Time. UNIX epoch timestamp seconds since 1970
- firstPositionTime - Time when first reported position was received, or 0 if no position has been received yet. Epoch timestamp seconds since 1970
- fixes - intersections and/or VORs along the route (for example: SLS AMERO ARTOM VODIR NOTOS ULAPA ACA NUXCO OLULA PERAS ALIPO UPN GDL KEDMA BRISA CUL PERTI CEN PPE ALTAR ASUTA JLI RONLD LAADY WYVIL OLDEE RAL PDZ ARNES BASET WELLZ CIVET)
- fp - unique identifier assigned by FlightAware for this flight, aka fa_flight_id.
- gs - ground speed at last reported position, in kts.
- heading - direction of travel at last reported position.
- hiLat - highest latitude travelled by flight.
- hiLon - highest longitude travelled by flight.
- ident - flight identifier or registration of aircraft.
- lastPositionTime - Time when last reported position was received, or 0 if no position has been received yet. Epoch timestamp seconds since 1970.
- lat - latitude of last reported position.
- lifeguard - true if a "lifeguard" rescue flight.
- lon - longitude of last reported position.
- lowLat - lowest latitude travelled by flight.
- lowLon - lowest longitude travelled by flight.
- ogta - Original Time of Arrival. UNIX epoch timestamp seconds since 1970
- ogtd - Original Time of Departure. UNIX epoch timestamp seconds since 1970
- orig - ICAO airport code of origin (for example: KIAH)
- physClass - physical class (for example: J is jet)
- prefix - A one or two character identifier prefix code (common values: G or GG Medevac, L Lifeguard, A Air Taxi, H Heavy, M Medium).
- speed - ground speed, in kts.
- status - Single letter code for current flight status, can be S Scheduled, F Filed, A Active, Z Completed, or X Cancelled.
- updateType - data source of last position (P=projected, O=oceanic, Z=radar, A=ADS-B, M=multilateration, D=datalink, X=surface and near surface (ADS-B and ASDE-X), S=space-based).
- waypoints - all of the intersections and VORs comprising the route
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.
Query parameters
Query to search for airborne or recently arrived flights. It should not exceed 1000 bytes in length. Search criteria is only applied to the most recent position for a flight. This function only searches flights within approximately the last 24 hours. The supported operators include (note that operators take different numbers of arguments):
- false - results must have the specified boolean key set to a value of false. Example: {false arrived}
- true - results must have the specified boolean key set to a value of true. Example: {true lifeguard}
- null - results must have the specified key set to a null value. Example: {null waypoints}
- notnull - results must have the specified key not set to a null value. Example: {notnull aircraftType}
- = - results must have a key that exactly matches the specified value. Example: {= aircraftType C172}
- != - results must have a key that must not match the specified value. Example: {!= prefix H}
- < - results must have a key that is lexicographically less-than a specified value. Example: {< arrivalTime 1276811040}
- > - results must have a key that is lexicographically greater-than a specified value. Example: {> speed 500}
- <= - results must have a key that is lexicographically less-than-or-equal-to a specified value. Example: {<= alt 8000}
- >= - results must have a key that is lexicographically greater-than-or-equal-to a specified value.
- match - results must have a key that matches against a case-insensitive wildcard pattern. Example: {match ident AAL*}
- notmatch - results must have a key that does not match against a case-insensitive wildcard pattern. Example: {notmatch aircraftType B76*}
- range - results must have a key that is numerically between the two specified values. Example: {range alt 8000 20000}
- in - results must have a key that exactly matches one of the specified values. Example: {in orig {KLAX KBUR KSNA KLGB}}
- orig_or_dest - results must have either the origin or destination key exactly match one of the specified values. Example: {orig_or_dest {KLAX KBUR KSNA KLGB}}
- airline - results will only include airline flight if the argument is 1, or will only include GA flights if the argument is 0. Example: {airline 1}
- aircraftType - results must have an aircraftType key that matches one of the specified case-insensitive wildcard patterns. Example: {aircraftType {B76* B77*}}
- ident - results must have an ident key that matches one of the specified case-insensitive wildcard patterns. Example: {ident {N123* N456* AAL* UAL*}}
- ident_or_reg - results must have an ident key or was known to be operated by an aircraft registration that matches one of the specified case-insensitive wildcard patterns. Example: {ident_or_reg {N123* N456* AAL* UAL*}}
The supported key names include (note that not all of these key names are returned in the result structure, and some have slightly different names):
- actualDepartureTime - Actual time of departure, or null if not departed yet. UNIX epoch timestamp seconds since 1970
- aircraftType - aircraft type ID (for example: B763)
- alt - altitude at last reported position (hundreds of feet or Flight Level)
- altChange - altitude change indication (for example: "C" if climbing, "D" if descending, and empty if it is level)
- arrivalTime - Actual time of arrival, or null if not arrived yet. UNIX epoch timestamp seconds since 1970
- arrived - true if the flight has arrived at its destination.
- cancelled - true if the flight has been cancelled. The meaning of cancellation is that the flight is no longer being tracked by FlightAware. There are a number of reasons a flight may be cancelled including cancellation by the airline, but that will not always be the case.
- cdt - Controlled Departure Time, set if there is a ground hold on the flight. UNIX epoch timestamp seconds since 1970
- clock - Time of last received position. UNIX epoch timestamp seconds since 1970
- cta - Controlled Time of Arrival, set if there is a ground hold on the flight. UNIX epoch timestamp seconds since 1970
- dest - ICAO airport code of destination (for example: KLAX)
- edt - Estimated Departure Time. Epoch timestamp seconds since 1970
- eta - Estimated Time of Arrival. Epoch timestamp seconds since 1970
- fdt - Field Departure Time. UNIX epoch timestamp seconds since 1970
- firstPositionTime - Time when first reported position was received, or 0 if no position has been received yet. Epoch timestamp seconds since 1970
- fixes - intersections and/or VORs along the route (for example: SLS AMERO ARTOM VODIR NOTOS ULAPA ACA NUXCO OLULA PERAS ALIPO UPN GDL KEDMA BRISA CUL PERTI CEN PPE ALTAR ASUTA JLI RONLD LAADY WYVIL OLDEE RAL PDZ ARNES BASET WELLZ CIVET)
- fp - unique identifier assigned by FlightAware for this flight, aka fa_flight_id.
- gs - ground speed at last reported position, in kts.
- heading - direction of travel at last reported position.
- hiLat - highest latitude travelled by flight.
- hiLon - highest longitude travelled by flight.
- ident - flight identifier or registration of aircraft.
- lastPositionTime - Time when last reported position was received, or 0 if no position has been received yet. Epoch timestamp seconds since 1970.
- lat - latitude of last reported position.
- lifeguard - true if a "lifeguard" rescue flight.
- lon - longitude of last reported position.
- lowLat - lowest latitude travelled by flight.
- lowLon - lowest longitude travelled by flight.
- ogta - Original Time of Arrival. UNIX epoch timestamp seconds since 1970
- ogtd - Original Time of Departure. UNIX epoch timestamp seconds since 1970
- orig - ICAO airport code of origin (for example: KIAH)
- physClass - physical class (for example: J is jet)
- prefix - A one or two character identifier prefix code (common values: G or GG Medevac, L Lifeguard, A Air Taxi, H Heavy, M Medium).
- speed - ground speed, in kts.
- status - Single letter code for current flight status, can be S Scheduled, F Filed, A Active, Z Completed, or X Cancelled.
- updateType - data source of last position (P=projected, O=oceanic, Z=radar, A=ADS-B, M=multilateration, D=datalink, X=surface and near surface (ADS-B and ASDE-X), S=space-based).
- waypoints - all of the intersections and VORs comprising the route
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": [
{
"origin": {
"timezone": "America/New_York",
"name": "LaGuardia",
"city": "New York"
},
"destination": {
"timezone": "America/New_York",
"name": "LaGuardia",
"city": "New York"
},
"first_position_time": "2021-12-31T19:59:59Z",
"last_position": {
"timestamp": "2021-12-31T19:59:59Z"
},
"actual_off": "2021-12-31T19:59:59Z",
"actual_on": "2021-12-31T19:59:59Z",
"foresight_predictions_available": true
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.