Data API
This service facilitates machine-to-machine access to aviation weather information. The interface below can be used to learn more about available data, configure specific queries, and try them out. The weather database currently allows access to the previous 15 days of data.
Please keep requests limited in scope and frequency. Maximum results per query apply as well as rate limiting against frequent requests. For larger queries, consider using the cache files.
Products
Product | Description | Coverage | Formats |
---|---|---|---|
METAR | Terminal observations | Worldwide | Raw METAR, JSON, GeoJSON, CSV, XML |
TAF | Terminal forecasts | Worldwide | Raw METAR, JSON, GeoJSON, XML |
PIREPs | Pilot and aircraft reports | Primarily US and North Atlantic | Raw text, JSON, GeoJSON, XML |
SIGMETs | Aviation warnings | Worldwide | Raw text, JSON, GeoJSON, XML |
G-AIRMETs | Aviation advisories | Contiguous 48 United States | Raw text, JSON, GeoJSON, XML |
CONUS text AIRMETs were discontinued in January 2025. G-AIRMETs replace AIRMETs, increasing forecast precision in both time and space. | |||
Center Weather Advisories | Regional aviation advisories | United States | Raw text, JSON, GeoJSON |
Area Forecast | Aviation forecasts | Alaska | Text |
Area Forecast Discussions | Aviation discussions | United States | Text |
Meteorological Impact Statements | Aviation statements | United States | Text |
Legacy wind/temp tables | Wind and temperature forecasts | United States | Text |
Station info | Weather observation station information | Worldwide | JSON, GeoJSON, XML |
Airport info | Airport information | Worldwide | JSON, GeoJSON, XML |
NAVAID, fix, feature, obstacle | Aviation navigation features | Worldwide | JSON, GeoJSON, XML |
OpenAPI
Full API specification documentation is provided in OpenAPI YAML and the following interactive interface.
Cache
Access to current observations and forecasts in one file. Use of these files is recommended instead of making excessively large or frequent custom queries. METARs, AIRMETs/SIGMETs, and PIREPS update once a minute, TAFs update every ten minutes, and stations update once per day.
/data/cache/metars.cache.xml.gz | All current METARs (XML) - gzip'd |
/data/cache/metars.cache.csv.gz | All current METARs (CSV) - gzip'd |
/data/cache/tafs.cache.xml.gz | All current TAFs (XML) - gzip'd |
/data/cache/tafs.cache.csv.gz | All current TAFs (CSV) - gzip'd |
/data/cache/airsigmets.cache.xml.gz | All current CONUS SIGMETs (XML) - gzip'd |
/data/cache/airsigmets.cache.csv.gz | All current CONUS SIGMETs (CSV) - gzip'd |
/data/cache/gairmets.cache.xml.gz | All current CONUS G-AIRMETs (XML) - gzip'd |
/data/cache/aircraftreports.cache.xml.gz | All current AIREPs/PIREPs (XML) - gzip'd |
/data/cache/aircraftreports.cache.csv.gz | All current AIREPs/PIREPs (CSV) - gzip'd |
/data/cache/stations.cache.xml.gz | Stations listing (XML) - gzip'd |
/data/cache/stations.cache.json.gz | Stations listing (JSON) - gzip'd |
Using the API
REST API endpoint are accessable at /api/data
as outlined in the schema information. For example METARs are found at https://aviationweather.gov/api/data
. Most requests require query parameters in order to specify constaints of the data being requested. For example the latest METAR from Kansas City International in JSON format can be requested by specifying the four letter ICAO identifer with https://aviationweather.gov/api/data/metar?ids=KMCI&format=json
.
Requests may be made using more web browsers, command line utilities, and programming language libraries using modern HTTPS connections.
Guidelines
- Please carefully consider requests to limit load on the system.
- Set a custom user agent to prevent automated filtering inadvertantly blocking valid traffic.
- Wait between consecutive requests — maximum 100 requests per minute.
- Exceeding request limits will result in access being temporarily blockeds.
Restrictions
- All requests are rate limited to 100 requests per minute and all API endpoints should not be consumed more frequently than 1 request/min per thread.
- Most endpoints return a maximum of 1,000 entries.
- Cross-origin resource sharing is not permitted at this time.
Troubleshooting
- Ensure your network connection is stable.
- Verify that firewalls or proxies are not blocking your requests.
- Ensure you are connecting via HTTPS.
HTTP Error Code | Description |
---|---|
400 Invalid Request | The request is invalid in some way. This could include: Invalid parameters like format or date Missing parameters required to complete a request The URL is incorrect in some way. |
404 Not Found | Endpoint or item is not valid. |
429 Too Many Requests | Too many requests have been sent. You might see this error code when rate limits are applied. See Restrictions above. |
500 Internal Server | A valid or invalid request was made but the system was unable to serve the request due to an error. |
502 Bad Gateway 504 Gateway Timeout | Temporarily service disruption. |