# FastX402 Geohash Encoder/Decoder

> FastX402 Geohash Encoder/Decoder is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-19).

Encodes latitude/longitude coordinates into a geohash string or decodes a geohash back into coordinates and bounding box

## Facts

- Endpoint: GET https://fastx402.tools/geohash?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-geohash-encoder-decoder-38679a20
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AuEimH7CgJYCNZMlUwNBI

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 fastx402-geohash-encoder-decoder-38679a20
```

Example prompt: Convert the coordinates 41.00853, 28.9785 to a geohash with precision 7.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call geohash encode/decode operation with no account setup. Ideal for AI agents needing on-demand coordinate-to-geohash conversion in geospatial pipelines, proximity matching, or location indexing workflows without maintaining API credentials.

## Known failure modes

- Missing both lat/lon and geohash — returns error because neither encode nor decode operation can be performed
- Precision out of range (not 1–12) — may return error or use default
- Invalid geohash characters — decode will fail with an error response
- Payment not included or insufficient — returns HTTP 402 requiring USDC payment via x402 protocol

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object with the decoded or encoded result: a geohash string, the center latitude and longitude as numbers, and a bounding box with min/max lat and lon values defining the rectangular cell the geohash represents.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "lat": {
       "type": "string",
       "description": "Latitude, to encode"
      },
      "lon": {
       "type": "string",
       "description": "Longitude, to encode"
      },
      "geohash": {
       "type": "string",
       "description": "Geohash to decode"
      },
      "precision": {
       "type": "string",
       "description": "Geohash length 1-12 (default 9)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "lat": {
       "type": "number"
      },
      "lon": {
       "type": "number"
      },
      "bbox": {
       "type": "object",
       "properties": {
        "max_lat": {
         "type": "number"
        },
        "max_lon": {
         "type": "number"
        },
        "min_lat": {
         "type": "number"
        },
        "min_lon": {
         "type": "number"
        }
       }
      },
      "geohash": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lat": 41.00853,
  "lon": 28.9785,
  "bbox": {
   "max_lat": 41.009216,
   "max_lon": 28.979187,
   "min_lat": 41.007843,
   "min_lon": 28.977814
  },
  "geohash": "sxk973m"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-geohash-encoder-decoder-38679a20/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
