Search + K

Command Palette

Search for a command to run...

Sign In

Read key-value pair

GET /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}
Copy endpoint
https://api.cloudflare.com/client/v4

Returns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, :, !, %) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the expiration response header.

Parameters

path Path Parameters

Name Type
key_name required
type WorkersKvKeyName = string
namespace_id required
type WorkersKvNamespaceIdentifier = string
account_id required
type WorkersKvIdentifier = string

Responses

200 application/octet-stream

Read key-value pair response.

type WorkersKvValue = string

Client Errors

4XX application/json

Read key-value pair response failure.

interface WorkersKvApiResponseCommonFailure {
errors: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
messages: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
result: {} | null;
success: false;
}