Archive

Get METARs from an airport on a given day (UTC) in the past.

Usage

https://api.metar-taf.com/metar-archive
?api_key=YOUR_API_KEY
&v=2.3
&locale=es-ES
&id=LEMD
&date=2023-10-01

Try it

Get credits to see live data

Parameters

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

Name Type Description Example

api_key

string

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

date

string

Date in yyyy-mm-dd format. Note that dates are UTC. 2021-01-01 will return all observations between 2021-01-01 00:00Z and 2021-01-01 23:59Z.

2024-03-22

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.

LEMD

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 中文
es-ES

longitude

(optional)

float

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

Unit:   degrees

-3.56009

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 all METARs from 1 de octubre de 2023 of Aeropuerto de Madrid-Barajas (LEMD), ordered from old to new: https://api.metar-taf.com/metar-archive
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=es-ES
    &id=LEMD
    &date=2023-10-01

    Try it

    Get credits to see live data

  • Get all METARs from from 1 de octubre de 2023 nearest to position 40.77724, -73.87261 (latitude, longitude): https://api.metar-taf.com/metar-archive
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=es-ES
    &latitude=40.77724
    &longitude=-73.87261
    &date=2023-10-01

    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:

metars List of METARs

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 Blanco
GRN Verde
YLO Amarillo
AMB Ámbar
RED Rojo
Verde Azul/Negro

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.

Ligera lluvia

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.

Nubes escasas Pesada lluvia

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.

Pesada lluvia

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

Previous

Airports

Next

History