Station/Coord API

Note: The url parameters shown in the METAR and TAF examples can also be placed in the request header instead.

Header/URL Parameters

format: json (default), xml, or yaml

options: info, translate, summary, speech (METAR only for now)

onfail: error (default) or cache. Cache will return potentially out-of-date info if AVWX's report sources are unavailable

METAR

METAR reports are surface observations for a particular airfield or other station location. There are two standard formats: International and North American. The parser works with both, but it is up to the developer to do the correct interpretation of the data. Use the 'Units' key for labling and conversions.

The METAR API can be called using the station's ICAO or coordinates (lat,lon), in which case the API will return the station nearest to those coordinates. Additionally, the call can include the desired format and will return JSON if none is given.

Returns a JSON, XML, or YAML document with the following keys: Station, Time, Flight-Rules, Wind-Direction, Wind-Speed, Wind-Gust, Wind-Variable-Dir, Visibility, Runway-Visibility, Altimeter, Temperature, Dewpoint, Cloud-List, Other-List, Remarks, Raw-Report, Units

Translations with the following keys: Wind, Visibility, Clouds, Temperature, Dewpoint, Altimeter, Other

Ficticious METAR XML with all fields present

Look-up by ICAO with JSON format: http://avwx.rest/api/metar/KJFK

Look-up by coordinates with info and speech options: http://avwx.rest/api/metar/51.47,-0.4?options=info,speech

TAF

TAF reports are atmospheric conditions for an area within five nautical miles of a particular airfield or other station location. Unlike METAR which only has two standard formats, TAF reports vary considderably more based on their geography. For example, Oceania TAF reports include two unique keys: Temp-List and Alt-List.

Like METAR, you can look-up TAF data by station ICAO or coordinates. Format option also exists.

Returns a JSON, XML, or YAML document with the following keys: Station, Time, Forecast, Remarks, Min-Temp, Max-Temp, Units [, Temp-List, Alt-List (Oceania only)]

Forecast is a list of forecasts in the TAF report with the following keys: Type , Start-Time, End-Time, Wind-Direction, Wind-Speed, Wind-Gust, Wind-Shear, Visibility, Altimeter, Cloud-List, Icing-List, Turb-List, Other-List, Probability, Raw-Line

Translations with the following keys: Forecast, Min-Temp, Max-Temp. Forecast keys: Flight-Rules, Wind, Visibility, Clouds, Altimeter, Wind-Shear, Turbulance, Icing, Other

Ficticious TAF XML with all fields present

Look-up by ICAO: http://avwx.rest/api/taf/KJFK?options=summary

Look-up by coordinates in XML format: http://avwx.rest/api/taf/51.47,-0.4?format=xml

Shared Options

info - Provides basic info for the requested station along with the report. Info is sourced and cross-referenced from several databases. Contains the following keys: ICAO, IATA, Country, State, City, Name, Elevation (meters), Latitude, Longitude, Priority (mapping zoom)

translate - Provides basic translations for most fields in the report. See below for the keys in each report.

summary - Includes a translation summary string for METAR and TAF forecasts.

speech - Adds a version of the summary string designed to be spoken by a voice assistant (currently available for METAR only).

Reports include a key for 'Units' which contains the units associated with each measurement. Contains the following keys: Wind-Speed, Visibility, Altitude, Temperature, Altimeter

Parsing API

Attempts to parse a given METAR or TAF report using the AVWX engine. A "report" parameter must be supplied in either the url (with spaces replaced with "%20") or in the header as is.

All response keys, shared options, and response formats for the station/coord API are supported.

Example with URL parameter: https://avwx.rest/api/parse/metar?report=KJFK%20012251Z%2004012KT%2010SM%20OVC011%2016/13%20A3014&options=info,translate