Metar & Taf

Developers

METAR

This API is to get a METAR combined with airport, weather station and runway information all at the same time.

Usage

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

Try it

Get credits to see live data

Parameters

Provide these parameters when you make the call to the METAR 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

latitude

(optional)

float

Decimal latitude of the location you want to query. we will select the nearest METAR.

Unit:   degrees

40.49528

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 中文
pt-PT

longitude

(optional)

float

Decimal longitude of the location you want to query, we will select the nearest METAR.

Unit:   degrees

-3.56009

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

time

(optional)

string

To get a historical METAR, provide a time in ISO 8601 format. We will select the first METAR before this time. Leave this parameter empty to get the current METAR.

See also:   https://https://en.wikipedia.o..

2024-03-28T15:17:07Z

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 current weather information of Texel International Airport (EHTX): https://api.metar-taf.com/metar
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=pt-PT
    &id=EHTX

    Try it

    Get credits to see live data

  • Get current weather information of Texel International Airport (EHTX), use the weather information of Vlieland Heliport (EHVL) instead of EHKD and combine it with the runway information for EHTX: https://api.metar-taf.com/metar
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=pt-PT
    &id=EHTX
    &station_id=EHVL

    Try it

    Get credits to see live data

  • Get the nearest METAR report for position 40.59528, -3.46009 on 2024-03-27 15:17:07 UTC. https://api.metar-taf.com/metar
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=pt-PT
    &latitude=40.59528
    &longitude=-3.46009
    &time=2024-03-27T15:17:07Z

    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:

metar Last METAR 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
runways Runways of the requested airport with the crosswind data.
Crosswind data is calculated using the airport\'s own METAR or the nearest available station.

METAR

Name Type Description Example

cavok

boolean

If ceiling and visibility are OK (CAVOK). This means there are no clouds below 5000 ft or the MSA (minimum safe altitude), whichever is higher. This also means that no cumulonimbus or towering cumulus clouds have been observed and the visibility is 10 kilomters or more. Also, there can't be fog, precipitation nor other significant weather.

true false

ceiling

int

Observed ceiling. For ceiling we use the lowest cloud layer that is broken, overcast or when there is a vertical visibility reported.

Unit:   feet

null 3000

ceiling_color

string(7)

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

#28a745

clouds

CloudLayer[]

Array with all reported cloud layers.

code

string

Flight rules category. 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
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

colour_state

string

Colour state. Used by some military airport. Translated according to the locale. If the airport is closed, Black will be added. Possible values for the colors are:

BLU Azul
WHT Branco
GRN Verde
YLO Amarelo
AMB Âmbar
RED Vermelho
Verde Azul/Preto

dewpoint

int

Dewpoint

Unit:   degrees Celsius

11 -3

dewpoint_exact

(optional)

int

Some METARs provide an exact dewpoint in the remarks, you can find it in this variable. Note that it is in tenths of degrees Celsius. So 113 means 11.3°C. If not available, null is provided.

Unit:   tenths of degrees Celsius

113

humidity

int

Relative Humidity. Calculated from temperature and dewpoint. If available, temperature_exact and dewpoint_exact are used to get more accurate results.

Unit:   percentage

10 98

is_day

boolean

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

false true

observed

int

Observation timestamp. UTC time in seconds since Unix epoch.

Unit:   seconds

1644848700

qnh

int

Altimeter setting: air pressure calculated back to mean sea level according to the standard atmosphere.

Unit:   hectopascal

997 1013

raw

string

Raw METAR data, not decoded

METAR EHAM
141425Z 23023G33KT
190V260 9999 FEW022
10/02 Q0999 NOSIG

recent_weather_report

(optional)

string

Report of recent weather in human language. Same as weather, but it will only provide significant weather and no cloud information.

Luz chuva

remarks

string[]

Array of strings in the requested language. Every element represents one part of the remarks section in the METAR.

