# TYPE

> Return the type of the value stored at a key.

URL: https://docs.hotkv.com/commands/type/

```
TYPE key
```

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

`TYPE` returns the name of the type of the value at `key`, or `none` when the
key does not exist. Looking up the type is not an access to the key.

| Reply | Value type |
| --- | --- |
| `string` | String (also bitmaps and HyperLogLogs) |
| `list` | List |
| `set` | Set |
| `zset` | Sorted set |
| `hash` | Hash |
| `stream` | Stream |
| `MBbloom--` | Bloom filter |
| `CMSk-TYPE` | Count-min sketch |
| `TopK-TYPE` | Top-K |
| `none` | The key does not exist |

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Always | Simple string: the type name | Simple string |

## Examples

```
127.0.0.1:6379> SET name "ada"
OK
127.0.0.1:6379> RPUSH queue job1
(integer) 1
127.0.0.1:6379> TYPE name
string
127.0.0.1:6379> TYPE queue
list
127.0.0.1:6379> TYPE missing
none
```

## Compatibility

The core type names are the same as in Redis 7 and Valkey 8. The Bloom filter,
count-min sketch and Top-K names are the ones Redis Stack reports for those
types.

## See also

[OBJECT ENCODING](https://docs.hotkv.com/commands/object-encoding/index.md), [SCAN](https://docs.hotkv.com/commands/scan/index.md),
[EXISTS](https://docs.hotkv.com/commands/exists/index.md)