# Geo Calc – Geohash Encode

> Geo Calc – Geohash Encode is a paid API for AI agents from geo-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Encodes a latitude/longitude coordinate as a geohash string (1–12 characters) and returns the cell bounds, center point, and cell dimensions in meters.

## Facts

- Endpoint: GET https://geo-calc.x402tookit.com/geohash-encode?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geo-calc-geohash-encode-f94e1794
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HhUwXQEEoLwYOrmCeJKSY

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-calc-geohash-encode-f94e1794
```

Example prompt: Encode latitude 40.7128, longitude -74.0060 as a geohash with precision 9 and tell me the cell bounds and size in meters.

## When to prefer this

Use this endpoint when you need to convert a raw WGS84 coordinate into a compact geohash string for spatial indexing, proximity bucketing, or storage, and you also need the cell bounds and cell dimensions in meters. Prefer it over decode or neighbor endpoints when the starting point is a lat/lon pair rather than an existing geohash.

## Known failure modes

- Latitude out of range (-90 to 90) returns an error
- Longitude out of range (-180 to 180) returns an error
- Precision value outside 1–12 returns an error
- Missing required lat or lon parameters returns a 400-level error
- Network or payment (x402) failure prevents the response

## How this service works

Encode latitude/longitude as a geohash (1 to 12 characters) with the cell bounds, center and size in meters.

## Output

Returns the geohash string for the given coordinate at the requested precision, together with the cell's north/south/east/west bounds, the center latitude and longitude, cell width and height in meters, and the latitude/longitude error in degrees.

## 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": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude in degrees, -90 to 90"
      },
      "lon": {
       "type": "number",
       "description": "Longitude in degrees, -180 to 180"
      },
      "precision": {
       "type": "integer",
       "description": "Characters, 1 to 12 (default 9)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "bounds": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "east": {
         "type": [
          "null",
          "number"
         ]
        },
        "west": {
         "type": [
          "null",
          "number"
         ]
        },
        "north": {
         "type": [
          "null",
          "number"
         ]
        },
        "south": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "geohash": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "centerLat": {
       "type": [
        "null",
        "number"
       ]
      },
      "centerLon": {
       "type": [
        "null",
        "number"
       ]
      },
      "precision": {
       "type": [
        "null",
        "number"
       ]
      },
      "ce
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geo-calc-geohash-encode-f94e1794/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from geo-calc.x402tookit.com](https://www.zero.xyz/host/geo-calc.x402tookit.com/llms.txt)
