{
  "schema_version": 2,
  "id": "commands/bzpopmin",
  "title": "BZPOPMIN",
  "url": "https://redis.io/docs/latest/commands/bzpopmin/",
  "summary": "Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.",
  "since": "5.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-15T06:26:34-07:00",
  "page_type": "content",
  "content_hash": "6750d183699d405dbf7e018cf4e1199a55bbbc4f754984c19b606e48a69f7678",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command's behavior varies in clustered Redis environments. See the [multi-key operations](https://redis.io/docs/latest/develop/using-commands/multi-key-operations) page for more information.\n\n\n\n`BZPOPMIN` is the blocking variant of the sorted set [`ZPOPMIN`](https://redis.io/docs/latest/commands/zpopmin) primitive.\n\nIt is the blocking version because it blocks the connection when there are no\nmembers to pop from any of the given sorted sets.\nA member with the lowest score is popped from first sorted set that is\nnon-empty, with the given keys being checked in the order that they are given.\n\nThe `timeout` argument is interpreted as a double value specifying the maximum\nnumber of seconds to block. A timeout of zero can be used to block indefinitely.\n\nSee the [BLPOP documentation][cl] for the exact semantics, since `BZPOPMIN` is\nidentical to [`BLPOP`](https://redis.io/docs/latest/commands/blpop) with the only difference being the data structure being\npopped from.\n\n[cl]: /commands/blpop"
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key [key ...]</code></summary>\n\nOne or more sorted-set keys to pop from.\n\n</details>\n\n<details open><summary><code>timeout</code></summary>\n\nThe maximum time to block, in seconds. A timeout of `0` blocks indefinitely.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ expired.\n* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score.\n\n**RESP3:**\n\nOne of the following:\n* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ expired.\n* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "redis> DEL zset1 zset2\n(integer) 0\nredis> ZADD zset1 0 a 1 b 2 c\n(integer) 3\nredis> BZPOPMIN zset1 zset2 0\n1) \"zset1\"\n2) \"a\"\n3) \"0\"",
      "section_id": "examples"
    }
  ]
}
