# US Geography: Great-Circle Distance Between Two Coordinates

> US Geography: Great-Circle Distance Between Two Coordinates is a paid API for AI agents from geo-us.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates the haversine great-circle distance between two lat/lon coordinates in km, miles, and nautical miles, plus initial bearing and geographic midpoint.

## Facts

- Endpoint: GET https://geo-us.x402tookit.com/coord-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/us-geography-great-circle-distance-between-two-coordinates-51b3abcf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pTiHIDF1SS_LBwk_C_86L

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 us-geography-great-circle-distance-between-two-coordinates-51b3abcf
```

Example prompt: What's the straight-line distance between coordinates 40.7128°N, 74.0060°W (New York City) and 34.0522°N, 118.2437°W (Los Angeles) — give me kilometers, miles, nautical miles, the compass bearing, and the midpoint?

## When to prefer this

Choose this endpoint when you need a fast, accurate geodetic distance between two arbitrary lat/lon coordinate pairs, especially when you also want bearing and midpoint data in a single call. Prefer it over geocoding-then-distance pipelines when you already have coordinates. It is purpose-built for point-to-point great-circle calculations rather than routing or driving distances.

## Known failure modes

- Missing required query parameters (lat1, lon1, lat2, lon2) returns an error
- Out-of-range latitude (>90 or <-90) or longitude (>180 or <-180) may cause computation error
- Identical coordinates return zero distance and undefined bearing
- Payment failure via x402 protocol returns 402 status before computation
- Network timeout on the remote service returns no result

## How this service works

Great-circle (haversine) distance between two coordinates in km, miles and nautical miles, with bearing and midpoint.

## Output

Returns the haversine great-circle distance in kilometers, miles, meters, and nautical miles; the initial bearing in degrees along with a compass direction string (e.g. 'NE'); and the geographic midpoint as a lat/lon object. Also includes a summary string, source attribution, and optional disclaimer or degraded-service flags.

## 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": [
      "lat1",
      "lon1",
      "lat2",
      "lon2"
     ],
     "properties": {
      "lat1": {
       "type": "number",
       "description": "Latitude of point 1"
      },
      "lat2": {
       "type": "number",
       "description": "Latitude of point 2"
      },
      "lon1": {
       "type": "number",
       "description": "Longitude of point 1"
      },
      "lon2": {
       "type": "number",
       "description": "Longitude of point 2"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "miles": {
       "type": [
        "null",
        "number"
       ]
      },
      "meters": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "compass": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "midpoint": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "lat": {
         "type": [
          "null",
          "number"
         ]
        },
        "lon": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "kilometers": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-geography-great-circle-distance-between-two-coordinates-51b3abcf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from geo-us.x402tookit.com](https://www.zero.xyz/host/geo-us.x402tookit.com/llms.txt)
