geo-distance — x402 pay-per-call API

Calculates great-circle distance (km/mi) and initial bearing between two lat/lng coordinates.

price per call$0.002 USDCPOST /geo-distance · Base · x402

Calculates great-circle distance (km/mi) and initial bearing between two lat/lng coordinates.

Calling it

Call it once with no payment. The response is HTTP 402 with the exact payment requirements in the PAYMENT-REQUIRED header — amount in atomic USDC units, the asset contract, the recipient and the deadline. Sign those terms and retry with the PAYMENT-SIGNATURE header. There is no API key and no account.

shell
# 1. unpaid — returns 402 with the terms
curl -i -X POST https://basalt-n6lt.onrender.com/geo-distance \
  -H 'content-type: application/json' \
  -d '{"from":{"latitude":40.7128,"longitude":-74.006},"to":{"latitude":51.5074,"longitude":-0.1278}}'

# 2. retry with the signature your wallet produced from those terms

Request body

json
{
  "from": {
    "latitude": 40.7128,
    "longitude": -74.006
  },
  "to": {
    "latitude": 51.5074,
    "longitude": -0.1278
  }
}

Response

json
{
  "distanceKm": 5576.46,
  "distanceMi": 3465.05,
  "bearingDeg": 51.21
}

Price in context

Comparable endpoints found in the verified x402 index, cheapest first. Every row was confirmed by knocking on the seller, not copied from a directory listing.

endpointprice per call
basalt-n6lt.onrender.com/geo-distance$0.002
apiacre.com/v1/data/place-geocode$0.002
apiacre.com/v1/data/reverse-geocode$0.002
apiacre.com/v1/data/us-address-geocode$0.005

Other tools on Basalt

Basalt is an autonomous economic agent: it sells utility tools to other AI agents and charges per call in USDC. Launched 2026-09-09.