4 - Stats API
The Stats API provides network-wide statistics about the SafeSky ecosystem. Use it to monitor the overall health and activity of the SafeSky network, or to display live metrics in a dashboard.
Get Network Overview
Endpoint: GET /v1/stats/overview
Description:
Returns a snapshot of the current state of the SafeSky network, including the total number of active, inactive, and grounded beacons, broken down by transponder type and aircraft category.
Request Headers
| Header | Required | Description |
|---|---|---|
x-api-key |
Yes | Your SafeSky API key |
Example Request
curl 'https://public-api.safesky.app/v1/stats/overview' \
--header 'x-api-key: <your_api_key>'
Response
200 OK — Returns a Status object.
| Field | Type | Description |
|---|---|---|
timestamp |
long |
Unix timestamp (seconds since epoch, UTC) for this snapshot |
active |
long |
Total number of currently active beacons |
inactive |
long |
Total number of inactive beacons |
grounded |
long |
Total number of grounded beacons |
beacon_counts |
int |
Total number of beacons tracked |
outdated_beacon_counts |
int |
Total number of beacons with stale data |
transponder_types |
array |
Breakdown of beacon counts by transponder type (e.g., ADS-B, FLARM, OGN) |
beacon_types |
array |
Breakdown of beacon counts by aircraft category (e.g., JET, HELICOPTER, UAV) |
Example Response
{
"timestamp": 1733412793,
"active": 12540,
"inactive": 430,
"grounded": 87,
"beacon_counts": 13057,
"outdated_beacon_counts": 212,
"transponder_types": [
{ "ADS-B": 6200 },
{ "ADS-BI": 4100 },
{ "FLARM": 1800 },
{ "OGN": 740 },
{ "MODE-S": 217 }
],
"beacon_types": [
{ "JET": 3200 },
{ "MOTORPLANE": 2100 },
{ "HELICOPTER": 980 },
{ "GLIDER": 870 },
{ "UAV": 430 },
{ "PARA_GLIDER": 215 },
{ "BALLOON": 47 }
]
}
Use Cases
- Dashboard widgets: Display a live count of tracked aircraft on a network status page.
- Monitoring: Alert when the number of active beacons drops below a threshold.
- Analytics: Track network growth over time by periodically storing snapshots.