---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Get in Documents"
description: "`data.documents.get` (GET /v1/documents/{index_id}/{document_id}): Reads a document."
type: reference
product: search
summary: "Reads a document."
updated: 2026-09-28
nav: false
---

Reads a document.

- **Path** `GET https://api.data.sylphx.com/v1/documents/index-id/document-id`
- **Scope** `data:read`
- **Effect** `read` — nothing is written.
- **Collection** [documents](/docs/api/documents)
- **Host** `https://api.data.sylphx.com`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `index_id` | `string` | The search index's id. Required. |
| `document_id` | `string` | The document's id. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `document` | `DocumentRecord` | The document. |

### DocumentRecord

| Field | Type | What it is |
| --- | --- | --- |
| `index_id` | `string` | The search index's id in the environment, for example `articles`. |
| `document_id` | `string` | The document's id. |
| `document_json` | `bytes` | The document as JSON, base64. |
| `vector` | `double[]` | The document's embedding; its length is the index's vector dimensions. |
| `sha256` | `string` | `sha256:<hex>` of the document. |
| `version` | `uint64` | The version, increasing per document. |
| `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.
- [`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 "https://api.data.sylphx.com/v1/documents/index-id/document-id" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.data.documents.get({ documentId: 'document-id', indexId: 'index-id' })
```

**Rust**

```rust
let mut req = sylphx::data::GetDocumentRequest::default();
req.document_id = "document-id".to_string();
req.index_id = "index-id".to_string();
let response = sx.data().documents().get(req).await?;
```

**MCP**

```json
{ "method_id": "data.documents.get", "args": {"document_id":"document-id","index_id":"index-id"} }
```
