Resolve any airport identifier to its canonical ICAO/IATA/LID code via FlightAware, pay-per-request at $0.002.
What it does
This endpoint is part of StableTravel's FlightAware airport suite. Given an airport identifier (IATA, ICAO, or LID code) in the URL path parameter `:id`, it returns the canonical airport code along with its ICAO, IATA, and LID variants. This is useful for normalizing airport codes across different naming conventions before passing them to other flight or airport endpoints.
The endpoint is a simple GET request with no query parameters beyond the path parameter. It costs $0.002 per call, paid automatically via the MPP (Tempo) or x402 micropayment protocol — no API keys or subscriptions required. Payment settles in pathUSD on Tempo (chain ID 4217). The response is a JSON object containing `airport_code`, `code_icao`, `code_iata`, and `code_lid` fields.
StableTravel proxies FlightAware's AeroAPI data. The full OpenAPI 3.1 spec is published at `/openapi.json` and interactive docs are at `/docs`. The endpoint is confirmed live — it returns a 402 MPP payment challenge to unauthenticated callers, which is the expected behavior for the MPP protocol.
Capabilities
Use cases
- —Normalize an IATA code (e.g. JFK) to its ICAO equivalent (KJFK) before calling other aviation APIs
- —Validate and disambiguate airport identifiers received from user input
- —Pre-process airport codes in a multi-step travel booking workflow
- —Map between FAA LID codes and international IATA/ICAO codes
Fit
Best for
- —AI agents that need to normalize airport codes across different systems
- —Travel automation pipelines that ingest mixed IATA/ICAO/LID identifiers
- —Developers building flight-tracking or airport-info features without managing FlightAware API keys
Not for
- —Bulk export of all airport codes (use the /api/flightaware/airports list endpoint instead)
- —Searching airports by name or location (use /api/flightaware/airports/nearby or /api/reference/locations)
Quick start
npx agentcash fetch "https://stabletravel.dev/api/flightaware/airports/JFK/canonical"Example
Response
{
"code_lid": "JFK",
"code_iata": "JFK",
"code_icao": "KJFK",
"airport_code": "KJFK"
}Endpoint
Quality
Full OpenAPI 3.1 schema with response shape, clear pricing ($0.002/call), live 402 MPP challenge confirmed, and comprehensive guidance docs. No example response from an actual paid call was captured, so the example response is inferred from the schema.
Warnings
- —Example response is inferred from the OpenAPI schema, not from an actual API call.
- —The path parameter :id is documented in the OpenAPI spec as a static path segment '/api/flightaware/airports/id/canonical' — the actual endpoint uses a path parameter substitution pattern.
Citations
- —Endpoint price is $0.002 per callhttps://stabletravel.dev/openapi.json
- —Response schema includes airport_code, code_icao, code_iata, code_lidhttps://stabletravel.dev/openapi.json
- —Payment settles via MPP method tempo on chain ID 4217 (pathUSD)https://stabletravel.dev/openapi.json
- —No API keys needed; payment via USDC on Base, Solana, or Tempo serves as authenticationhttps://stabletravel.dev
- —Endpoint is live and returns 402 MPP payment challengehttps://stabletravel.dev/api/flightaware/airports/:id/canonical