# Airport Distance & Flight Metrics Calculator

> Airport Distance & Flight Metrics Calculator is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-13).

Calculates great-circle distance, bearing, approximate flight time, and economy-class CO2 emissions between two airports identified by IATA or ICAO code.

## Facts

- Endpoint: POST https://api.vextorium.com/distancia-aeropuertos-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/airport-distance-flight-metrics-calculator-f72f0023
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c-594OCcB40QhHBUjQyWi

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-distance-flight-metrics-calculator-f72f0023 -d '<json body>'
```

Example prompt: How far is it from Madrid (MAD) to New York JFK, and roughly how long would the flight take and how much CO2 would each passenger emit?

## When to prefer this

Choose this endpoint when you need aviation-specific distance calculations between airports using standard IATA or ICAO codes, especially when you also need bearing, flight time estimates, or CO2 emissions data in a single call. Prefer it over generic geospatial distance APIs when working with named airports rather than raw coordinates.

## Known failure modes

- Unknown or invalid IATA/ICAO code returns an error or null airport data
- Closed or private airports with no regular flights may return vuelos_regulares: false
- Network timeouts may occur for slow upstream lookups
- Missing 'origen' or 'destino' fields result in a validation error

## How this service works

Great-circle distance between two airports by IATA or ICAO code in km, miles and nautical miles, bearing, approximate flight time and estimated economy-class CO2 per passenger.

## Output

Returns a JSON object with full metadata for both origin and destination airports (name, city, country, IATA/ICAO codes, coordinates, altitude, region, whether regular flights operate), plus the great-circle distance in km, miles, and nautical miles, the initial compass bearing in degrees, approximate flight time in hours, and estimated economy-class CO2 emissions per passenger in kg. Includes a note that real-world routes are typically 3–8% longer than the straight-line distance.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "origen": {
   "type": "string"
  },
  "destino": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "nota": "Distancia en línea recta; la ruta real suele ser un 3-8 % más larga. CO2 orientativo.",
  "origen": {
   "lat": 40.493407,
   "lon": -3.572249,
   "iata": "MAD",
   "icao": "LEMD",
   "pais": "ES",
   "tipo": "grande",
   "ciudad": "Madrid",
   "nombre": "Adolfo Suárez Madrid–Barajas Airport",
   "region": "ES-MD",
   "altitud_m": 609,
   "vuelos_regulares": true
  },
  "destino": {
   "lat": 40.639447,
   "lon": -73.779317,
   "iata": "JFK",
   "icao": "KJFK",
   "pais": "US",
   "tipo": "grande",
   "ciudad": "New York",
   "nombre": "John F. Kennedy International Airport",
   "region": "US-NY",
   "altitud_m": 4,
   "vuelos_regulares": true
  },
  "distancia_km": 5775.071,
  "distancia_millas": 3588.463,
  "rumbo_inicial_grados": 294.7,
  "tiempo_vuelo_aprox_h": 7.72,
  "co2_pasajero_kg_aprox": 686,
  "distancia_millas_nauticas": 3118.289
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/airport-distance-flight-metrics-calculator-f72f0023/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
