---
title: "EXISTS"
url: "https://docs.yugabyte.com/stable/yedis/api/exists/"
---

# EXISTS

Single-key request only. Requests with multiple keys are not yet supported.

## Synopsis

**`EXISTS key [key ...]`**

This command is a predicate to check whether or not the given `key` exists.

## Return value

Returns the number of existing keys.

## Examples

```sh
$ SET yuga1 "Africa"
```

```
"OK"
```

```sh
$ SET yuga2 "America"
```

```
"OK"
```

```sh
$ EXISTS yuga1
```

```
1
```

```sh
$ EXISTS yuga1 yuga2 not_a_key
```

```
2
```

## See also

[`del`](/stable/yedis/api/del/ "del"), [`get`](/stable/yedis/api/get/ "get"), [`getrange`](/stable/yedis/api/getrange/ "getrange"), [`hdel`](/stable/yedis/api/hdel/ "hdel"), [`hexists`](/stable/yedis/api/hexists/ "hexists"), [`hget`](/stable/yedis/api/hget/ "hget"), [`hset`](/stable/yedis/api/hset/ "hset"), [`hincrby`](/stable/yedis/api/hincrby/ "hincrby"), [`sadd`](/stable/yedis/api/sadd/ "sadd"), [`set`](/stable/yedis/api/set/ "set")
