Search + K

Command Palette

Search for a command to run...

Sign In

Get multiple key-value pairs

POST /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk/get
Copy endpoint
https://api.cloudflare.com/client/v4

Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if withMetadata is true.

Parameters

path Path Parameters

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

Request Body

application/json required
{ keys: WorkersKvKeyNameBulk

A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid.

type WorkersKvKeyNameBulk = string
[]
;type?: "text" | "json";withMetadata?: boolean; }

Responses

200 application/json

Get multiple key-value pairs response.

type WorkersKvApiResponseCommonNoResult = interface WorkersKvApiResponseCommon {
errors: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
messages: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
success: true;
}
& { result?: {} | null; }
& { result?: WorkersKvBulkGetResult
interface WorkersKvBulkGetResult {
values?: { };
}
| WorkersKvBulkGetResultWithMetadata
interface WorkersKvBulkGetResultWithMetadata {
values?: { };
}
; }

Client Errors

4XX application/json

Get multiple key-value pairs response failure.

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