AviationWeather API

Free to Use
67 C
Measured Score 0 50 100 Speed 30/30 Consistency 13/20 Security 20/20 Browser access 0/15 Transparency 4/15 TESTED 2026-08-10

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.

JSON Response · Captured
[
  {
    "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.

Request
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.

HTTP 404 Requesting a path that does not exist application/json
{
  "status": "error",
  "error": "Not found"
}
HTTP 400 Sending an invalid value for "ids" application/json
{
  "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.

Empty response or no data array The station ID is incorrect or no recent METAR is available for that station.
Verify the 4-letter ICAO code for the airport and check that the station reports METARs (not all small airfields do).
400 Bad Request A required parameter like ids is missing or formatted incorrectly.
Always include the ids parameter with a valid ICAO station code; refer to the API documentation for required parameters per data type.
Outdated data returned METARs are issued hourly and the most recent report may be up to an hour old.
Check the observation_time field in the response and display it to users so they know the data recency.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 30/30
Consistency 13/20
Security 20/20
Browser access 0/15
Transparency 4/15
Endpoint Response Time 30ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Weather
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →