Weather (METAR & TAF)
Retrieve real-time aviation weather observations and forecasts for any airport worldwide using its ICAO code.
What is a METAR?
A METAR (Meteorological Aerodrome Report) is a standardized weather observation report issued by airports, typically updated every hour (or more frequently when conditions change rapidly). It contains current conditions including wind, visibility, cloud cover, temperature, dew point, and barometric pressure. METARs are the primary way pilots and dispatchers assess current weather at an airport.
What is a TAF?
A TAF (Terminal Aerodrome Forecast) is a weather forecast specific to the area within approximately 5 nautical miles of an airport. TAFs are typically issued every 6 hours and cover a 24- to 30-hour forecast period. They include predicted wind, visibility, cloud cover, and significant weather, broken down into time periods with expected changes.
Get METAR
Retrieve the current METAR weather observation for an airport.
GET /v3/weather/metar/{icao}
Parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
icao | path | string | Yes | -- | 4-letter ICAO airport code (e.g., KJFK, EGLL) |
parsed | query | boolean | No | false | Include decoded/structured weather fields alongside raw text |
Response Fields
| Field | Type | Description |
|---|---|---|
raw | string | Raw METAR text as issued by the weather station |
icao | string | ICAO airport code |
airport_name | string | Full airport name |
timestamp | string | ISO 8601 timestamp of when the data was retrieved |
parsed | object | (only if parsed=true) Decoded weather fields (see below) |
Parsed METAR Fields
When parsed=true, the response includes a parsed object with the following fields:
| Field | Type | Description |
|---|---|---|
wind.direction | number | Wind direction in degrees true (0-360) |
wind.speed | number | Wind speed in knots |
wind.gust | number | Gust speed in knots (null if no gusts) |
visibility.value | number | Visibility value |
visibility.repr | string | Raw visibility representation (e.g., "10SM") |
clouds | array | Cloud layers with type (FEW, SCT, BKN, OVC) and base (altitude in hundreds of feet) |
temperature | number | Temperature in degrees Celsius |
dewpoint | number | Dew point in degrees Celsius |
altimeter | number | Altimeter setting (inches of mercury) |
flight_rules | string | Flight rules category: VFR, MVFR, IFR, or LIFR |
wx_codes | array | Present weather codes (e.g., rain, snow, fog) |
remarks | string | Remarks section of the METAR |
density_altitude | number | Calculated density altitude |
pressure_altitude | number | Calculated pressure altitude |
relative_humidity | number | Relative humidity percentage |
time | string | Observation time (UTC) |
Examples
Bash
# Basic METAR (raw text only)
curl -H "X-RapidAPI-Key: YOUR_API_KEY" \
"YOUR_API_BASE_URL/v3/weather/metar/KJFK"
# METAR with parsed/decoded fields
curl -H "X-RapidAPI-Key: YOUR_API_KEY" \
"YOUR_API_BASE_URL/v3/weather/metar/KJFK?parsed=true"
Python
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "YOUR_API_BASE_URL/v3"
# Get parsed METAR for JFK
response = requests.get(
f"{BASE_URL}/weather/metar/KJFK",
headers={"X-RapidAPI-Key": API_KEY},
params={"parsed": True}
)
data = response.json()
print(f"Raw: {data['raw']}")
print(f"Airport: {data['airport_name']}")
if "parsed" in data:
parsed = data["parsed"]
print(f"Wind: {parsed['wind']['direction']}° at {parsed['wind']['speed']} kts")
print(f"Temperature: {parsed['temperature']}°C")
print(f"Flight Rules: {parsed['flight_rules']}")
JavaScript
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "YOUR_API_BASE_URL/v3";
const response = await fetch(
`${BASE_URL}/weather/metar/KJFK?parsed=true`,
{ headers: { "X-RapidAPI-Key": API_KEY } }
);
const data = await response.json();
console.log(`Raw METAR: ${data.raw}`);
console.log(`Airport: ${data.airport_name}`);
if (data.parsed) {
const { wind, temperature, flight_rules } = data.parsed;
console.log(`Wind: ${wind.direction}° at ${wind.speed} kts`);
console.log(`Temperature: ${temperature}°C`);
console.log(`Flight Rules: ${flight_rules}`);
}
Response Example
{
"raw": "METAR KJFK 271851Z 16013KT 10SM FEW024 15/09 A3020 RMK AO2 SLP216 T01500089",
"icao": "KJFK",
"airport_name": "John F Kennedy International Airport",
"timestamp": "2025-09-27T18:51:00Z",
"parsed": {
"wind": {
"direction": 160,
"speed": 13,
"gust": null,
"variable": null
},
"visibility": {
"value": 10,
"repr": "10SM"
},
"clouds": [
{
"type": "FEW",
"base": 24,
"repr": "FEW024"
}
],
"temperature": 15,
"dewpoint": 9,
"altimeter": 30.2,
"flight_rules": "VFR",
"wx_codes": [],
"remarks": "AO2 SLP216 T01500089",
"density_altitude": null,
"pressure_altitude": null,
"relative_humidity": null,
"time": "2025-09-27T18:51:00Z"
}
}
Get TAF
Retrieve the Terminal Aerodrome Forecast for an airport.
GET /v3/weather/taf/{icao}
Parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
icao | path | string | Yes | -- | 4-letter ICAO airport code (e.g., KJFK, EGLL) |
parsed | query | boolean | No | false | Include decoded/structured forecast periods alongside raw text |
Response Fields
| Field | Type | Description |
|---|---|---|
raw | string | Raw TAF text as issued |
icao | string | ICAO airport code |
airport_name | string | Full airport name |
timestamp | string | ISO 8601 timestamp of when the data was retrieved |
parsed | object | (only if parsed=true) Decoded forecast data (see below) |
Parsed TAF Fields
When parsed=true, the response includes a parsed object with:
| Field | Type | Description |
|---|---|---|
start_time | string | Forecast validity start (UTC) |
end_time | string | Forecast validity end (UTC) |
forecast | array | Array of forecast period objects |
Each forecast period contains:
| Field | Type | Description |
|---|---|---|
type | string | Period type: FROM, BECMG (becoming), TEMPO (temporary), PROB |
start_time | string | Period start time (UTC) |
end_time | string | Period end time (UTC) |
wind.direction | number | Forecast wind direction in degrees |
wind.speed | number | Forecast wind speed in knots |
wind.gust | number | Forecast gust speed in knots (null if none) |
visibility | object | Forecast visibility with value and repr |
clouds | array | Forecast cloud layers |
wx_codes | array | Forecast weather phenomena |
flight_rules | string | Expected flight rules: VFR, MVFR, IFR, LIFR |
probability | number | Probability percentage (for PROB periods) |
turbulence | array | Turbulence forecasts (if any) |
icing | array | Icing forecasts (if any) |
Examples
Bash
# Basic TAF (raw text only)
curl -H "X-RapidAPI-Key: YOUR_API_KEY" \
"YOUR_API_BASE_URL/v3/weather/taf/EGLL"
# TAF with parsed forecast periods
curl -H "X-RapidAPI-Key: YOUR_API_KEY" \
"YOUR_API_BASE_URL/v3/weather/taf/EGLL?parsed=true"
Python
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "YOUR_API_BASE_URL/v3"
response = requests.get(
f"{BASE_URL}/weather/taf/EGLL",
headers={"X-RapidAPI-Key": API_KEY},
params={"parsed": True}
)
data = response.json()
print(f"Raw TAF: {data['raw']}")
if "parsed" in data:
for period in data["parsed"]["forecast"]:
print(f"\n{period['type']}: {period['start_time']} to {period['end_time']}")
print(f" Wind: {period['wind']['direction']}° at {period['wind']['speed']} kts")
print(f" Flight Rules: {period['flight_rules']}")
JavaScript
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "YOUR_API_BASE_URL/v3";
const response = await fetch(
`${BASE_URL}/weather/taf/EGLL?parsed=true`,
{ headers: { "X-RapidAPI-Key": API_KEY } }
);
const data = await response.json();
console.log(`Raw TAF: ${data.raw}`);
if (data.parsed) {
for (const period of data.parsed.forecast) {
console.log(`${period.type}: ${period.start_time} - ${period.end_time}`);
console.log(` Wind: ${period.wind.direction}° at ${period.wind.speed} kts`);
console.log(` Flight Rules: ${period.flight_rules}`);
}
}
Response Example
{
"raw": "TAF KJFK 271720Z 2718/2824 16012KT P6SM FEW025 SCT250 FM272100 18010KT P6SM SCT025 BKN250",
"icao": "KJFK",
"airport_name": "John F Kennedy International Airport",
"timestamp": "2025-09-27T17:20:00Z",
"parsed": {
"start_time": "2025-09-27T18:00:00Z",
"end_time": "2025-09-28T24:00:00Z",
"forecast": [
{
"type": "FROM",
"start_time": "2025-09-27T18:00:00Z",
"end_time": "2025-09-27T21:00:00Z",
"wind": {
"direction": 160,
"speed": 12,
"gust": null,
"variable": null
},
"visibility": {
"value": 7,
"repr": "P6SM"
},
"clouds": [
{ "type": "FEW", "base": 25, "repr": "FEW025" },
{ "type": "SCT", "base": 250, "repr": "SCT250" }
],
"wx_codes": [],
"flight_rules": "VFR",
"probability": null,
"turbulence": [],
"icing": []
},
{
"type": "FROM",
"start_time": "2025-09-27T21:00:00Z",
"end_time": "2025-09-28T24:00:00Z",
"wind": {
"direction": 180,
"speed": 10,
"gust": null,
"variable": null
},
"visibility": {
"value": 7,
"repr": "P6SM"
},
"clouds": [
{ "type": "SCT", "base": 25, "repr": "SCT025" },
{ "type": "BKN", "base": 250, "repr": "BKN250" }
],
"wx_codes": [],
"flight_rules": "VFR",
"probability": null,
"turbulence": [],
"icing": []
}
]
}
}
Tips
- METAR updates: Most airports update their METAR once per hour, but busy airports may issue special observations (SPECIs) when conditions change rapidly.
- TAF availability: Not all airports issue TAFs. Smaller airfields without weather stations will return a 404 error.
- Flight rules: The
flight_rulesfield is extremely useful for quick go/no-go decisions. Values in order of decreasing visibility:VFR>MVFR>IFR>LIFR. - Use
parsed=trueto avoid writing your own METAR/TAF parsing logic. The structured fields save significant development time.
If you only need the raw METAR/TAF string (e.g., for display to pilots who read them natively), omit the parsed parameter to get a smaller, faster response.
Weather data is fetched in real-time from upstream sources. If the weather station at an airport is offline or not reporting, you will receive a 404 response.