# geo-bearing

> geo-bearing is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Computes the compass bearing (in degrees) from one geographic coordinate to another

## Facts

- Endpoint: GET https://x402.agentindex.world/geo/bearing?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geo-bearing-4c128ba6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zM25bBPvruoWO9Y2WCsBh

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 geo-bearing-4c128ba6
```

Example prompt: What's the compass bearing from coordinates 40.7128° N, 74.0060° W to 51.5074° N, 0.1278° W?

## When to prefer this

Use this endpoint when you need a precise geodetic bearing calculation between two coordinates in a pay-per-call model without setting up your own geospatial infrastructure. It is ideal for AI agents performing navigation tasks, route planning, or orientation queries where a single bearing value is sufficient and cost must be minimized per call.

## Known failure modes

- Missing required lat/lon parameters returns an error or zero bearing
- Values outside valid ranges (lat >90 or <-90, lon >180 or <-180) may be rejected
- Identical start and end coordinates may return 0 or undefined bearing
- Payment failure via x402 returns HTTP 402 before any computation occurs

## How this service works

Initial compass bearing (0-360 degrees, clockwise from true north) from point 1 to point 2.

## Output

Returns a JSON object with a single field `bearing_deg` containing the compass bearing in decimal degrees (0–360) from the first coordinate to the second, measured clockwise from true north.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat1": {
   "type": "number",
   "title": "Lat1",
   "maximum": 90,
   "minimum": -90
  },
  "lat2": {
   "type": "number",
   "title": "Lat2",
   "maximum": 90,
   "minimum": -90
  },
  "lon1": {
   "type": "number",
   "title": "Lon1",
   "maximum": 180,
   "minimum": -180
  },
  "lon2": {
   "type": "number",
   "title": "Lon2",
   "maximum": 180,
   "minimum": -180
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bearing_deg": 337.9043
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geo-bearing-4c128ba6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
