Skip to main content

Usage

Connection#

The following curl command connects to the history endpoint, retrieves data from 8 hours ago(UTC) to 7 hours ago(UTC), for the specified ICAO address, and prints the received data to the console.

curl -H "Authorization: Bearer <your_token>" "https://api.airsafe.spire.com/v2/targets/history?icao_address=4072EA&start=2024-08-06T03:44:11.879Z&end=2024-08-06T04:44:11.879Z"

Query Parameters#

The following parameters can be specified to retrieve historical data with more accuracy. Since these are query parameters the total number of filters that can be specified is limited by the maximum URL length.

info

The query parameters start, end and icao_address are mandatory in order to retrieve data. To ensure optimum performance and response times, limitation of the selected timeframe to ≤15 minutes is recommended. This relates to all queries, whether for global or regional data and is irrespective of additional filters used.

You can then also add additional filtering parameters such as latitude_between and longitude_between to specify your query.

Query ParametersTypeDescription
startdatetimeRequired - History data extraction starting date, format is in ISO 8601
enddatetimeRequired - History data extraction ending date, format is in ISO 8601
icao_addressstringRequired - Comma separated list of ICAO addresses (6 hex characters)
latitude_betweenfloat,floatTwo numbers, separated by a comma. First value must be smaller than the second; specifies south-to-north range. First value is inclusive, last value is exclusive
longitude_betweenfloat,floatTwo numbers, separated by a comma. Specifies west-to-east range. E.g. range [170, -170) is a 20° range crossing anti-meridian, and [-170, 170) is a 340° range covering most of the globe. First value is inclusive, last value is exclusive