METARs
GET/api/v1/metars/{icaoCodeOrIdent}Student Pilot

Get Metar For Airport

Gets the most recent METAR observation for a specific airport. Returns decoded weather data including wind, visibility, sky conditions, temperature, and flight category.

Code Examples

curl \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://api.preflightapi.io/api/v1/metars/KJFK"

Description

GET /api/v1/metars/KDFW — by ICAO code
GET /api/v1/metars/DFW — by FAA identifier

Parameters

NameInTypeDescription
icaoCodeOrIdent*pathstringICAO code or FAA identifier (e.g., KDFW, DFW). Case-insensitive.

Response Schema

200Returns the METAR observationMetarDto
idinteger

Database identifier.

rawTextstringnullable

Raw METAR text string as received from the source.

stationIdstringnullable

ICAO station identifier (e.g., KDFW).

observationTimestringnullable

Observation time in ISO 8601 format.

latitudenumbernullable

Station latitude in decimal degrees (WGS 84).

longitudenumbernullable

Station longitude in decimal degrees (WGS 84).

tempCnumbernullable

Temperature in degrees Celsius.

dewpointCnumbernullable

Dewpoint temperature in degrees Celsius.

windDirDegreesstringnullable

Wind direction in degrees true, or "VRB" for variable.

windSpeedKtintegernullable

Wind speed in knots.

windGustKtintegernullable

Wind gust speed in knots.

visibilityStatuteMistringnullable

Visibility in statute miles.

altimInHgnumbernullable

Altimeter setting in inches of mercury.

seaLevelPressureMbnumbernullable

Sea level pressure in millibars. ex: 1016.2

wxStringstringnullable

Present weather string (e.g., "-RA" for light rain).

flightCategoryFlightCategorynullable

Flight category: VFR, MVFR, IFR, or LIFR.

threeHrPressureTendencyMbnumbernullable

Three-hour pressure tendency in millibars.

maxTCnumbernullable

Maximum temperature in degrees Celsius.

minTCnumbernullable

Minimum temperature in degrees Celsius.

maxT24hrCnumbernullable

Maximum temperature over the past 24 hours in degrees Celsius.

minT24hrCnumbernullable

Minimum temperature over the past 24 hours in degrees Celsius.

precipInnumbernullable

Precipitation accumulation in inches since the last routine observation.

pcp3hrInnumbernullable

Precipitation accumulation in inches over the past 3 hours.

pcp6hrInnumbernullable

Precipitation accumulation in inches over the past 6 hours.

pcp24hrInnumbernullable

Precipitation accumulation in inches over the past 24 hours.

snowInnumbernullable

Snow depth in inches.

vertVisFtintegernullable

Vertical visibility in feet AGL.

metarTypestringnullable

Type of encoding: METAR or SPECI.

elevationMnumbernullable

Station elevation in meters MSL.

404If no METAR is found for the airportApiErrorResponse
codestring

Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").

messagestring

Human-readable error message suitable for display.

detailsstringnullable

Additional error details (only included in development environment).

servicestringnullable

Name of the external service that failed (only included for 503 errors).

validationErrorsRecord<string, string[]>nullable

Field-level validation errors (only for validation failures).

timestampstring

UTC timestamp when the error occurred.

traceIdstringnullable

Correlation ID for tracing the request.

pathstringnullable

Request path that generated the error.

Search Documentation

Search docs, endpoints, and schemas