---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Get many in KV"
description: "`data.kv.get_many` (POST /v1/kv-mget): Reads up to 1000 keys at once (MGET)."
type: reference
product: kv
summary: "Reads up to 1000 keys at once (MGET)."
updated: 2026-09-28
nav: false
---

Reads up to 1000 keys at once (MGET). Answers one entry per key, in order; an absent or expired key keeps its key and has no `value`.

- **Path** `POST https://api.data.sylphx.com/v1/kv-mget`
- **Scope** `data:read`
- **Effect** `read` — nothing is written.
- **Collection** [kv](/docs/api/kv)
- **Host** `https://api.data.sylphx.com`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `namespace_id` | `string` | The namespace's id. Required. |
| `keys` | `string[]` | The keys, at most 1000. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `values` | `ValueRecord[]` | One entry per key, in the order asked; an absent or expired key keeps its key and has no `value` or `version`. |

### ValueRecord

| Field | Type | What it is |
| --- | --- | --- |
| `namespace_id` | `string` | The namespace's id in the environment, for example `ratelimit`. |
| `key` | `string` | The key. |
| `value` | `bytes` | The bytes, base64. |
| `sha256` | `string` | `sha256:<hex>` of the value. |
| `version` | `uint64` | The version, increasing per key. |
| `expires_at_unix_ms` | `int64` | Expiry in Unix milliseconds; zero never expires. |
| `updated_at_unix_ms` | `int64` | When this version was written, in Unix milliseconds. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.data.sylphx.com/v1/kv-mget" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keys":["…"],"namespace_id":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.data.kv.getMany({ keys: ['…'], namespaceId: '…' })
```

**Rust**

```rust
let mut req = sylphx::data::GetValuesRequest::default();
req.keys = vec!["…".to_string()];
req.namespace_id = "…".to_string();
let response = sx.data().kv().get_many(req).await?;
```

**MCP**

```json
{ "method_id": "data.kv.get_many", "args": {"keys":["…"],"namespace_id":"…"} }
```