Temperature is
13.9 °C (T01390039)
Automatic weather station
that can determine the
type of precipitation (AO2)

runway_condition

RunwayCondition[]

Array with all reported runway conditions.

runway_visibility

RunwayVisibility[]

Array with all reported runway visual ranges.

snoclo

boolean

Whether the airport is closed due to snow (SNOCLO).

false true

station_id

string

ICAO code of the reporting weather station.

LEMD

sunrise

int

Timestamp of sunrise at the requested airport on the day of the METAR observation. UTC time in seconds since Unix epoch.

Unit:   seconds

1644821896

sunset

int

Timestamp of sunset at the requested airport on the day of the METAR observation. UTC time in seconds since Unix epoch.

Unit:   seconds

1644857513

temperature

int

Temperature

Unit:   degrees Celsius

3 32

temperature_exact

(optional)

int

Some METARs provide an exact temperature in the remarks, you can find it in this variable. Note that it is in tenths of degrees Celsius. So 113 means 11.3°C. If not available, null is provided.

Unit:   tenths of degrees Celsius

113

trends

MetarTrend[]

Array with all reported trends.

vertical_visibility

(optional)

int

Vertical visibility, if applicable.

Unit:   feet

100 null

visibility

int

Current visibility.

Unit:   meters

10000 3500

visibility_color

string(7)

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

#28a745

visibility_min

(optional)

int

Reported minimum visibility. Use with visibility_min_direction.

Unit:   meters

3000 null

visibility_min_direction

(optional)

string

Direction in which the minimum visibility is reported. Use with visibility_min_direction.

Unit:   meters

N NE null

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

weather

string

Weather report in normal language, translated according to locale. If there is no significant weather (fog, precipitation) it will indicate the maximum cloud coverage.

Poucas nuvens Pesado chuva

weather_image

string

Image to use for indicating significant weather and cloud base. Possible values are:

broken
drizzle
few
fog
hail
haze
mist
overcast
rain
scattered
snow
sunny
thunder

rain overcast

weather_report

(optional)

string

Weather report in human language. Same as weather, but it will only provide significant weather and no cloud information.

Pesado chuva

wind_color

string(7)

Color to use for a graphical presentation of the wind speed including gusts. 6 character hexadecimal preded by a hash sign. Other than for example the ceiling_color you can't expect certain values. They may change over time.

#28a745

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.

Unit:   degrees

270 -1

wind_dir_max

(optional)

int

If reported, the wind varies between wind_dir_min and wind_dir_max. Magnetic heading from 0 to 360.

Unit:   degrees

290 null

wind_dir_min

(optional)

int

If reported, the wind varies between wind_dir_min and wind_dir_max. Magnetic heading from 0 to 360.

Unit:   degrees

220 null

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_speed

int

Average wind speed

Unit:   knots

12 0

ws_all

boolean

Windshear is reported at all runways.

true

ws_runways

string[]

Windshear is reported at certain runways. Array of strings with runway names.

04 27L

Runways

The Runway section contains an array of Runway objects:

Name Type Description Example

hdg_h

int

Second magnetic heading. The side with the highest heading or south.

Unit:   degrees

232

hdg_l

int

First magnetic heading. The side with the lowest heading or north.

Unit:   degrees

52

hwnd

int

Headwind for this runway. Given the average wind speed in the current METAR. As we select the side with headwind, this value is always positive.

Unit:   knots

8

id_h

string

Second identifier of the runway. The side with the highest heading or south. Combine id_l and id_h to get the full identifier of this runway.

23R

id_l

string

First identifier of this runway. The side with the lowest heading or north. Combine id_l and id_h to get the full identifier of this runway.

5L

in_use

string

Identifier of the side that is in use. We select the side with headwind. Equals id_l or id_h.

5L

xwnd

int

Crosswind for this runway, given the average wind speed in the current METAR. The side with headwind is used as reference (see in_use). A negative value means crosswind from the left. Positive values mean crosswind from the right.

