# Coordinates & Distance API

Distance, midpoint and bearing between coordinates.

| Field | Value |
| --- | --- |
| Provider | APIStead Labs |
| Category | Weather & Geospatial |
| Networks | Base |
| Price | $0.001 per call |
| Base URL | https://apistead.qd.je/api/v1 |
| Verification | verified (1/1 routes) |
| Last verified | 2026-11-13T13:52:15.489Z |
| Receipt | https://basescan.org/tx/0x890aa1ed1cc3531c8e2d69a6f1d74acc3473a2db6dadc1665027c78037ea7164 |
| JSON | https://x402.apistead.qd.je/api/apis/coordinates-distance-api |
| Markdown | https://x402.apistead.qd.je/api/apis/coordinates-distance-api/md |
| MCP | https://apistead.qd.je/mcp |
| API reference | https://x402.apistead.qd.je/api |
| OpenAPI | https://x402.apistead.qd.je/openapi.json |

## For AI agents

Calculate great-circle distance, midpoint and bearing between two coordinate pairs.

## Scope

Straight-line geometry only. Does not route, account for roads, traffic, elevation or travel time.

## Agent intents

- calculate distance between coordinates
- find the midpoint between two points
- get bearing between two locations
- measure a straight-line distance

Agents often need a straightforward geometric answer without a full mapping stack: how far apart are two points, what is the midpoint, what bearing should a route start on?

This API returns all three in one call, with kilometres, miles and nautical miles. It is pure math, so it is fast, cache-friendly and inexpensive to verify.

## Endpoints

### GET /distance?from={lat},{lon}&to={lat},{lon}

Great-circle distance, midpoint and initial bearing.

- URL: https://apistead.qd.je/api/v1/distance?from={lat},{lon}&to={lat},{lon}
- Price: $0.001 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.593Z
- Latency: 4 ms
- Uptime (30d): 86.87%

Example request:

```http
GET https://apistead.qd.je/api/v1/distance?from=51.5074,-0.1278&to=40.7128,-74.0060
```

Example response:

```json
{
  "to": {
    "lat": 40.7128,
    "lon": -74.006
  },
  "from": {
    "lat": 51.5074,
    "lon": -0.1278
  },
  "midpoint": {
    "lat": 52,
    "lon": -37
  },
  "distance_km": 5570.2,
  "distance_miles": 3461.2,
  "initial_bearing_deg": 288.4,
  "distance_nautical_miles": 3007.7
}
```

## Payment

Every paid route uses x402 over HTTP. Call the route without payment to receive a 402 challenge, then pay the quoted USDC amount and retry. The 402 challenge is the authoritative source for price, asset, network and pay-to address. Reading this record and the discovery API is free.

- Protocol: x402 v2
- Asset: USDC
- Networks: Base
- Price: $0.001 per call

## Verification

- State: verified
- Routes verified: 1/1
- Last verified: 2026-11-13T13:52:15.489Z
- Receipt: https://basescan.org/tx/0x890aa1ed1cc3531c8e2d69a6f1d74acc3473a2db6dadc1665027c78037ea7164

## Agent links

- JSON: https://x402.apistead.qd.je/api/apis/coordinates-distance-api
- Markdown: https://x402.apistead.qd.je/api/apis/coordinates-distance-api/md
- Routes: https://x402.apistead.qd.je/agent/routes?id=coordinates-distance-api
- Receipts: https://x402.apistead.qd.je/agent/receipts?id=coordinates-distance-api
- API reference: https://x402.apistead.qd.je/api
- MCP guide: https://x402.apistead.qd.je/mcp-docs
- Agent skill: https://x402.apistead.qd.je/skill
- OpenAPI: https://x402.apistead.qd.je/openapi.json
- MCP: https://apistead.qd.je/mcp
- Docs: https://apistead.qd.je/api


## Changelog

### 1.0.0 - Initial verified release

The route is live and settlement-verified on Base mainnet. Health checks, public receipts and agent-readable records are available.

release · 2026-11-11 · APIStead Labs
