# Airport Code Lookup

> Airport Code Lookup is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-28).

Resolves an IATA-3 or ICAO-4 airport code to the airport's full name and both code formats

## Facts

- Endpoint: POST https://x402.agentutility.ai/airport-code-lookup?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/airport-code-lookup-e831b982
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tSUgxnavLRoHT00CbqovG

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 airport-code-lookup-e831b982 -d '<json body>'
```

Example prompt: What airport does the code LHR refer to? Give me its full name and both the IATA and ICAO codes.

## When to prefer this

Use this endpoint when you need to resolve a specific IATA-3 or ICAO-4 airport code to its full name or cross-reference between IATA and ICAO formats. It is ideal for enriching flight data, validating codes on booking flows, or displaying human-readable airport names from raw code strings. Prefer this over a general search API when you already have a specific code and just need its details.

## Known failure modes

- Unknown or invalid airport code returns no airport data or an error
- Providing a city name instead of a code may return no results
- Codes longer than 4 characters or shorter than 3 characters may be rejected
- Ambiguous partial codes may not match any airport

## How this service works

817 pay-per-call APIs for AI agents. Every endpoint is POST /<name> and is payable in USDC over x402 on Base and Solana — no signup, no API key, just pay-per-call. GET https://x402.agentutility.ai/ returns the same catalog as machine-readable JSON.

## Output

Returns a JSON object with the queried code, the airport's IATA 3-letter code, its ICAO 4-letter code, and the full official airport name (e.g. {query: 'SFO', airport: {iata: 'SFO', icao: 'KSFO', name: 'San Francisco International Airport'}}).

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "IATA-3 (e.g. 'SFO', 'JFK', 'LHR') or ICAO-4 (e.g. 'KSFO', 'KJFK', 'EGLL') airport code. Case-insensitive."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "query": {
       "type": "string"
      },
      "airport": {
       "type": "object",
       "properties": {
        "iata": {
         "type": "string"
        },
        "icao": {
         "type": "string"
        },
        "name": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "SFO",
  "airport": {
   "iata": "SFO",
   "icao": "KSFO",
   "name": "San Francisco International Airport"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/airport-code-lookup-e831b982/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
