# TOPK.INFO

> Show the settings of a Top-K structure.

URL: https://docs.hotkv.com/commands/topk-info/

```
TOPK.INFO key
```

- Group: Top-K
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`TOPK.INFO` returns the settings the Top-K at `key` was created with (see
[TOPK.RESERVE](https://docs.hotkv.com/commands/topk-reserve/index.md)).

## Fields

| Field | Meaning |
| --- | --- |
| `k` | How many items the list keeps. |
| `width` | Counters per row. |
| `depth` | Number of counter rows. |
| `decay` | The decay setting. |

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Top-K exists | Flat array of field names and values; `decay` is a bulk string | Map; `decay` is a double |

Error replies: `TopK: key does not exist`, and `WRONGTYPE`.

## Examples

```
127.0.0.1:6379> TOPK.RESERVE trending 10 100 5 0.95
OK
127.0.0.1:6379> TOPK.INFO trending
1) k
2) (integer) 10
3) width
4) (integer) 100
5) depth
6) (integer) 5
7) decay
8) "0.95"
```

## Compatibility

Same fields as `TOPK.INFO` in RedisBloom.

## See also

[TOPK.RESERVE](https://docs.hotkv.com/commands/topk-reserve/index.md), [TOPK.LIST](https://docs.hotkv.com/commands/topk-list/index.md)