# OpenSky API
> Live air traffic as an API, powered by the OpenSky Network — a community network of thousands of volunteer ADS-B/Mode-S receivers tracking aircraft worldwide in real time. This is live flight tracking, the FlightRadar-style picture of what is in the sky right now, distinct from static aircraft registries, airline directories, airport metadata and scheduled-flight status. /v1/flights returns every aircraft currently airborne inside a geographic bounding box (give the box as lamin/lomin/lamax/lomax in degrees, kept under roughly 20° latitude by 30° longitude), each with its ICAO 24-bit address, callsign, origin country, live longitude and latitude, barometric and geometric altitude, ground speed, true heading, vertical rate and transponder squawk — a real-time radar snapshot with the network timestamp. /v1/aircraft looks up a single aircraft by its 6-hex ICAO 24-bit address and returns its current live state (or airborne:false when it is grounded or out of receiver range). /v1/arrivals and /v1/departures list the flights that arrived at or departed from an airport (4-letter ICAO code such as EDDF Frankfurt or EGLL Heathrow) over the last N hours (1-48), each with callsign, the estimated airport at the other end and the first/last-seen timestamps. Ideal for live flight-tracking maps, aviation dashboards, geofencing and proximity alerts, spotting tools, and research into air-traffic patterns. Positions are in degrees, altitudes in metres and speeds in metres per second. Data from the OpenSky Network, free for non-commercial use — please credit OpenSky. Coverage depends on volunteer receiver density.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/opensky-api/..."
```

## Pricing
- **Free** (Free) — 1,200 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 35,000 calls/Mo, 5 req/s
- **Pro** ($35/Mo) — 150,000 calls/Mo, 12 req/s
- **Mega** ($85/Mo) — 600,000 calls/Mo, 35 req/s

## Endpoints

### Live

#### `GET /v1/aircraft` — One aircraft current state

**Parameters:**
- `icao24` (query, required, string) — ICAO 24-bit address (6 hex), e.g. 4b1815 Example: `4b1815`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/opensky-api/v1/aircraft?icao24=4b1815"
```

**Response:**
```json
{
    "data": {
        "airborne": true,
        "aircraft": {
            "icao24": "4b1815",
            "squawk": "1000",
            "callsign": "SWR262C",
            "latitude": 43.8832,
            "longitude": 2.0297,
            "on_ground": false,
            "heading_deg": 55.33,
            "velocity_ms": 241.45,
            "last_contact": "2026-06-01T16:23:43.000Z",
            "geo_altitude_m": 12077.7,
            "origin_country": "Switzerland",
            "baro_altitude_m": 11582.4,
            "vertical_rate_ms": 0
        },
        "snapshot_time": "2026-06-01T16:23:43.000Z"
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:50.636Z",
        "request_id": "b4369675-3b3e-4d18-ac9a-635a633bf486"
    },
    "status": "ok",
    "message": "Aircraft state retrieved",
    "success": true
}
```

#### `GET /v1/flights` — Live aircraft in a bounding box

