Airspace
GET
/api/v1/airspaces/by-citiesPrivate PilotGet By City
Gets controlled airspaces filtered by city name.
Code Examples
curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/airspaces/by-cities?cities=value&limit=25"curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/airspaces/by-cities?cities=value&limit=25"Description
GET /api/v1/airspaces/by-cities?cities=Dallas — airspaces for Dallas
GET /api/v1/airspaces/by-cities?cities=Dallas,Houston — multiple citiesReturns paginated results of AirspaceDto
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| cities | query | string | Comma-separated city names (e.g., Dallas or Dallas,Houston) |
| cursor | query | string? | Opaque cursor value from a previous response's pagination.nextCursor field. Omit or leave null to start from the first page. |
| limit | query | integer | Maximum number of items to return per page. Minimum 1, maximum 500, default 100. |
Response Schema
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.