Geolocation Utilities

Geohash Decode

Converts geohash strings back to latitude/longitude coordinates with precision bounds. Use via MCP in Cursor or Windsurf, or call GET /v1/geo/geohash-decode with the geohash parameter. Returns exact center coordinates plus bounding box — "9q5" decodes to approximately 37.265625, -121.640625 with ±2.8° precision.

API Endpoint

GET /v1/geo/geohash-decode

Code Examples

curl "https://tinyfn.io/v1/geo/geohash-decode" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/geo/geohash-decode', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/geo/geohash-decode',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's geolocation tools:

{
  "mcpServers": {
    "tinyfn-geo": {
      "url": "https://tinyfn.io/mcp/geo",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I decode a geohash to get latitude and longitude?

Send the geohash string to the decode endpoint. It returns the center coordinates and bounding box with precision bounds based on the geohash length.

What's the difference between center coordinates and bounding box in geohash decoding?

Center coordinates are the exact midpoint of the geohash region. The bounding box shows the full area that geohash represents, with lat/lon min/max values.

How does geohash precision affect decoded coordinates accuracy?

Longer geohashes decode to smaller areas. A 5-character geohash covers ~4.9km × 4.9km, while 8 characters covers ~38m × 19m.

Can I use geohash decode in MCP tools for location-based AI workflows?

Yes, Claude Code and other MCP clients can decode geohashes to get precise coordinates for mapping, distance calculations, or geographic analysis tasks.

What happens if I try to decode an invalid geohash string?

Invalid geohashes containing non-base32 characters or malformed strings will return an error. Only characters 0-9 and b,c,f,g,h,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z are valid.

Try Geohash Decode Now

Get your free API key and start using Geohash Decode in seconds.

Get Free API Key