**Parameters:**
- `lamin` (query, required, string) — Min latitude Example: `45.8`
- `lomin` (query, required, string) — Min longitude Example: `5.9`
- `lamax` (query, required, string) — Max latitude Example: `47.8`
- `lomax` (query, required, string) — Max longitude Example: `10.5`
- `limit` (query, optional, string) — Max results (1-500)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/opensky-api/v1/flights?lamin=45.8&lomin=5.9&lamax=47.8&lomax=10.5"
```

**Response:**
```json
{
    "data": {
        "bbox": {
            "lamax": 47.8,
            "lamin": 45.8,
            "lomax": 10.5,
            "lomin": 5.9
        },
        "count": 100,
        "flights": [
            {
                "icao24": "39de58",
                "squawk": "5734",
                "callsign": "TVF34TB",
                "latitude": 46.1051,
                "longitude": 7.9468,
                "on_ground": false,
                "heading_deg": 295.99,
                "velocity_ms": 205.46,
                "last_contact": "2026-06-01T16:23:44.000Z",
                "geo_altitude_m": 11986.26,
                "origin_country": "France",
                "baro_altitude_m": 11574.78,
                "vertical_rate_ms": 0
            },
            {
                "icao24": "39de50",
                "squawk": "1000",
                "callsign": "TVF43LZ",
                "latitude": 47.6959,
                "longitude": 7.3242,
                "on_ground": false,
                "heading_deg": 149.65,
                "velocity_ms": 254.55,
                "last_contact": "2026-06-01T16:23:44.000Z",
                "geo_altitude_m": 11689.08,
                "origin_country": "France",
                "baro_altitude_m": 11285.22,
                "vertical_rate_ms": 0
            },
            {
                "icao24": "47b217",
                "squawk": "2774",
                "callsign": "IGO56K",
                "latitude": 46.5719,
                "longitude": 9.86
…(truncated, see openapi.json for full schema)
```

### Airport

#### `GET /v1/arrivals` — Recent arrivals at an airport

**Parameters:**
- `airport` (query, required, string) — ICAO code, e.g. EDDF Example: `EDDF`
- `hours` (query, optional, string) — Window in hours (1-48)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/opensky-api/v1/arrivals?airport=EDDF"
```

**Response:**
```json
{
    "data": {
        "kind": "arrival",
        "count": 0,
        "total": 0,
        "airport": "EDDF",
        "flights": [],
        "window_hours": 2
    },
    "meta": {
        "timestamp": "2026-06-01T16:23:50.928Z",
        "request_id": "7625dde4-47f3-4055-b643-710d2fc65443"
    },
    "status": "ok",
    "message": "Arrivals retrieved",
    "success": true
}
```

#### `GET /v1/departures` — Recent departures from an airport

**Parameters:**
- `airport` (query, required, string) — ICAO code, e.g. EGLL Example: `EGLL`
- `hours` (query, optional, string) — Window in hours (1-48)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/opensky-api/v1/departures?airport=EGLL"
```

**Response:**
```json
{
    "data": {
        "kind": "departure",
        "count": 63,
        "total": 63,
        "airport": "EGLL",
        "flights": [
            {
                "icao24": "406a3e",
                "callsign": "BAW506",
                "last_seen": "2026-06-01T16:23:35.000Z",
                "first_seen": "2026-06-01T14:26:10.000Z",
                "arrival_airport": null,
                "departure_airport": "EGLL"
            },
            {
                "icao24": "3475d9",
                "callsign": "VLG6023",
                "last_seen": "2026-06-01T16:23:35.000Z",
                "first_seen": "2026-06-01T14:28:54.000Z",
                "arrival_airport": null,
                "departure_airport": "EGLL"
            },
            {
                "icao24": "407d74",
                "callsign": "BAW84V",
                "last_seen": "2026-06-01T16:23:35.000Z",
                "first_seen": "2026-06-01T14:36:00.000Z",
                "arrival_airport": null,
                "departure_airport": "EGLL"
            },
            {
                "icao24": "0101df",
                "callsign": "MSR778",
                "last_seen": "2026-06-01T16:23:35.000Z",
                "first_seen": "2026-06-01T14:45:47.000Z",
                "arrival_airport": null,
                "departure_airport": "EGLL"
            },
            {
                "icao24": "4cafcd",
                "callsign": "SAS806",
                "last_seen": "2026-06-01T16:23:35.000Z",
       
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/opensky-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Live air traffic from the OpenSky Network, a community network of ADS-B/Mode-S receivers. /v1/flights?lamin=45.8&lomin=5.9&lamax=47.8&lomax=10.5 = every aircraft currently airborne in a geographic bounding box (keep it under ~20°×30°), each with its ICAO 24-bit address, callsign, origin country, live longitude/latitude, barometric and geometric altitude, ground speed, heading, vertical rate and squawk — a real-time radar snapshot; /v1/aircraft?icao24=4b1815 = a single aircraft's current state by its 6-hex ICAO address; /v1/arrivals?airport=EDDF&hours=2 and /v1/departures?airport=EGLL&hours=2 = the flights that arrived at / departed from an airport (4-letter ICAO code) over the last N hours (1-48), with callsign, the estimated other-end airport and the first/last-seen timestamps. Positions are in degrees, altitudes & speeds in metres / metres-per-second. This is live flight tracking — distinct from aircraft registries, airline directories, airport metadata and scheduled-flight status. Data from the OpenSky Network (free for non-commercial use; please credit OpenSky). Coverage depends on volunteer receiver density.",
        "source": "OpenSky Network — crowd-sourced ADS-B/Mode-S air traffic (opensky-network.org)",
        "endpoints": [
            "/v1/flights",
            "/v1/aircraft",
            "/v1/arrivals",
            "/v1/departures",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T16
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/opensky-api
OpenAPI spec: https://www.oanor.com/api/opensky-api/openapi.json
