# Duo Data Utilities – Geodesic Distance & Navigation

> Duo Data Utilities – Geodesic Distance & Navigation is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Computes geodesic distance (Vincenty/haversine), initial and final bearing, midpoint, and destination point between WGS-84 coordinates, plus cumulative path length, in metres, km, nautical miles, and miles.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/geo/distance?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-geodesic-distance-navigation-1be1b1c0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sUb6ZBcl1F5T8vKhXkY-F

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 duo-data-utilities-geodesic-distance-navigation-1be1b1c0
```

Example prompt: What's the geodesic distance and initial bearing from London (51.5074, -0.1278) to New York (40.7128, -74.0060) using Vincenty? Also give me the midpoint.

## When to prefer this

Choose this endpoint when you need precise ellipsoidal (WGS-84) geodesic computations — especially Vincenty accuracy for long-distance navigation, aviation, or maritime routing. Prefer it over simple flat-earth or haversine-only services when accuracy over thousands of kilometres matters, or when you need bearings, midpoints, and destination points together in one call with multi-unit output.

## Known failure modes

- Missing required lat1/lon1/lat2/lon2 for distance or midpoint operations returns a validation error
- Vincenty algorithm fails to converge for nearly antipodal points — haversine fallback is used automatically
- Invalid or out-of-range coordinate values (e.g. latitude > 90) return a 400 error
- Path string malformed or exceeds 200 points returns a validation error
- Missing bearing or distance_m for op=destination returns a parameter error

## How this service works

Distance and direction between WGS-84 coordinates: geodesic distance by Vincenty with a haversine fallback, initial and final bearing, the midpoint, and the destination point reached from a start point on a given bearing and distance. Also computes the cumulative length of a supplied coordinate path. Results in metres, kilometres, nautical miles and miles.

## Output

Returns a JSON object with an 'ok' flag, a 'data' object containing the computed results (distance in m/km/mi/nmi, midpoint lat/lon, initial and final bearings, convergence status for Vincenty), and a 'meta' object with request ID, timestamp, price, and disclaimer. The exact fields in 'data' vary by operation (distance, midpoint, destination, or path).

## 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": [],
     "properties": {
      "op": {
       "enum": [
        "distance",
        "destination",
        "midpoint",
        "path"
       ],
       "type": "string",
       "default": "distance",
       "maxLength": 64,
       "description": "distance (default), destination, midpoint or path."
      },
      "lat1": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "Start latitude."
      },
      "lat2": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "End latitude."
      },
      "lon1": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "Start longitude."
      },
      "lon2": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "End longitude."
      },
      "path": {
       "type": "string",
       "maxLength": 2048,
       "description": "Comma-separated lat,lon pairs for op=path, at most 200 points."
      },
      "method": {
       "enum": [
        "vincenty",
        "haversine"
       ],
       "type": "string",
       "default": "vincenty",
       "maxLength": 64,
       "description": "vincenty (default, WGS-84) or haversine."
      },
      "bearing": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "Initial bearing in degrees for op=destination."
      },
      "distance_m": {
       "type": "string",
       "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
       "maxLength": 64,
       "description": "Distance in metres for op=destination, 0 to 1e9 (about 25 Earth circumferences); larger values are 400 INVALID_PARAM."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "method": "vincenty",
   "distance": {
    "m": 5878232.354,
    "km": 5878.232354,
    "mi": 3652.564246,
    "nmi": 3173.991552
   },
   "midpoint": {
    "lat": 53.7242681,
    "lon": -39.60892324
   },
   "converged": true,
   "bearing_final": 228.8713,
   "bearing_initial": 290.8461
  },
  "meta": {
   "price_usd": "0.05",
   "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms",
   "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D",
   "computed_at": "2026-09-28T12:00:00.000Z",
   "deterministic": true
  },
  "route": "/v1/geo/distance",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-geodesic-distance-navigation-1be1b1c0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
