External API Integrations - davewalker5/ADS-B-BaseStationReader GitHub Wiki
| Service | Endpoint | Usage | Documentation |
|---|---|---|---|
| AeroDataBox | Flights | Offline 1,5 | https://aerodatabox.p.rapidapi.com/flights |
| AeroDataBox | Aircraft | Offline 1,5 | https://aerodatabox.p.rapidapi.com/aircrafts |
| AeroDataBox | Schedules | Departures and Arrivals 6 | https://aerodatabox.p.rapidapi.com/flights/airports/iata |
| AirLabs | Active flights | Live 2,3 | https://airlabs.co/docs/flights |
| AirLabs | Fleets | Live 2,3 | https://airlabs.co/docs/fleets |
| AirLabs | Airlines | Live 1,3 | https://airlabs.co/docs/airlines |
| SkyLink | Airlines | Live 1,4, Offline 2,4 | https://skylink-api.p.rapidapi.com/v2/airlines/search |
| SkyLink | METAR | Current Airport Weather 7 | https://skylink-api.p.rapidapi.com/v2/weather/metar |
| SkyLink | TAF | Airport Weather Forecast 7 | https://skylink-api.p.rapidapi.com/v2/weather/metar |
| CheckWXApi | METAR | Current Airport Weather 7 | https://api.checkwx.com/metar |
Notes:
- Offline lookups are performed using the lookup tool, after a tracking session has been completed
- Live lookups are performed while actively tracking aircraft, in the terminal application
- The AirLabs APIs shouldn't be used for offline lookups as the APIs return details for active flights at the time they're called, not historical flights
- The SkyLink API integrations rely on the flight number/callsign mapping data to be populated to return flight information
- The AeroDataBox APIs can be used for live lookups but are better suited to offline lookups as there is a delay in flight information being published via the APIs
- Departure and arrival schedules for an airport can be exported using the lookup tool
- Airport weather endpoints are used to report weather via the lookup tool
The aircraft is identified first, using the following logic:

Valid aircraft addresses consist of a string of 6 digits and letters.
Aircraft are considered legitimate targets for lookup if:
- There is an aircraft tracking record with a status that is not "Locked"
- There is a valid callsign
- It has not already been successfully looked up
- It has not reached the limit of lookup attempts
If the aircraft isn't identified, the lookup is abandoned.
Calls to the aircraft APIs can be minimised by populating the local aircraft database.
The local database is preferentially used to identify/create the flight:

If the flight is identified locally, this completes the lookup as both the flight and airline can be identified/created from the mapping record.
If not, the API is used to try to identify the flight and gather its properties:

If the flight still isn't identifed, the lookup is abandoned.
Calls to the flight APIs can be minimised by populating the local flight/callsign mapping database. Note, also, that the SkyLink integration doesn't include the flight API and so relies entirely on the local flight number/callsign mapping tables for flight lookup.
Once the flight properties have been gathered from the API, the local database is preferentially used to identify/create the airline:

If the airline is identified locally, there is now sufficient information to save the flight, associating it with that airline.
If not, the API is used to try to identify the airline and gather its properties. If it's identified, the airline is saved to the database. If not, the lookup is abandoned.
- The integrations are configured via the following keys in the configuration files for the terminal application and lookup tool:
| Section | Sub-Section | Purpose |
|---|---|---|
| ApplicationSettings | FlightApi | Name of the service to use for flight lookup, a member of the ApiServiceType enumeration |
| ApplicationSettings | WeatherApi | Name of the service to use for METAR and TAF reports, a member of the ApiServiceType enumeration |
| ApplicationSettings | ApiEndpoints | A list of endpoint definitions, each containing the endpoint type, service and endpoint URL |
| ApplicationSettings | ApiServices | A list of API service definitions |
- An example service definition is shown below:
{
"Service": "AeroDataBox",
"RateLimit": 15,
"Key": "put-your-api-key-here",
"ApiEndpoints": [
{
"EndpointType": "Aircraft",
"Url": "https://aerodatabox.p.rapidapi.com/aircrafts"
},
{
"EndpointType": "Flights",
"Url": "https://aerodatabox.p.rapidapi.com/flights"
},
{
"EndpointType": "Schedules",
"Url": "https://aerodatabox.p.rapidapi.com/flights/airports/iata"
}
]
}- The rate limit is the maximum number of calls per minute
- Possible values for the endpoint type are:
| Type | Description |
|---|---|
| Aircraft | Endpoint used to retrieve aircraft details given a 24-bit ICAO address |
| Flights | Endpoint used to retrieve historical flight details given the aircrafts 24-bit ICAO address |
| Schedules | Endpoint used to retrieve schedule information for an airport and date range |
| METAR | Endpoint used to retrieve the current weather report for an airport |
| TAF | Endpoint used to retrieve the weather forecast for an airport |