{
  "schema_version": 2,
  "id": "commands/zscan",
  "title": "ZSCAN",
  "url": "https://redis.io/docs/latest/commands/zscan/",
  "summary": "Iterates over members and scores of a sorted set.",
  "since": "2.8.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:43+01:00",
  "page_type": "content",
  "content_hash": "efd9aacefe28a098ab7e3f5653dd98fe2098fb985785ae5aa8a793e96ef80c4f",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "See [`SCAN`](https://redis.io/docs/latest/commands/scan) for `ZSCAN` documentation."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key that holds the sorted set.\n\n</details>\n\n<details open><summary><code>cursor</code></summary>\n\nThe cursor value. Start an iteration with `0`, then use the cursor returned by each call as the argument to the next call.\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>MATCH pattern</code></summary>\n\nOnly return members matching the given glob-style pattern.\n\n</details>\n\n<details open><summary><code>COUNT count</code></summary>\n\nA hint for the number of members to return per iteration. The default is 10.\n\n</details>"
    },
    {
      "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\n[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form."
    }
  ],
  "examples": []
}
