Skip to main content

Usage

Connection#

The following curl command connects to the Flights History endpoint, retrieves historic data for the specified ICAO address and prints the received data to the console.

The server will only send the target updates between the desired dates and then stop the connection.

curl -H "Authorization: Bearer <your_token>" "https://api.airsafe.spire.com/v2/flights/history?start=2024-04-04T03:52:25.230Z&end=2024-04-04T04:52:25.230Z&icao_address=896497"
info

Query parameters start and end are mandatory in order to retrieve data.

Query Parameters#

The following parameters can be specified to retrieve real-time data with more accuracy.

Query ParametersTypeDescription
startdatetimeRequired - History data extraction start timestamp (ISO 8601 format)
enddatetimeRequired - History data extraction end timestamp (ISO 8601 format)
flight_idIDSpire internal unique flight ID
icao_addressstringHexadecimal representation of ICAO 24 – bit address
callsignstringCall sign
flight_numberstringFlight number (IATA format)
tail_numberstringAircraft registration
aircraft_typestringIATA/ICAO aircraft type code
aircraft_rolestringAircraft role e.g. PAX
airlinestringIATA/ICAO airline code
departure_airportstringIATA/ICAO departure airport code
arrival_airportstringIATA/ICAO arrival airport code
operating_airportstringIATA/ICAO airport code for all inbound and outbound flights
flight_statestringFlight state as one of "ON_GROUND","AIRBORNE","LANDED","POST_FLIGHT"