---
id: "geohash"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 75
url: "http://registry.apicrafter.io/datatype/geohash"
---

# Geohash (`geohash`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Geohash, a geocode invented by Gustavo Niemeyer in 2008. It interleaves the bits of longitude and latitude and writes them in a base-32 alphabet of digits and lowercase letters without a, i, l and o. Each added character makes the rectangle smaller, and codes with a common prefix are usually close to each other. The regexp allows 1 to 12 characters, the precision range of common implementations such as Elasticsearch; short values look like ordinary words and numbers.

- Personal data (PII): no
- Categories: Geographic identifiers (geo)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[0-9b-hjkmnp-z]{1,12}$
```

## Examples

- `u4pruydqqvj` — Point near the tip of Jutland, Denmark (example in Wikipedia)
- `ezs42` — Worked decoding example in Wikipedia
- `u4pruydqqva` (invalid example) — The letter a is not in the alphabet
- `u4pruydqqvjuu` (invalid example) — Thirteen characters

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Geohash>
- doc: <https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/geohash.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/geohash.yaml>
