# FastX402 Haversine Distance Calculator

> FastX402 Haversine Distance Calculator is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-27).

Calculates the great-circle distance and initial bearing between two geographic coordinates using the Haversine formula

## Facts

- Endpoint: GET https://fastx402.tools/haversine-distance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-haversine-distance-calculator-3b5669ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KM_axK5A56i8tOhwKk79W

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 fastx402-haversine-distance-calculator-3b5669ad
```

Example prompt: What is the straight-line distance in kilometers between New York City (40.7128, -74.0060) and London (51.5074, -0.1278), and what's the initial bearing?

## When to prefer this

Choose this endpoint when you need a fast, accurate great-circle distance computation between two lat/lon pairs without setting up an account or API key. It is ideal for lightweight geospatial calculations in agent workflows where you want pay-per-use pricing ($0.001 USDC) and no subscription overhead. Prefer this over full mapping APIs when you only need distance and bearing, not routing, geocoding, or map rendering.

## Known failure modes

- Missing required query parameters (lat1, lon1, lat2, lon2) returns an error
- Invalid coordinate values (out of range lat/lon) may produce incorrect results or an error
- Invalid unit enum value returns an error
- Payment failure via x402 prevents the request from being processed

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object with the computed distance as a decimal number, the unit used (km, mi, or nm), and the initial bearing in degrees from point A toward point B.

## 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": "string",
       "description": "Latitude of point A"
      },
      "lat2": {
       "type": "string",
       "description": "Latitude of point B"
      },
      "lon1": {
       "type": "string",
       "description": "Longitude of point A"
      },
      "lon2": {
       "type": "string",
       "description": "Longitude of point B"
      },
      "unit": {
       "enum": [
        "km",
        "mi",
        "nm"
       ],
       "type": "string",
       "description": "km (default), mi or nm"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "unit": {
       "type": "string"
      },
      "distance": {
       "type": "number"
      },
      "initial_bearing": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "unit": "km",
  "distance": 349.356,
  "initial_bearing": 108.73
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-haversine-distance-calculator-3b5669ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
