Skip to content
masterclass Buddy

Redis · Command

SRANDMEMBER

Returns one or more random members from a Redis set without removing them. A positive count gives distinct members; a negative count can give repeats.

Last updated

Since
1.0.0

Syntax

SRANDMEMBER key [count]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • SADD
  • SCARD
  • SMEMBERS
  • SPOP
  • SREM
  • SSCAN

Source: SRANDMEMBER | Docs. Checked 2026-11-03.