# ZMSCORE

> Get the scores of several members of a sorted set in one call.

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

```
ZMSCORE key member [member ...]
```

- Group: Sorted set
- Complexity: O(N) where N is the number of members requested
- HotKV Cloud: all plans
- On-Premise: no license needed

`ZMSCORE` returns the score of each `member` in the sorted set at `key`, in the
order given. A member that is not present gives a nil in its position. A
missing key behaves like an empty sorted set.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Success | Array with one entry per member: the score as a bulk string, or nil bulk string | Array of doubles, with null for a missing member |

`ZMSCORE` replies with a `WRONGTYPE` error if `key` holds a value that is not a
sorted set.

## Examples

```
127.0.0.1:6379> ZADD board 100 "alice" 92.5 "bob"
(integer) 2
127.0.0.1:6379> ZMSCORE board "alice" "nobody" "bob"
1) "100"
2) (nil)
3) "92.5"
```

## Compatibility

Same as Redis 7.4 and Valkey 8.

## See also

[ZSCORE](https://docs.hotkv.com/commands/zscore/index.md), [ZRANGE](https://docs.hotkv.com/commands/zrange/index.md), [HMGET](https://docs.hotkv.com/commands/hmget/index.md)