/api/v1/metars/batchStudent PilotGet Metars Batch
Gets the most recent METAR observations for multiple airports in a single request. Accepts ICAO codes or FAA identifiers. Identifiers that don't resolve to a METAR are silently skipped.
Code Examples
curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/metars/batch?ids=value"curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/metars/batch?ids=value"Description
Both ICAO codes and FAA identifiers can be mixed in the same request. Maximum 100 identifiers per request.
GET /api/v1/metars/batch?ids=KDFW,KAUS,KHOU
GET /api/v1/metars/batch?ids=DFW,AUSParameters
| Name | In | Type | Description |
|---|---|---|---|
| ids | query | string | Comma-separated ICAO codes or FAA identifiers (e.g., KDFW,KAUS,KHOU). Maximum 100. |
Response Schema
Database identifier.
Raw METAR text string as received from the source.
ICAO station identifier (e.g., KDFW).
Observation time in ISO 8601 format.
Station latitude in decimal degrees (WGS 84).
Station longitude in decimal degrees (WGS 84).
Temperature in degrees Celsius.
Dewpoint temperature in degrees Celsius.
Wind direction in degrees true, or "VRB" for variable.
Wind speed in knots.
Wind gust speed in knots.
Visibility in statute miles.
Altimeter setting in inches of mercury.
Sea level pressure in millibars. ex: 1016.2
Present weather string (e.g., "-RA" for light rain).
Three-hour pressure tendency in millibars.
Maximum temperature in degrees Celsius.
Minimum temperature in degrees Celsius.
Maximum temperature over the past 24 hours in degrees Celsius.
Minimum temperature over the past 24 hours in degrees Celsius.
Precipitation accumulation in inches since the last routine observation.
Precipitation accumulation in inches over the past 3 hours.
Precipitation accumulation in inches over the past 6 hours.
Precipitation accumulation in inches over the past 24 hours.
Snow depth in inches.
Vertical visibility in feet AGL.
Type of encoding: METAR or SPECI.
Station elevation in meters MSL.
Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
Human-readable error message suitable for display.
Additional error details (only included in development environment).
Name of the external service that failed (only included for 503 errors).
Field-level validation errors (only for validation failures).
UTC timestamp when the error occurred.
Correlation ID for tracing the request.
Request path that generated the error.