Skip to content

SkyLink-API/metar-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

METAR & TAF API — Aviation Weather by ICAO Code

RapidAPI Free Tier Python JavaScript

Get real-time METAR reports and TAF terminal forecasts for any airport worldwide. Returns both raw METAR string and fully decoded JSON fields — wind, visibility, ceiling, QNH, temperature, dewpoint, and flight category (VFR/MVFR/IFR/LIFR).

The SkyLink METAR API is a free aviation weather API for developers building preflight briefing tools, pilot apps, EFBs, dispatch systems, and weather dashboards. No need to scrape aviationweather.gov or parse raw METAR strings yourself.


What Are METAR and TAF?

METAR (Meteorological Aerodrome Report) is an hourly weather observation at an airport, including wind speed/direction, visibility, cloud layers, temperature, dewpoint, and altimeter setting. Used by pilots for every flight.

TAF (Terminal Aerodrome Forecast) is a 24–30 hour forecast for airport conditions, with change groups indicating when conditions are expected to shift. Required for IFR flight planning.


Features

  • METAR — current conditions decoded from raw string to structured JSON
  • TAF — terminal forecast with individual change group objects
  • Both raw text string and decoded fields returned simultaneously
  • Decoded fields: wind direction, wind speed (kt), gusts, visibility (SM), sky condition layers (FEW/SCT/BKN/OVC + height AGL), temperature (°C), dewpoint, altimeter (inHg), remarks
  • Flight category — VFR / MVFR / IFR / LIFR automatically calculated
  • Global coverage — 100+ countries, all ICAO-coded airports
  • Sub-second response via Redis cache

Endpoints

GET /v2/weather/metar/{icao}       # current METAR for airport
GET /v2/weather/taf/{icao}         # current TAF for airport

# Examples:
GET /v2/weather/metar/KJFK         # JFK International, New York
GET /v2/weather/metar/EGLL         # Heathrow, London
GET /v2/weather/metar/YSSY         # Sydney Airport
GET /v2/weather/taf/KLAX           # LAX forecast

Quick Start

Get Your Free API Key

Sign up at RapidAPI — SkyLink API — 1,000 free requests/month, no credit card required.

Python — Fetch METAR

import requests

headers = {
    "x-rapidapi-key": "YOUR_API_KEY",
    "x-rapidapi-host": "skylink-api.p.rapidapi.com"
}

# Get current METAR for JFK
r = requests.get(
    "https://skylink-api.p.rapidapi.com/v2/weather/metar/KJFK",
    headers=headers
)
data = r.json()

print(f"Raw: {data['raw']}")
# METAR KJFK 291851Z 28009KT 10SM FEW045 22/08 A2985 RMK AO2

print(f"Wind: {data['wind_dir']}° at {data['wind_speed_kt']}kt")
print(f"Visibility: {data['visibility_sm']} SM")
print(f"Ceiling: {data['sky_condition'][0]['height_ft']}ft {data['sky_condition'][0]['cover']}")
print(f"Temp/Dew: {data['temperature_c']}°C / {data['dewpoint_c']}°C")
print(f"Altimeter: {data['altimeter_inhg']} inHg")
print(f"Flight Category: {data['flight_category']}")  # VFR / MVFR / IFR / LIFR

Python — Fetch TAF

r = requests.get(
    "https://skylink-api.p.rapidapi.com/v2/weather/taf/EGLL",
    headers=headers
)
taf = r.json()

print(f"Raw TAF: {taf['raw']}")
print(f"Valid: {taf['valid_from']}{taf['valid_to']}")
for group in taf["forecast"]:
    print(f"  {group['time_from']}{group['time_to']}: "
          f"Wind {group.get('wind_dir')}° {group.get('wind_speed_kt')}kt, "
          f"Vis {group.get('visibility_sm')}SM")

JavaScript (Node.js)

const axios = require('axios');

const headers = {
  'x-rapidapi-key': 'YOUR_API_KEY',
  'x-rapidapi-host': 'skylink-api.p.rapidapi.com'
};

// Fetch METAR
const metar = await axios.get(
  'https://skylink-api.p.rapidapi.com/v2/weather/metar/KJFK',
  { headers }
);
console.log(`${metar.data.station}: ${metar.data.flight_category}`);
console.log(`Wind: ${metar.data.wind_dir}° @ ${metar.data.wind_speed_kt}kt`);

// Fetch TAF
const taf = await axios.get(
  'https://skylink-api.p.rapidapi.com/v2/weather/taf/KJFK',
  { headers }
);
console.log(`TAF valid until: ${taf.data.valid_to}`);

cURL

# METAR
curl -X GET "https://skylink-api.p.rapidapi.com/v2/weather/metar/KJFK" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: skylink-api.p.rapidapi.com"

# TAF
curl -X GET "https://skylink-api.p.rapidapi.com/v2/weather/taf/KLAX" \
  -H "x-rapidapi-key: YOUR_API_KEY" \
  -H "x-rapidapi-host: skylink-api.p.rapidapi.com"

Response Schema

METAR

{
  "station": "KJFK",
  "raw": "METAR KJFK 291851Z 28009KT 10SM FEW045 22/08 A2985 RMK AO2",
  "time": "2026-03-29T18:51:00Z",
  "wind_dir": 280,
  "wind_speed_kt": 9,
  "wind_gust_kt": null,
  "visibility_sm": 10.0,
  "sky_condition": [
    { "cover": "FEW", "height_ft": 4500 }
  ],
  "temperature_c": 22,
  "dewpoint_c": 8,
  "altimeter_inhg": 29.85,
  "flight_category": "VFR",
  "remarks": "AO2"
}

TAF

{
  "station": "EGLL",
  "raw": "TAF EGLL 291700Z 2918/3024 ...",
  "time": "2026-03-29T17:00:00Z",
  "valid_from": "2026-03-29T18:00:00Z",
  "valid_to": "2026-03-30T24:00:00Z",
  "forecast": [
    {
      "time_from": "2026-03-29T18:00:00Z",
      "time_to": "2026-03-30T06:00:00Z",
      "wind_dir": 250,
      "wind_speed_kt": 15,
      "wind_gust_kt": 25,
      "visibility_sm": 6.0,
      "sky_condition": [{ "cover": "BKN", "height_ft": 2000 }],
      "change_type": "FM"
    }
  ]
}

Use Cases

  • Preflight weather briefing apps — display METAR and TAF alongside NOTAMs for go/no-go decisions
  • Flight dispatch and operations control — monitor departure airport conditions across a fleet
  • Weather widgets for aviation websites — embed live airport weather
  • GA pilot mobile apps — show VFR/IFR conditions at nearby airports
  • Drone BVLOS weather automation — check ceiling and visibility before approving drone flights
  • Flight simulator weather injection — use real weather in X-Plane or MSFS via SimConnect
  • AI flight briefing pipelines — feed METAR/TAF data to LLMs for natural-language briefings

Related Repositories


GitHub Topics

metar taf aviation-weather weather-api icao aviation-api python meteorology rest-api free-api pilot efb


Part of SkyLink API — The All-In-One Aviation Data API

All features are included in a single SkyLink API subscription. No juggling 5 different providers. One key, one schema, one bill.

About

Get real-time METAR reports and TAF terminal forecasts for any airport worldwide. Returns both raw METAR string and fully decoded JSON fields — wind, visibility, ceiling, QNH, temperature, dewpoint, and flight category (VFR/MVFR/IFR/LIFR).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors