# METAR / TAF Aviation Weather API
> Live aviation weather for any airport as an API, relayed from NOAA's Aviation Weather Center. Get the current METAR observation for an ICAO station (e.g. KJFK → New York JFK: temperature, dewpoint, wind, visibility, altimeter, cloud layers, flight category VFR/MVFR/IFR/LIFR and the raw report) or the TAF terminal aerodrome forecast. Query one station or up to 10 at once (KJFK,EGLL,EDDF). Both decoded fields and the raw text are returned. Ideal for flight-planning tools, aviation dashboards, drone/UAV operations and weather apps.

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

## Pricing
- **Free** (Free) — 2,500 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 45,000 calls/Mo, 8 req/s
- **Pro** ($20/Mo) — 220,000 calls/Mo, 20 req/s
- **Mega** ($55/Mo) — 1,100,000 calls/Mo, 50 req/s

## Endpoints

### Aviation Weather

#### `GET /v1/metar` — Current METAR observation(s) for ICAO station(s)

**Parameters:**
- `icao` (query, required, string) — ICAO station id, e.g. KJFK (up to 10 comma-separated) Example: `KJFK`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metar-api/v1/metar?icao=KJFK"
```

**Response:**
```json
{
    "data": {
        "raw": "METAR KJFK 310451Z 03004KT 10SM CLR 09/06 A3010 RMK AO2 SLP192 T00890056 401940083 $",
        "name": "New York/JF Kennedy Intl, NY, US",
        "wind": {
            "gust_kt": null,
            "speed_kt": 4,
            "direction_deg": 30
        },
        "cover": "CLR",
        "clouds": [],
        "station": "KJFK",
        "weather": null,
        "latitude": 40.6392,
        "longitude": -73.7639,
        "dewpoint_c": 5.6,
        "visibility": "10+",
        "elevation_m": 3,
        "observed_at": "2026-05-31T05:00:00.000Z",
        "altimeter_hpa": 1019.4,
        "temperature_c": 8.9,
        "flight_category": "VFR",
        "sea_level_pressure_hpa": 1019.2
    },
    "meta": {
        "timestamp": "2026-05-31T05:48:01.446Z",
        "request_id": "525a8d2d-f740-4b58-8e93-b2b9f4694c4d"
    },
    "status": "ok",
    "message": "METAR retrieved",
    "success": true
}
```

#### `GET /v1/taf` — Terminal aerodrome forecast (TAF)

**Parameters:**
- `icao` (query, required, string) — ICAO station id, e.g. KJFK (up to 5 comma-separated) Example: `KJFK`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metar-api/v1/taf?icao=KJFK"
```

**Response:**
```json
{
    "data": {
        "raw": "TAF KJFK 310536Z 3106/0112 36005KT P6SM SKC FM311200 29010KT P6SM FEW080 FM311600 24014KT P6SM SCT080 FM311900 20016KT P6SM BKN080 FM010300 27008KT P6SM BKN100 FM010600 33007KT P6SM BKN080",
        "name": "New York/JF Kennedy Intl",
        "station": "KJFK",
        "valid_to": "2026-06-01T12:00:00.000Z",
        "issued_at": "2026-05-31T05:36:00.000Z",
        "valid_from": "2026-05-31T06:00:00.000Z"
    },
    "meta": {
        "timestamp": "2026-05-31T05:48:01.758Z",
        "request_id": "cfc2a6b2-0688-4834-a784-b4c45fd288d8"
    },
    "status": "ok",
    "message": "TAF retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Source & field reference

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

**Response:**
```json
{
    "data": {
        "note": "Live observations relayed from NOAA; not cached. METAR = current report, TAF = forecast.",
        "fields": [
            "station",
            "name",
            "observed_at",
            "temperature_c",
            "dewpoint_c",
            "wind",
            "visibility",
            "altimeter_hpa",
            "weather",
            "clouds",
            "flight_category",
            "raw"
        ],
        "source": "NOAA Aviation Weather Center (aviationweather.gov)",
        "endpoints": [
            "/v1/metar",
            "/v1/taf",
            "/v1/meta"
        ],
        "station_format": "4-letter ICAO, e.g. KJFK (New York JFK), EGLL (London Heathrow), EDDF (Frankfurt)",
        "flight_categories": {
            "IFR": "Instrument",
            "VFR": "Visual",
            "LIFR": "Low IFR",
            "MVFR": "Marginal VFR"
        }
    },
    "meta": {
        "timestamp": "2026-05-31T05:48:01.831Z",
        "request_id": "5ed67de2-b890-4351-afb9-24855631da7b"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


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