Catalog/maps-geohash

Maps

Geohash encode / decode API

Encode a lat/lon to a base32 geohash at a chosen precision, or decode a geohash to its bounding box, center, error margins and the 8 neighbouring cells — the bit-interleaving base32 math LLMs get wrong, computed deterministically. Answers 'what is the geohash for these coordinates', 'decode this geohash to lat/lon', 'what are the neighbouring geohash cells', 'bounding box of geohash u4pruydqqvj'.

Price$0.01per request
MethodPOST
Route/v1/maps/geohash
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
mapsgeohashgeocodebase32geospatialcoordinatesencodedecode
API URLhttps://x402.hexl.dev/v1/maps/geohash
Integration docs
Example request
{
  "op": "encode",
  "latitude": 37.7749,
  "longitude": -122.4194,
  "precision": 7
}
Example response
{
  "op": "encode",
  "latitude": 37.7749,
  "longitude": -122.4194,
  "precision": 7,
  "geohash": "9q8yyk8",
  "neighbors": {
    "n": "9q8yykb",
    "s": "9q8yyk2",
    "e": "9q8yyk9",
    "w": "9q8yyhx",
    "ne": "9q8yykc",
    "nw": "9q8yyhz",
    "se": "9q8yyk3",
    "sw": "9q8yyhr"
  }
}
Input schema
{
  "type": "object",
  "required": [],
  "properties": {
    "op": {
      "type": "string",
      "enum": [
        "encode",
        "decode"
      ],
      "examples": [
        "encode"
      ]
    },
    "latitude": {
      "type": "number",
      "examples": [
        37.7749
      ]
    },
    "longitude": {
      "type": "number",
      "examples": [
        -122.4194
      ]
    },
    "precision": {
      "type": "integer",
      "examples": [
        7
      ]
    },
    "geohash": {
      "type": "string",
      "examples": [
        "9q8yyk8"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}