Overview
AviationWeather.gov is a free NOAA service that provides official aviation weather data including METARs, TAFs, PIREPs, and SIGMETs used by pilots and flight planners. No API key or registration is required; you simply pass station codes or geographic parameters to retrieve real weather reports. It is a great starting point for aviation apps, flight simulators, or anyone learning about weather data formats.
Beginner Tip
METARs and TAFs use standard aviation codes that look cryptic at first; use the format=json parameter to get parsed output instead of raw text. Station IDs follow ICAO 4-letter codes like KJFK for JFK Airport or EGLL for London Heathrow.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://aviationweather.gov/api/data/metar?ids=KJFK&format=json
- Result
- HTTP 200 · application/json · 507 bytes
- Response time
- 30 ms (median of 3) · fastest 24 ms
- Transport
- TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by DigiCert Inc
- Browser CORS
- No Access-Control-Allow-Origin header — call it from a server, not the browser
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| icaoId | string | KJFK |
| receiptTime | string (date) | 2026-08-10T19:55:06.004Z |
| obsTime | integer | 1786391460 |
| reportTime | string (date) | 2026-08-10T20:00:00.000Z |
| temp | number | 29.4 |
| dewp | number | 21.7 |
| wdir | integer | 180 |
| wspd | integer | 8 |
| visib | string | 10+ |
| altim | number | 1013.6 |
| slp | number | 1013.5 |
| qcField | integer | 8 |
| metarType | string | METAR |
| rawOb | string | METAR KJFK 101951Z 18008KT 10SM FEW050 BKN250… |
Captured Response
Captured from a real request to https://aviationweather.gov/api/data/metar?ids=KJFK&format=json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
[
{
"icaoId": "KJFK",
"receiptTime": "2026-08-10T19:55:06.004Z",
"obsTime": 1786391460,
"reportTime": "2026-08-10T20:00:00.000Z",
"temp": 29.4,
"dewp": 21.7,
"wdir": 180,
"wspd": 8,
"visib": "10+",
"altim": 1013.6,
"slp": 1013.5,
"qcField": 8,
"metarType": "METAR",
"rawOb": "METAR KJFK 101951Z 18008KT 10SM FEW050 BKN250 29/22 A2993 RMK SLP135 T02940217 $",
"…": "(7 more fields)"
}
] Field Reference
icaoId The 4-letter ICAO identifier for the airport or weather station. rawOb The raw METAR observation string as issued by the station. temp Temperature in degrees Celsius at the observation time. wspd Wind speed in knots at the reporting station. visib Visibility in statute miles at the station, may include + for greater than values. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://www.aviationweather.gov/dataserver";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{
"status": "error",
"error": "Not found"
} {
"status": "error",
"error": "Must specify station IDs or bounding box, zoom, and density"
} Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →7Timer!
⭐ Beginner's Pick7Timer!
Hong Kong Obervatory
⭐ Beginner's PickThe Hong Kong Observatory Open Data API provides free access to weather observations, forecasts, earthquake reports, and climate data for Hong Kong and the surrounding region.
ODWeather
⭐ Beginner's PickODWeather is a free weather and webcam API from OceanDrivers that provides real-time marine and coastal weather data including wind, waves, and temperature.
Open-Meteo
⭐ Beginner's PickOpen-Meteo is a completely free and open-source weather API for non-commercial use that provides hourly and daily forecasts, historical data, and climate projections for any location worldwide without requiring an API key.
QWeather
QWeather delivers accurate location-based weather data including real-time conditions, hourly and daily forecasts, air quality index, and severe weather warnings across global locations.