# FlightAware Airport Info by Code

> FlightAware Airport Info by Code is a paid API for AI agents from stabletravel.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-13).

Returns detailed information for a specific airport identified by its IATA or ICAO code, including location, elevation, timezone, and flight URL.

## Facts

- Endpoint: GET https://stabletravel.dev/api/flightaware/airports/MAD
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stabletravel-dev-65a8e662
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t0b_aDMArkJYV6XpneSOj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stabletravel-dev-65a8e662
```

Example prompt: What are the full details for Madrid Barajas airport — give me its coordinates, timezone, elevation, and ICAO code using FlightAware.

## When to prefer this

Use this endpoint when you need structured, authoritative airport metadata — especially coordinates, timezone, ICAO/IATA code cross-reference, or elevation — for a single known airport code. Prefer over general web search when you need machine-readable data for downstream flight or mapping logic.

## Known failure modes

- Invalid or unknown airport code returns an error or empty response
- Airport code format mismatch (e.g. passing wrong code type) may return null fields
- Network or upstream FlightAware API unavailability causes timeout or 5xx error
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Get detailed information for a specific airport by its code

## Output

A JSON object containing the airport's full name, city, state, country code, IATA code, ICAO code, latitude, longitude, elevation (in feet), timezone (IANA string), Wikipedia URL, a link to the airport's flights page, and any alternative airport identifiers.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {}
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "properties": {},
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "airport_code",
      "name"
     ],
     "properties": {
      "city": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "name": {
       "type": "string"
      },
      "type": {
       "type": "string"
      },
      "state": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "code_lid": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "latitude": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      },
      "timezone": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "wiki_url": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "code_iata": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "code_icao": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "elevation": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      },
      "longitude": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      }
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stabletravel-dev-65a8e662/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stabletravel.dev](https://www.zero.xyz/host/stabletravel.dev/llms.txt)
