E6B Flight Computer
GET/api/v1/e6b/crosswind/{icaoCodeOrIdent}Commercial Pilot

Get 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"

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

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

Response Schema

200Returns crosswind data for all runways with a recommended runwayAirportCrosswindResponseDto
airportIdentifierstring

ICAO code or identifier of the airport

windDirectionDegreesintegernullable

Wind direction in degrees from METAR (null if variable)

windSpeedKtinteger

Wind speed in knots from METAR

windGustKtintegernullable

Wind gust speed in knots from METAR (if reported)

isVariableWindboolean

Whether the wind was reported as variable (VRB)

rawMetarstringnullable

Raw METAR text for reference

observationTimestringnullable

METAR observation time

recommendedRunwaystringnullable

Recommended runway end identifier (lowest crosswind with headwind)

400The METAR is missing wind direction or wind speed dataApiErrorResponse
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.

404The airport was not found, or no current METAR is available for this 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.

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