# geo-geohash

> geo-geohash 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-29).

Encodes a latitude/longitude coordinate into a geohash string at a specified precision (1–12 characters).

## Facts

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

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-geohash-82f0e7e1
```

Example prompt: Encode the coordinates 37.7749, -122.4194 (San Francisco) into a geohash string at precision 9.

## When to prefer this

Use this endpoint when you need a fast, cheap, pay-per-call geohash encoding with no API key setup — ideal for agents that occasionally need to encode coordinates into geohash strings without maintaining a subscription or library dependency. Prefer it over rolling your own geohash logic when operating in a serverless or agent environment.

## Known failure modes

- Latitude out of range (-90 to 90) returns a validation error
- Longitude out of range (-180 to 180) returns a validation error
- Precision outside 1–12 range returns a validation error
- Missing required lat or lon parameters returns a 422 or bad request error
- Payment failure results in 402 response before computation

## How this service works

Encode a lat/lon point into a geohash string (precision 1-12 characters).

## Output

Returns a geohash string of the requested precision (1–12 characters) that encodes the given latitude and longitude into a compact alphanumeric representation suitable for proximity indexing, clustering, or storage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "title": "Lat",
   "maximum": 90,
   "minimum": -90
  },
  "lon": {
   "type": "number",
   "title": "Lon",
   "maximum": 180,
   "minimum": -180
  },
  "precision": {
   "type": "integer",
   "title": "Precision",
   "default": 9,
   "maximum": 12,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "geohash": "u09tvw0g2"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geo-geohash-82f0e7e1/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)
