Search for flight positions
Returns flight positions based on geospatial search parameters. This allows you to locate flights that have ever flown within a specific a latitude/longitude box, 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.
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 preferred}
- true - results must have the specified boolean key set to a value of true. Example: {true preferred}
- 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: {= fp 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}}
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):
- alt - Altitude, measured in hundreds of feet or Flight Level.
- altChange - a one-character code indicating the change in altitude.
- cid - a three-character cid code
- clock - UNIX epoch timestamp seconds since 1970
- fp - unique identifier assigned by FlightAware for this flight, aka fa_flight_id.
- gs - ground speed, measured in kts.
- lat - latitude of the reported position.
- lon - longitude of the reported position
- updateType - source of the last reported 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)
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 flight positions. It should not exceed 1000 bytes in length. Search criteria is applied against all positions of 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 preferred}
- true - results must have the specified boolean key set to a value of true. Example: {true preferred}
- 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: {= fp 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}}
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):
- alt - Altitude, measured in hundreds of feet or Flight Level.
- altChange - a one-character code indicating the change in altitude.
- altMax - Altitude, measured in hundreds of feet or Flight Level.
- cid - a three-character cid code
- cidfac - a four-character cidfac code
- clock - UNIX epoch timestamp seconds since 1970
- fp - unique identifier assigned by FlightAware for this flight, aka fa_flight_id.
- gs - ground speed, measured in kts.
- lat - latitude of the reported position.
- lon - longitude of the reported position
- preferred - boolean indicator of position quality
- recvd - UNIX epoch timestamp seconds since 1970
- updateType - source of the last reported 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)
Whether to return only a single position per unique fa_flight_id.
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
{
"positions": [
{
"timestamp": "2021-12-31T19:59:59Z"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.