Unit:   knots

-4.1

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.

Espanha

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 Desconhecido
0 Fechado
2 Serviço meteorológico
6 Campo de balões
7 Heliporto
9 Base de hidroaviões
10 Gliderfield
12 Aeródromo microleve
13 Pequeno aeroporto
14 Aeroporto de médio porte
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 de Madrid-Barajas

taf

boolean

The airport published a TAF recently.

true

Trend

Contains information about weather trends.

Name Type Description Example

cavok

boolean

Ceiling and visibility are OK (CAVOK). This means there are no clouds below 5000 ft or the MSA (minimum safe altitude), whichever is higher. This also means that no cumulonimbus or towering cumulus clouds have been observed and the visibility is 10 kilomters or more. Also, there can't be fog, precipitation nor other significant weather.

true false

clouds

CloudLayer[]

Array with cloud layers.

flag

(optional)

string

Type of trend. Possible values are:

BECMG Becoming
TEMPO Temporary
INTER Intermittent
PROV Provisional
CNL Cancelled
NIL Nil forecast
TEMPO

from

(optional)

int

Start of the period in seconds since Unix epoch

1711639027

present_weather_report

(optional)

string

Weather report in human language. This will only provide significant weather and no cloud information.

Pesado chuva

probability

(optional)

int

Chance that it will take place in percent. 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%.

30

to

int

End of the period in seconds since Unix epoch

Unit:   seconds

1711642627

visibility

(optional)

int

Visibility

Unit:   meters

10000 3500

wind_dir

(optional)

int

Wind direction in degrees or -1 if variable

Unit:   degrees

130

wind_dir_max

(optional)

int

If reported, the wind varies between wind_dir_min and wind_dir_max. Magnetic heading from 0 to 360.

Unit:   degrees

290 null

wind_dir_min

(optional)

int

If reported, the wind varies between wind_dir_min and wind_dir_max. Magnetic heading from 0 to 360.

Unit:   degrees

220 null

wind_gust

(optional)

int

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

Unit:   knots

12 0

wind_speed

(optional)

int

Average wind speed

Unit:   knots

12 0

CloudLayer

Contains information about the cloud layers.

Name Type Description Example

amount

string

Amount of clouds observed.

BKN Broken
CLR Clear
FEW Few
NOBS Not observed
NSC Nil significant clouds
NSW Nil significant weather
OVC Overcast
SCT Scattered
SKC Sky clear
VV Vertical Visibility
FEW

height

int

Height of the cloud base AGL.

Unit:   feet

1200

id

int

Number of the cloud layer. 0 is the lowest reported cloud layer.

0

report

string

Human readable report for this cloud layer, translated according to locale.

Few clouds at 1200 feet

RunwayCondition

Has information about the runway conditions at the reporting airport (weather station). Note that if the weather station is another airport, these values are not useful.

Name Type Description Example

id

string

Applicable runway ID. Note that you can't neccessarily match these with the ID's provided in the Runway object. The identifier might have changed.

5L

text

string

Description of the runway condition, human readable and translated according to the specified locale.

RunwayVisibility

Has information about visibility per runway at the reporting airport (weather station). Note that if the weather station is another airport, these values are not useful.

Name Type Description Example

id

string

Applicable runway ID. Note that you can't neccessarily match these with the ID's provided in the Runway object. The identifier might have changed.

5L

max

int

Maximum value. The value varies between min and max.

Unit:   meters or feet

3500

min

int

Minimum value. The value varies between min and max.

Unit:   meters or feet

2500

prefix

string

Visibility prefix. A value or 3000 and a prefix of P means, the visibility is 3000 or more. Possible values are:

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

trend

string

Trend of the visibility.

D Down (Decreasing)
U Up (Increasing)
N Neutral (No trend)
U

value

int

Visibility value

Unit:   meters or feet

3000

Previous

Response format

Next

TAF