History
Deprecated

Get METARs from an airport over the last few days. This end-point is deprecated. Please use "Archive" instead.

Only the main variables for each METAR are decoded to keep the output concise. If you need a fully decoded version use the METAR endpoint in combination with the METAR ID from this list.

Usage

https://api.metar-taf.com/metar-history
?api_key=YOUR_API_KEY
&v=2.3
&locale=es-ES
&id=LEMD

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.

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 the recent METAR history of Aeropuerto de Madrid-Barajas (LEMD), ordered from new to old: https://api.metar-taf.com/metar-history
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=es-ES
    &id=LEMD

    Try it

    Get credits to see live data

  • Get the METARs nearest to position 40.77724, -73.87261 (latitude, longitude): https://api.metar-taf.com/metar-history
    ?api_key=YOUR_API_KEY
    &v=2.3
    &locale=es-ES
    &latitude=40.77724
    &longitude=-73.87261

    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:

pagination Pagination stats, to help you manage get multiple pages of results
metar-history List of historical METARs

Pagination

Name Type Description Example

from

int

Serial number of the first result, zero-based. This is the offset you specified in the request.

2000

results

int

Number of results in this response. If lower than 1000, you know this was the last page.

1000

to

int

Serial number of the last result, zero-based. This is the offset plus the number of results minus one.

2999

METAR

Name Type Description Example

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

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
UNKN Datos incompletos o caducados
VFR

dewpoint

int

Dewpoint

Unit:   degrees Celsius

11 -3

id

int

ID of this METAR. Use this ID if you want to request more information with the METAR endpoint.

264209666

raw

string

Raw METAR data, not decoded

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

temperature

int

Temperature

Unit:   degrees Celsius

3 32

weather

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

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_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

Previous

Archive