Metar & Taf

Developers

TAF

Use this API to get the latest TAF of an airport.

Usage

https://api.metar-taf.com/taf
?api_key=YOUR_API_KEY
&v=2.3
&locale=it-IT
&id=LEMD

Try it

Get credits to see live data

Parameters

Provide these parameters when you make the call to the TAF endpoint:

Name Type Description Example

api_key

string

Your API key. Refer to the getting started section for how to obtain one.

id

(optional)

string

ICAO code of the airport to query. Note that either an airport ID or latitude/longitude is mandatory. If you specify a latitude and longitude, this parameter will be ignored.

EHTX

locale

string

Airports, cities and other string data is available in multiple languages. For example, LEMD is "Madrid–Barajas Airport" in English, but "Luchthaven Madrid-Barajas" in Dutch. With the locale parameter you can request in which language you want to have the result. Note that this setting has no effect on the notations or units. Available locales are:

en-US English
nl-NL Nederlands
es-ES Español
de-DE Deutsch
fr-FR Français
it-IT Italiano
pt-PT Português
pl-PL Polski
zh-CN 中文
it-IT

station_id

(optional)

string

ICAO code of the weather station. If not specified, we'll get the weather from the nearest airport with METAR. If you specify a latitude and longitude, this parameter will be ignored.

EHKD

test

int

Format the response with every variable on a new line. This makes is easier to see all date while you are building your application.

0 Default
1 Test mode
1

v

string

API version: provide the current version, which is 2.3. This way we can ensure backwards compatibility. Variables may be removed or renamed in the future.

2.3

Examples

  • Get the area forecast of Texel International Airport (EHTX): https://api.metar-taf.com/taf
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=it-IT
    &id=EHTX

    Try it

    Get credits to see live data

  • Get area forecast of Texel International Airport (EHTX), use the weather information of Vlieland Heliport (EHVL) instead of EHKD: https://api.metar-taf.com/taf
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=it-IT
    &id=EHTX
    &station_id=EHVL

    Try it

    Get credits to see live data

Response

A JSON object with the requested information is returned. The result is grouped in a couple of sections:

taf Last TAF data, raw and decoded
airport Information about the airport, including timezone and latitude/longitude
station Airport information of the weather station (if different from airport)
stations List of alternatives for this weather station: nearby airports with METAR and/or TAF

TAF

Name Type Description Example

endtime

int

End time of this TAF. Timestamp with seconds since Unix epoch.

1711667134

hours

Hour[]

Contains forecasted information per each hour of it's validity. See Hour for more information.

observed

int

Issue time of this TAF. Timestamp with seconds since Unix epoch.

1711644934

raw

string

Raw TAF data, not decoded

TAF EHKD 241328Z 2414/2502 05006KT CAVOK
BECMG 2418/2421 4000 BR
PROB30 2421/2502 1500

starttime

int

Starting time of this TAF. Timestamp with seconds since Unix epoch.

1711645534

station_id

string

ICAO code of the reporting weather station.

LEMD

Hour

Name Type Description Example

ceiling

int

Ceiling: the lowest cloud layer that is broken, overcast or when there is a vertical visibility reported.

Unit:   feet

3000

ceiling_becmg

(optional)

int

If the TAF has a BECMG-trend, the new ceiling is noted in this variable.

Unit:   feet

5000

ceiling_tempo

(optional)

int

Temporary ceiling, if the TAF has a TEMPO-trend.

Unit:   feet

2000

code

string

Lowest flight rules category of current weather, becoming or temporary weather for this hour. Possible values are:

VFR visibility ≥ 8 km, ceiling ≥ 3000 ft
MVFR visibility 5-8 km, ceiling ≥ 1000-3000 ft
IFR visibility 1½-5 km, ceiling ≥ 500-1000 ft
LIFR visibility < 1½ km, ceiling < 500 ft
UNKN Dati incompleti o scaduti
VFR

code_color

string(7)

Color to use for a graphical presentation of the flight rules category. 6 character hexadecimal preded by a hash sign.

#28a745

is_day

boolean

Indicates whether it was day or night at the obervation time of the METAR at the airport you requested.

false true

prob

(optional)

int

Chance that a BECMG or TEMPO trend applicable to this hour will take place. Chance is a percentage. Can be either null, 30 or 40. Events with a probability smaller than 30% are not included as trend. If no probability given (null), the chance is presumed greater than 40%.

40

start

int

Timestamp that marks the start of the hour. Seconds since Unix epoch.

1711652134

sunrise

(optional)

int

Timestamp of sunrise at the requested airport on the day of the METAR observation. UTC time in seconds since Unix epoch. Only set if the sunrise is in this hour.

Unit:   seconds

1644821896

sunset

(optional)

int

Timestamp of sunset at the requested airport on the day of the METAR observation. UTC time in seconds since Unix epoch. Only available if the sun sets in this hour.

Unit:   seconds

1644857513

tmax

(optional)

int

Maximum temperature. Only set if the maximum temperature for the day is reached in this hour.

Unit:   degrees Celsius

32

tmin

(optional)

int

Minimum temperature. Only set if the minimum temperature for the day is reached in this hour.

