# Airports API
> A worldwide airport database in one fast API: roughly 7,700 airports with IATA and ICAO codes, name, city, country, latitude and longitude, altitude and time zone. Look up any airport by its IATA (3-letter) or ICAO (4-letter) code, search by name, city or country, find the airports nearest to any coordinate within a radius (with great-circle distances, optionally only those with IATA codes), or list every airport in a country. Built on the open OpenFlights/OurAirports dataset and served entirely in-memory, so responses are instant and the service is always available. Ideal for travel and booking apps, flight trackers, logistics and routing, maps and location features.

## 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/airports-api/..."
```

## Pricing
- **Free** (Free) — 750 calls/Mo, 2 req/s
- **Basic** ($4/Mo) — 20,000 calls/Mo, 5 req/s
- **Pro** ($13/Mo) — 120,000 calls/Mo, 15 req/s
- **Mega** ($36/Mo) — 600,000 calls/Mo, 40 req/s

## Endpoints

### Airports

#### `GET /v1/airport` — Airport by IATA / ICAO code

**Parameters:**
- `code` (query, required, string) — 3-letter IATA or 4-letter ICAO Example: `LAX`

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

**Response:**
```json
{
    "data": {
        "city": "Los Angeles",
        "iata": "LAX",
        "icao": "KLAX",
        "name": "Los Angeles International Airport",
        "type": "airport",
        "country": "United States",
        "latitude": 33.9425,
        "timezone": "America/Los_Angeles",
        "longitude": -118.408,
        "utc_offset": -8,
        "altitude_ft": 125
    },
    "meta": {
        "timestamp": "2026-05-30T18:16:51.521Z",
        "request_id": "3927c8da-1449-4fe5-9ffc-a9044c6578e8"
    },
    "status": "ok",
    "message": "Airport retrieved",
    "success": true
}
```

#### `GET /v1/country` — Airports in a country

**Parameters:**
- `country` (query, required, string) — Country name Example: `Germany`
- `limit` (query, optional, string) — 1-500 (default 50) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/airports-api/v1/country?country=Germany&limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "country": "Germany",
        "airports": [
            {
                "city": "Bautzen",
                "iata": null,
                "icao": "EDAB",
                "name": "Flugplatz Bautzen",
                "type": "airport",
                "country": "Germany",
                "latitude": 51.19361,
                "timezone": "Europe/Berlin",
                "longitude": 14.51972,
                "utc_offset": 1,
                "altitude_ft": 568
            },
            {
                "city": "Altenburg",
                "iata": "AOC",
                "icao": "EDAC",
                "name": "Altenburg-Nobitz Airport",
                "type": "airport",
                "country": "Germany",
                "latitude": 50.98195,
                "timezone": "Europe/Berlin",
                "longitude": 12.50639,
                "utc_offset": 1,
                "altitude_ft": 640
            },
            {
                "city": "Dessau",
                "iata": null,
                "icao": "EDAD",
                "name": "Dessau Airfield",
                "type": "airport",
                "country": "Germany",
                "latitude": 51.83169,
                "timezone": "Europe/Berlin",
                "longitude": 12.19096,
                "utc_offset": 1,
                "altitude_ft": 187
            },
            {
                "city": "Eisenhuettenstadt",
                "iata": null,
             
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/nearby` — Airports near a coordinate

**Parameters:**
- `lat` (query, required, string) — Latitude Example: `51.5`
- `lon` (query, required, string) — Longitude Example: `-0.13`
- `radius_km` (query, optional, string) — Radius in km (default 100) Example: `100`
- `limit` (query, optional, string) — 1-50 (default 10) Example: `10`
- `iata_only` (query, optional, string) — Only airports with an IATA code Example: `false`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/airports-api/v1/nearby?lat=51.5&lon=-0.13&radius_km=100&limit=10&iata_only=false"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "airports": [
            {
                "city": "London",
                "iata": null,
                "icao": "EGLW",
                "name": "London Heliport",
                "type": "airport",
                "country": "United Kingdom",
                "latitude": 51.46972,
                "timezone": "Europe/London",
                "longitude": -0.17944,
                "utc_offset": 0,
                "altitude_ft": 18,
                "distance_km": 4.8
            },
            {
                "city": "London",
                "iata": "LCY",
                "icao": "EGLC",
                "name": "London City Airport",
                "type": "airport",
                "country": "United Kingdom",
                "latitude": 51.5053,
                "timezone": "Europe/London",
                "longitude": 0.05528,
                "utc_offset": 0,
                "altitude_ft": 19,
                "distance_km": 12.8
            },
            {
                "city": "Northolt",
                "iata": "NHT",
                "icao": "EGWU",
                "name": "RAF Northolt",
                "type": "airport",
                "country": "United Kingdom",
                "latitude": 51.553,
                "timezone": "Europe/London",
                "longitude": -0.41817,
                "utc_offset": 0,
                "altitude_ft": 124,
                "distance_km": 20.8
            },
            {
    
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search by name, city or country

**Parameters:**
- `q` (query, required, string) — Search term Example: `London`
- `limit` (query, optional, string) — 1-100 (default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/airports-api/v1/search?q=London&limit=20"
```

**Response:**
```json
{
    "data": {
        "count": 13,
        "query": "london",
        "airports": [
            {
                "city": "London",
                "iata": "YXU",
                "icao": "CYXU",
                "name": "London Airport",
                "type": "airport",
                "country": "Canada",
                "latitude": 43.0356,
                "timezone": "America/Toronto",
                "longitude": -81.1539,
                "utc_offset": -5,
                "altitude_ft": 912
            },
            {
                "city": "Londonderry",
                "iata": "LDY",
                "icao": "EGAE",
                "name": "City of Derry Airport",
                "type": "airport",
                "country": "United Kingdom",
                "latitude": 55.0428,
                "timezone": "Europe/London",
                "longitude": -7.16111,
                "utc_offset": 0,
                "altitude_ft": 22
            },
            {
                "city": "London",
                "iata": "LTN",
                "icao": "EGGW",
                "name": "London Luton Airport",
                "type": "airport",
                "country": "United Kingdom",
                "latitude": 51.8747,
                "timezone": "Europe/London",
                "longitude": -0.36833,
                "utc_offset": 0,
                "altitude_ft": 526
            },
            {
                "city": "Biggin Hill",
                "iata": "BQH",
       
…(truncated, see openapi.json for full schema)
```


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