> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Table

> Retrieve a specific table by index in multiple formats.

## Overview

Returns a specific table from the document. Use the `format` query parameter to choose the output format.

<Note>
  **Multiple formats.** Use the `format` query parameter to get the table as `json`, `csv`, `html`, or `markdown`.
</Note>

## Request

<ParamField path="id" type="string" required>
  Document ID (e.g. `doc-abc123`) or 6-char short hash.
</ParamField>

<ParamField path="index" type="string" required>
  0-based table index.
</ParamField>

<ParamField query="format" type="string">
  Output format: `json`, `csv`, `html`, or `markdown`. Defaults to `json`.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl "https://api.okrapdf.com/v1/documents/doc-abc123/entities/tables/0?format=csv" \
    -H "Authorization: Bearer okra_YOUR_KEY"
  ```
</RequestExample>

### Response (200)

Response content type varies by format. For `json`:

```json theme={null}
{
  "type": "table",
  "value": "| Header 1 | Header 2 |\n|---|---|\n| A | B |"
}
```
