---
title: "GET"
url: "https://docs.yugabyte.com/stable/yedis/api/get/"
---

# GET

## Synopsis

**`GET key`**

This command fetches the value that is associated with the given `key`.

- If the `key` does not exist, null is returned.
- If the `key` is associated with a non-string value, an error is raised.

## Return value

Returns string value of the given `key`.

## Examples

```sh
$ GET yugakey
```

```
(null)
```

```sh
$ SET yugakey "Yugabyte"
```

```
"OK"
```

```sh
$ GET yugakey
```

```
"Yugabyte"
```

## See also

[`append`](/stable/yedis/api/append/ "append"), [`getrange`](/stable/yedis/api/getrange/ "getrange"), [`getset`](/stable/yedis/api/getset/ "getset"), [`incr`](/stable/yedis/api/incr/ "incr"), [`incrby`](/stable/yedis/api/incrby/ "incrby"), [`set`](/stable/yedis/api/set/ "set"), [`setrange`](/stable/yedis/api/setrange/ "setrange"), [`strlen`](/stable/yedis/api/strlen/ "strlen")
