# Airports Reference – Airport-to-Airport Distance Calculator

> Airports Reference – Airport-to-Airport Distance Calculator is a paid API for AI agents from airports-reference.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates the great-circle distance in km, miles, and nautical miles between two airports, plus a rough flight time estimate based on cruise speed.

## Facts

- Endpoint: GET https://airports-reference.x402tookit.com/airport-distance?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/airports-reference-airport-to-airport-distance-calculator-ee4a9477
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vWUOOGOhul4n92e_-y9yT

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 airports-reference-airport-to-airport-distance-calculator-ee4a9477
```

Example prompt: What's the great-circle distance between JFK and LHR, and roughly how long would the flight take at a cruise speed of 900 km/h?

## When to prefer this

Use this endpoint when you need a precise great-circle distance between two specific airports (by IATA, ICAO, or name) along with a flight time estimate. It is the right choice when you already know both airport identifiers and need a quick, structured distance result in multiple units. Prefer this over general geospatial distance APIs when you specifically need airport-aware lookups with aviation context (codes, scheduled service, elevation) included in the response.

## Known failure modes

- Unknown or unresolvable airport code/name returns null airport object
- Invalid or out-of-range speedKmh value may return an error or use default
- Fuzzy name matching may resolve to wrong airport if name is ambiguous
- Missing required 'from' or 'to' query params returns a validation error
- Network timeout or service unavailability returns a 5xx error

## How this service works

Great-circle distance in km, miles and nautical miles between two airports, with a rough flight time estimate.

## Output

Returns a JSON object containing the resolved metadata for both the origin and destination airports (IATA, ICAO, name, lat/lon, country, region, elevation, municipality, scheduled service), the great-circle distance expressed in kilometers, miles, and nautical miles, an estimated flight time based on the specified or default cruise speed (850 km/h), and a timestamp for when the data was computed.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Destination airport: IATA, ICAO or name"
      },
      "from": {
       "type": "string",
       "description": "Origin airport: IATA, ICAO or name"
      },
      "speedKmh": {
       "type": "integer",
       "description": "Assumed average cruise speed 300 to 1000 km/h (default 850)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "to": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "lat": {
         "type": [
          "null",
          "number"
         ]
        },
        "lon": {
         "type": [
          "null",
          "number"
         ]
        },
        "iata": {
         "type": [
          "null",
          "string"
         ]
        },
        "icao": {
         "type": [
          "null",
          "string"
         ]
        },
        "name": {
         "type": [
          "null",
          "string"
         ]
        },
        "type": {
         "type": [
          "null",
          "string"
         ]
        },
        "ident": {
         "type": [
          "null",
          "string"
         ]
        },
        "region": {
         "type": [
          "null",
          "string"
         ]
        },
        "country": {
         "type": [
          "null",
          "string"
         ]
        },
        "elevationM": {
         "type": [
          "null",
          "number"
         ]
        },
        "regionName": {
         "type": [
          "null",
          "string"
         ]
        },
        "countryName": {
         "type": [
          "null",
          "string"
         ]
        },
        "elevationFt": {
         "type": [
          "null",
          "number"
         ]
        },
        "municipality": {
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/airports-reference-airport-to-airport-distance-calculator-ee4a9477/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from airports-reference.x402tookit.com](https://www.zero.xyz/host/airports-reference.x402tookit.com/llms.txt)
