{
  "id": "topk.info",
  "title": "TOPK.INFO",
  "url": "https://redis.io/docs/latest/commands/topk.info/",
  "summary": "Returns information about a sketch",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "a906295e91c47abc99d27ddab5beda01681d0622a2cf5f5441914713a10e8f70",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns number of required items (k), width, depth, and decay values of a given sketch."
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "* **key**: the name of the sketch."
    },
    {
      "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]() of [simple string]() and [integer]() pairs. For decay, a [simple string reply]() is used to represent the floating point value.\n* [Simple error reply]() 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]() of [simple string]() and [integer]() pairs. For decay, a [double reply]() is used to represent the floating point value.\n* [Simple error reply]() 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"
    }
  ]
}
