{
  "schema_version": 2,
  "id": "commands/hscan",
  "title": "HSCAN",
  "url": "https://redis.io/docs/latest/commands/hscan/",
  "summary": "Iterates over fields and values of a hash.",
  "since": "2.8.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:47:41+01:00",
  "page_type": "content",
  "content_hash": "62cca1de8ed7bb9b7ae565600f5d49572de21e03eb8fee27ceb1129261dad668",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "See [`SCAN`](https://redis.io/docs/latest/commands/scan) for `HSCAN` 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 hash.\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 fields whose names match 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 fields to return per iteration. The default is 10.\n\n</details>\n\n<details open><summary><code>NOVALUES</code></summary>\n\nReturn only the field names, without their values.\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): a two-element array.\n* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.\n* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): a two-element array.\n* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.\n* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned."
    }
  ],
  "examples": []
}
