Skip to content
masterclass Buddy

Redis · Command

ZCARD

ZCARD returns the number of members in a sorted set. It returns 0 when the key does not exist.

Last updated

Since
1.2.0

Syntax

ZCARD key

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

Subscribe
  • BZMPOP
  • BZPOPMAX
  • BZPOPMIN
  • ZADD
  • ZCOUNT
  • ZDIFF
  • ZDIFFSTORE
  • ZINCRBY

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