{
  "schema_version": 2,
  "id": "commands/topk.info",
  "title": "TOPK.INFO",
  "url": "https://redis.io/docs/latest/commands/topk.info/",
  "summary": "Returns information about a sketch",
  "since": "2.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:54+01:00",
  "page_type": "content",
  "content_hash": "6f7437b18ff601afcdde12bd030c7e0f45858039f240ff6ca02a596168513df7",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns number of required items (k), width, depth, and decay values of a given sketch."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nthe name of the sketch.\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; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n* [Array reply](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays) of [simple string](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) and [integer](https://redis.io/docs/latest/develop/reference/protocol-spec#integers) pairs. For decay, a [simple string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) is used to represent the floating point value.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: incorrect number of arguments, non-existant key, or key of the incorrect type.\n\n**RESP3:**\n\nOne of the following:\n\n* [A map](https://redis.io/docs/latest/develop/reference/protocol-spec#maps) of [simple string](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) and [integer](https://redis.io/docs/latest/develop/reference/protocol-spec#integers) pairs. For decay, a [double reply](https://redis.io/docs/latest/develop/reference/protocol-spec#doubles) is used to represent the floating point value.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: incorrect number of arguments, non-existant key, or key of the incorrect type."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "TOPK.INFO topk\n1) k\n2) (integer) 50\n3) width\n4) (integer) 2000\n5) depth\n6) (integer) 7\n7) decay\n8) \"0.92500000000000004\"",
      "section_id": "examples"
    }
  ]
}
