/api/v1/e6b/crosswind/{icaoCodeOrIdent}Commercial PilotGet Crosswind For Airport
Calculates crosswind and headwind components for every runway at an airport using live METAR wind data.
Code Examples
curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/e6b/crosswind/KJFK"curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/e6b/crosswind/KJFK"Description
Fetches the airport's latest METAR observation and computes wind components for each runway end. The response includes a RecommendedRunway — the runway end with the lowest crosswind that also has a headwind (not a tailwind).
Sign Conventions
CrosswindKt— positive = wind from the right, negative = wind from the left
HeadwindKt— positive = headwind (favorable), negative = tailwind (unfavorable)
If the METAR reports variable wind (VRB), IsVariableWind is true and crosswind components are calculated using the full wind speed for all runway ends. If gusts are reported, separate GustCrosswindKt and GustHeadwindKt fields show the worst-case gust components.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| icaoCodeOrIdent* | path | string | ICAO code (e.g., KDFW) or FAA identifier (e.g., DFW) |
Response Schema
ICAO code or identifier of the airport
Wind direction in degrees from METAR (null if variable)
Wind speed in knots from METAR
Wind gust speed in knots from METAR (if reported)
Whether the wind was reported as variable (VRB)
Raw METAR text for reference
METAR observation time
Recommended runway end identifier (lowest crosswind with headwind)
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.
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.
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.