# GEORADIUSBYMEMBER_RO

> Read-only form of GEORADIUSBYMEMBER, without the STORE options.

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

```
GEORADIUSBYMEMBER_RO key member radius <M | KM | FT | MI> [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC | DESC]
```

- Group: Geospatial
- Complexity: O(N + log M), N being the members in the area searched
- HotKV Cloud: all plans
- On-Premise: no license needed
- Deprecated: use GEOSEARCH instead

`GEORADIUSBYMEMBER_RO` works like
[GEORADIUSBYMEMBER](https://docs.hotkv.com/commands/georadiusbymember/index.md) but is flagged as a
read-only command, so it runs on read-only replicas and in read-only scripts.
It does not accept `STORE` or `STOREDIST`.

New code should use [GEOSEARCH](https://docs.hotkv.com/commands/geosearch/index.md) with `FROMMEMBER` and
`BYRADIUS`.

## Options

`WITHCOORD`, `WITHDIST`, `WITHHASH`, `COUNT count [ANY]`, `ASC` and `DESC`, as
for GEORADIUS.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Matches | Array of members, or of arrays with the extra fields | Same; coordinates are doubles |
| No such key | Empty array | Empty array |

`STORE` or `STOREDIST` reply `ERR syntax error`. A member that is not in a
non-empty set replies `ERR could not decode requested zset member`. Other
errors are those of GEORADIUS, including `WRONGTYPE`.

## Examples

```
127.0.0.1:6379> GEOADD cities 2.3522 48.8566 paris 4.3517 50.8503 brussels
(integer) 2
127.0.0.1:6379> GEORADIUSBYMEMBER_RO cities brussels 300 km WITHDIST
1) 1) "brussels"
   2) "0.0000"
2) 1) "paris"
   2) "264.0499"
```

## Compatibility

Same as Redis 7 and Valkey 8, where it is also deprecated. Results are always
sorted by distance; see [GEOSEARCH](https://docs.hotkv.com/commands/geosearch/index.md).

## See also

[GEORADIUSBYMEMBER](https://docs.hotkv.com/commands/georadiusbymember/index.md), [GEOSEARCH](https://docs.hotkv.com/commands/geosearch/index.md),
[GEORADIUS_RO](https://docs.hotkv.com/commands/georadius_ro/index.md)