---
title: Export
url: https://anyrow.ai/docs/api/export
canonical_url: https://anyrow.ai/docs/api/export
---

# Export

Export a table's rows as a file, and check an export's status.

- [Get export status](https://anyrow.ai/docs/api/export/get.md): `GET /v1/projects/{project_id}/exports/{export_id}`
- [Export table rows](https://anyrow.ai/docs/api/export/export.md): `GET /v1/projects/{project_id}/tables/{table_id}/export`

## The Export object

- `created_at` (integer, required): At least 0.
- `updated_at` (integer, required): At least 0.
- `id` (string, required): 1 to 48 characters.
- `project_id` (string, required): 1 to 48 characters.
- `table_id` (string, required, nullable): 1 to 48 characters.
- `actor_id` (string, required): Up to 36 characters.
- `checksum` (string, required): Up to 64 characters.
- `status` (string, required): One of `processing`, `complete`, `failed`.
- `filter_json` (string, required, nullable): Up to 4096 characters.
- `row_count` (integer, required, nullable): At least 0.
- `json_key` (string, required, nullable): Up to 512 characters.
- `csv_key` (string, required, nullable): Up to 512 characters.
- `xlsx_key` (string, required, nullable): Up to 512 characters.
- `error` (string, required, nullable): Up to 2048 characters.
- `expires_at` (integer, required, nullable): At least 0.

```json
{
  "created_at": 1711468800000,
  "updated_at": 1711468800000,
  "id": "exprt_01h5a3g8k9m2n4p6q8r0t2v4x6",
  "project_id": "string",
  "table_id": "string",
  "actor_id": "string",
  "checksum": "string",
  "status": "processing",
  "filter_json": "string",
  "row_count": 42,
  "json_key": "string",
  "csv_key": "string",
  "xlsx_key": "string",
  "error": "string",
  "expires_at": 1711468800000
}
```

## Get export status

`GET /v1/projects/{project_id}/exports/{export_id}`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

- `project_id` (string, required)
- `export_id` (string, required)

### Returns

200 `application/json`.

- `created_at` (integer, required): At least 0.
- `updated_at` (integer, required): At least 0.
- `id` (string, required): 1 to 48 characters.
- `project_id` (string, required): 1 to 48 characters.
- `table_id` (string, required, nullable): 1 to 48 characters.
- `actor_id` (string, required): Up to 36 characters.
- `checksum` (string, required): Up to 64 characters.
- `status` (string, required): One of `processing`, `complete`, `failed`.
- `filter_json` (string, required, nullable): Up to 4096 characters.
- `row_count` (integer, required, nullable): At least 0.
- `json_key` (string, required, nullable): Up to 512 characters.
- `csv_key` (string, required, nullable): Up to 512 characters.
- `xlsx_key` (string, required, nullable): Up to 512 characters.
- `error` (string, required, nullable): Up to 2048 characters.
- `expires_at` (integer, required, nullable): At least 0.

### Errors

- 404: `export_not_found`, `not_found`

Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md).

### Request

```ts title="Node.js"
import { AnyrowSDK } from "@anyrow/sdk"

const anyrow = new AnyrowSDK({
  baseURL: "https://api.anyrow.ai",
  headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` },
})

const { data, error } = await anyrow.export.get({
  params: {
    project_id: "{project_id}",
    export_id: "{export_id}"
  },
})
```

```bash title="cURL"
curl 'https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}' \
  -H 'Authorization: ApiKey {your_api_key}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}", {
  headers: {
    Authorization: "ApiKey {your_api_key}",
  },
})
const data = await response.json()
```

```python title="Python"
import requests

response = requests.get(
    "https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "created_at": 1711468800000,
  "updated_at": 1711468800000,
  "id": "exprt_01h5a3g8k9m2n4p6q8r0t2v4x6",
  "project_id": "string",
  "table_id": "string",
  "actor_id": "string",
  "checksum": "string",
  "status": "processing",
  "filter_json": "string",
  "row_count": 42,
  "json_key": "string",
  "csv_key": "string",
  "xlsx_key": "string",
  "error": "string",
  "expires_at": 1711468800000
}
```

## Export table rows

`GET /v1/projects/{project_id}/tables/{table_id}/export`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

- `project_id` (string, required)
- `table_id` (string, required)

### Query parameters

- `filter` (string, optional)
- `format` (string, required): One of `csv`, `json`, `xlsx`.
- `order` (string, optional)
- `schema` (string, optional): One of `true`, `false`.
- `search` (string, optional)
- `since` (string, optional)

### Returns

200 `application/json`.

- `id` (string, required)
- `status` (string, required): Always `processing`.

### Errors

- 404: `not_found`, `table_not_found`

Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md).

### Request

```ts title="Node.js"
import { AnyrowSDK } from "@anyrow/sdk"

const anyrow = new AnyrowSDK({
  baseURL: "https://api.anyrow.ai",
  headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` },
})

const { data, error } = await anyrow.table.export({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
  search: {
    format: "csv"
  },
})
```

```bash title="cURL"
curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv' \
  -H 'Authorization: ApiKey {your_api_key}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv", {
  headers: {
    Authorization: "ApiKey {your_api_key}",
  },
})
const data = await response.json()
```

```python title="Python"
import requests

response = requests.get(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "id": "string",
  "status": "processing"
}
```