Unit:   degrees Celsius

3

visibility

int

Visibility.

Unit:   meters

10000 3500

visibility_becmg

(optional)

int

If the TAF has a BECMG-trend, the new visibility is noted in this variable.

Unit:   meters

10000 3500

visibility_sign

string(1)

If the visibility is the distance reported in visibility or may be less or more. For example: visibility 10000 and visibility_sign P means: 10 kilometers or more.

P Plus (More than)
M Minus (Less than)
M P null

visibility_sign_tempo

(optional)

string(1)

Temporary visibility sign, if the TAF has a TEMPO-trend.

P Plus (More than)
M Minus (Less than)
M P null

visibility_sign_tempo

(optional)

string(1)

If the TAF has a BECMG-trend, the visibility sign is noted in this variable.

P Plus (More than)
M Minus (Less than)
M P null

visibility_tempo

(optional)

int

Temporary visibility, if the TAF has a TEMPO-trend.

Unit:   meters

10000 3500

wind_dir

int

Wind direction, magnetic heading from 0 to 360. -1 if the wind is variable. An empty value means it is not provided. 90 means the wind is from direction east. If there is a temporary wind direction this value will be shown. Otherwise a becoming direction will be assumed realized. If no tempo or becoming wind direction, the current wind direction is used.

Unit:   degrees

270 -1

wind_gust

int

Wind gust speed. Should only be reported if it's 10 knots more than the average wind speed.

Unit:   knots

22

wind_gust_becmg

(optional)

int

If the TAF has a BECMG-trend, the new wind speed is noted in this variable.

Unit:   knots

22

wind_gust_tempo

(optional)

int

Temporary wind gust speed, if the TAF has a TEMPO-trend.

Unit:   knots

22

wind_speed

int

Average wind speed

Unit:   knots

12 0

wind_speed_becmg

(optional)

int

Average wind speed

Unit:   knots

12 0

wind_speed_tempo

(optional)

int

Average wind speed

Unit:   knots

12 0

Airport

Contains information about the requested airport

Name Type Description Example

admin1

string

Name of the primary administrative division. A primary administrative division is a state in the United States, a region in Spain, province in The Netherlands, etc. If available, the name is translated according to the locale.

Florida

admin2

(optional)

string

Name of the secondary administrative division, if available. A secondary administrative division is a county in the United States, a province in Spain, municipality in The Netherlands, etc. If available, the name is translated according to the locale.

Orange county

city_name

string

Name of the nearest city. If there is a town nearby with the same name as the airport, this will be used. Otherwise we take the nearest town with a population of more than 20.000. If available, the name is translated according to the locale.

Barajas de Madrid

country_id

string(2)

ISO 3166-1 country code.

See also:   https://en.wikipedia.org/wiki/..

ES NL

country_name

string

Name of the country. If available, the name is translated according to the locale.

Spagna

elevation

int

Airport elevation above mean sea level.

Unit:   feet

1998

fir

(optional)

string(4)

Flight Information Region. Useful for getting regional NOTAMs. For most airports in larger countries, there is no value for the FIR.

EHAA

iata

(optional)

string(3)

3-digit IATA code of this airport, if available

MAD LAX

id

string

ICAO code of this airport. May also be a combination of country code and a number

LEMD EHTX ES-0071

lat

float

Latitude of the airport. Decimal from -90 (south) to 90 (north).

Unit:   degrees

40.49528

lng

float

Longitude of the airport. Decimal from -180 (west) to 180 (east).

Unit:   degrees

-3.56009

metar

boolean

Whether the airport has published a METAR recently.

true

name

string

Official airport name

Hilversum Aerodrome

name_translated

string

Airport name translated according to locale. Same as name if no translation is available.

Vliegveld Hilversum

taf

boolean

Whether the airport has published a TAF recently.

false

timezone

int

Difference from UTC in seconds. Positive numbers are timezones east of London. E.g. 3600 is UTC+1 hour.

Unit:   seconds

3600

type

int

Airport type and size. Possible values are:

-1 Sconosciuto
0 Chiuso
2 Servizio meteorologico
6 Campo in mongolfiera
7 Eliporto
9 Base idrovolante
10 Gliderfield
12 Campo d'aviazione ultraleggero
13 Piccolo aeroporto
14 Aeroporto di medie dimensioni
15 Grande aeroporto
13

Station

When the requested airport doesn't have it's own METAR, we'll choose the nearest available airport with weather information. In that case, the Station section will be filled with the airport details in the same format as above. The following fields are added:

Name Type Description Example

bearing

int

Direction from airport to the weather station. A bearing of 180 means the weather station is directly south of the airport.

Unit:   degrees

180

distance

int

Distance between the airport and the weather station.

Unit:   kilometers

22

Stations

In the response you get a list of nearby airports with METAR. You can use the list to give your visitors some alternatives. Each item in the list will contain:

Name Type Description Example

id

string

ICAO code of the airport

LEMD

name

string

Name of the airport.

Aeroporto di Madrid-Barajas

taf

boolean

The airport published a TAF recently.

true

Previous

METAR

Next

Airports