The great-circle distance between two points in km
distanceThe great-circle distance between two points in km and miles, the initial bearing and the midpoint. Each point is a lat,lon pair or a place name (geocoded with OpenStreetMap data, ODbL). Straight-line distance only, not a route. Takes about 13 s; allow a 30 s timeout. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from": "<from>",
"to": "<to>"
},
"name": "distance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | lat,lon or a place name | |
| from | Yes | lat,lon or a place name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| source | No | ||
| midpoint | No | ||
| checkedAt | No | ||
| distanceKm | No | ||
| distanceMiles | No | ||
| initialBearingDeg | No |