NAME
Tafmetar - Receive Taf/Metar from airports
DESCRIPTION
Fetch TAFs and/or METARs for airports around the world, based on ICAO ids. Forecasts are for 9 or 24 hour periods, in XML and text formats.
METARs are issued every 30 mins, TAF every 3 hours. Historical data for Norway are available since the late '90s.
- METAR
Acronym for Meteorological Aerodrome Report (current weather at an airport)
- TAF
Terminal Aerodrome Forecast
To interpret the data, you can find more information on VATSIM.
Expanded format
As of October 2021 the tafmetar api provides additional information about the TAF/METARs type ahead of the message when using the extended
parameter:
For TAF:
For METAR:
Also, each message is prefixed with either TAF or METAR for easier reading when both types are combined in the same output.
ICAO codes
To find the ICAO code for a specific airport, we suggest using one of the following resources:
- http://weather.rap.ucar.edu/surface/stations.txt
- http://openflights.org/html/apsearch
- https://openflights.org/data.html
USAGE
Actions
- /
-
Default action, can deliver all data (but not fully Swagger compliant)
- /info.txt
-
Get airport info (name, latlon etc)
- /taf.FORMAT
- /metar.FORMAT
- /tafmetar.FORMAT
-
Get TAF/METAR for airport at given date. FORMAT can be either
xml
ortxt
Parameters
- icao
-
required parameter, ICAO id, like ENGM. Multiple values can be separated by comma
- date
-
YYYY-MM-DD format as per ISO 8601.
Note that this is the 24 period from YYYY-MM-DDT00:00:00 to YYYY-MM-DDT23:59:59 UTC. To get the calendar date in localtime you must add the
offset
parameter to indicate timezone and daylight savings.If date is not set you will get data for the last 24 hours, which is most cases is what you really want...
- offset
-
The offset parameter is the difference from UTC, on the format "+HH:MM" or "-HH:MM" as defined in ISO 8601. This is used to calculate the period start as follows:
<date> + "T00:00:00" + <offset>
This is then converted to UTC to get the start of the 24-hour period.
If not given, the timezone defaults to +00:00, but you should not use this for locations outside the GMT timezone, since for e.g. Hawaii you would get TAF/METARs for the period 2018-05-10T14:00 to 2018-05-11T14:00 local time, instead of 2018-05-11T00:00 to 2018-05-12T00:00.
Presently timezones for the
offset
parameter range from -12:00 to +14:00, although this may change in the future. For GMT, only +00:00 is allowed. You can see a list of all current timezones on https://en.wikipedia.org/wiki/List_of_UTC_time_offsets. - content_type
-
text/xml or text/plain. Mandatory for /
- content
-
info, taf, metar or tafmetar. Mandatory for /
- expanded
-
This displays data in expanded format, see above
Example requests
https://api.met.no/weatherapi/tafmetar/1.0/?icao=ENGM&content_type=text/xml&date=2024-12-14&offset=+02:00&content=tafmetar
https://api.met.no/weatherapi/tafmetar/1.0/?icao=ENGM&content_type=text/plain&content=info
https://api.met.no/weatherapi/tafmetar/1.0/info.txt?icao=ENGM
https://api.met.no/weatherapi/tafmetar/1.0/tafmetar.xml?icao=ENGM
https://api.met.no/weatherapi/tafmetar/1.0/tafmetar.xml?icao=ENGM&date=2024-12-14
https://api.met.no/weatherapi/tafmetar/1.0/tafmetar.xml?icao=ENGM&date=2024-12-14&offset=+02:00
https://api.met.no/weatherapi/tafmetar/1.0/metar.txt?icao=ENGM
https://api.met.no/weatherapi/tafmetar/1.0/taf.xml?icao=ENGM&date=2000-01-01
Schema
The XML Schema is available from https://api.met.no/weatherapi/tafmetar/1.0/schema
FAQ
Q. Do you have TAF/METARs for all international airports, including historical data?
Unfortunately no – we are not responsible for storing those data. We collect all METAR/TAF that we can get from Avinor to provide them for our forecasters for operational aviation weather forecasting. That includes about 4000 airports around the world (out of approx 11000 airports registered at ICAO). METAR and TAF from outside Norway are discarded after 24 hours, since they do not have any more operational value for our forecasters. However, TAF/METAR for Norwegian airports are archived, and we have data since the late nineties.
In the near future (within 2025) there is a major change for presenting METAR in Europe through the SESAR project. By then, TAF and METAR will be given in IWXXM (not TAC) and will be provided by the data providers through SWIM nodes (apies). This means MET Norway will then only distribute TAF/METAR for airports in Norway.
Changelog
Extended format, 2021-11-04
The tafmetar API now provides additional information about the TAF/METARs type ahead of the message when using the extended
parameter:
For TAF: AMD or COR
For METAR: COR, SPECI or AUTO
Better date handling features: 2019-08-13
Since the previous version could only deliver data for UTC calender dates, we have added an offset
parameter to enable you to get data for midnight to midnight local time. E.g. date=2019-08-13&offset=+02:00
will new get you data from 2019-08-12T22:00:00 to 2019-08-13T22:00:00 UTC.
Also, you can now drop the date
parameter completely, in which case you will get data for the last 24 hours (which is usually exactly what you want).
New version 1.1: 2013-02-16
New product available, delivering Taf and metar