PIREPs
GET/api/v1/pireps/airport/{icaoCodeOrIdent}Private Pilot

Search Near Airport

Searches for PIREPs near an airport. Looks up the airport coordinates by ICAO code or FAA identifier, then returns pilot reports within the specified radius.

Code Examples

curl \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://api.preflightapi.io/api/v1/pireps/airport/KJFK?limit=25&radiusNm=10"

Description

Accepts both ICAO codes and FAA identifiers. If the exact identifier is not found, the API automatically tries the alternate format (e.g., KW05 resolves to W05, DFW resolves to KDFW).

GET /api/v1/pireps/airport/KDFW — default 50 NM radius
GET /api/v1/pireps/airport/DFW?radiusNm=100 — custom radius with FAA identifier
GET /api/v1/pireps/airport/KW05 — resolves to FAA identifier W05

Returns paginated results of PirepDto

Parameters

NameInTypeDescription
icaoCodeOrIdent*pathstringICAO code or FAA identifier (e.g., KDFW, DFW). Case-insensitive. Automatically resolves ICAO/FAA format mismatches.
cursorquerystring?Opaque cursor value from a previous response's pagination.nextCursor field. Omit or leave null to start from the first page.
limitqueryintegerMaximum number of items to return per page. Minimum 1, maximum 500, default 100.
radiusNmquerynumberSearch radius in nautical miles (default 50, max 500)

Response Schema

200Returns the PIREPs foundPaginatedResponseOfPirepDto
400If the radius is invalid or the airport has no coordinates on recordApiErrorResponse
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.

404If the airport is not foundApiErrorResponse
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