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
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:
|
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.
|
1
|
||||||||||||||||||
v |
string |
API version: provide the current version, which is |
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 - 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
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
|
|||||||||||||||||||||||||||||||||||||||
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
|
|||||||||||||||||||||||||||||||||||||||
temperature |
int |
Temperature Unit: degrees Celsius |
3
32
|
|||||||||||||||||||||||||||||||||||||||
weather |
string |
Image to use for indicating significant weather and cloud base. Possible values are:
|
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
|
Archive