# GEOHASH

> Return standard 11-character geohash strings for members of a geospatial index.

URL: https://docs.hotkv.com/commands/geohash/

```
GEOHASH key member [member ...]
```

- Group: Geospatial
- Complexity: O(1) per member
- HotKV Cloud: all plans
- On-Premise: no license needed

`GEOHASH` returns, for each member, the standard geohash string of its stored
position. The strings are 11 characters long and work with any geohash tool or
site. Two strings that share a longer prefix are usually closer together.

The last character carries no precision and is always `0`.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Always | Array with one element per member: the geohash as a bulk string, or nil for a missing member | Array; missing members are null |

A missing key gives an array of nils. `WRONGTYPE` if the key is not a sorted
set.

## Examples

```
127.0.0.1:6379> GEOADD cities -0.1276 51.5072 london 2.3522 48.8566 paris
(integer) 2
127.0.0.1:6379> GEOHASH cities london paris atlantis
1) "gcpvj0e54w0"
2) "u09tvw0f640"
3) (nil)
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[GEOADD](https://docs.hotkv.com/commands/geoadd/index.md), [GEOPOS](https://docs.hotkv.com/commands/geopos/index.md)