---
title: Rows
url: https://anyrow.ai/docs/api/rows
canonical_url: https://anyrow.ai/docs/api/rows
---

# Rows

The records in a table: list, filter, aggregate, create, edit and bulk-write them.

- [List rows](https://anyrow.ai/docs/api/rows/list.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows`
- [Create row](https://anyrow.ai/docs/api/rows/create.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows`
- [Aggregate column values](https://anyrow.ai/docs/api/rows/aggregate.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/aggregate`
- [Bulk create/update/delete rows](https://anyrow.ai/docs/api/rows/bulk.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk`
- [Get row](https://anyrow.ai/docs/api/rows/get.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`
- [Update row](https://anyrow.ai/docs/api/rows/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`
- [Delete row](https://anyrow.ai/docs/api/rows/delete.md): `DELETE /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`
- [The source file behind a row: download it, or open a PDF or image inline](https://anyrow.ai/docs/api/rows/source.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source`

## List rows

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

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Query parameters

- `cursor` (string, optional)
- `filter` (string, optional)
- `limit` (integer, optional): Defaults to `20`. Between 1 and 100.
- `order` (string, optional)
- `page` (integer, optional): At least 1.
- `q` (string, optional): Up to 200 characters.

### Returns

200 `application/json`.

- `count` (integer, required): At least 0.
- `hasMore` (boolean, required)
- `limit` (integer, required): At least 1.
- `nextCursor` (string, required, nullable)
- `page` (integer, required, nullable): At least 1.
- `rows` (array of objects, required)

### 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.row.list({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
})
```

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

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", {
  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}/rows",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "count": 0,
  "hasMore": true,
  "limit": 1,
  "nextCursor": "string",
  "page": 1,
  "rows": [
    {}
  ]
}
```

## Create row

`POST /v1/projects/{project_id}/tables/{table_id}/rows`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Request body

Content type: `application/json` (required).

A object.

### Returns

201 `application/json`: created.

### 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.row.create({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
  json: {},
})
```

```bash title="cURL"
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows' \
  -H 'Authorization: ApiKey {your_api_key}' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", {
  method: "POST",
  headers: {
    Authorization: "ApiKey {your_api_key}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
})
const data = await response.json()
```

```python title="Python"
import requests

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

### Response

```json title="201"
{}
```

## Aggregate column values

`GET /v1/projects/{project_id}/tables/{table_id}/rows/aggregate`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Query parameters

- `aggs` (string, required)
- `filter` (string, optional)

### Returns

200 `application/json`.

### 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.row.aggregate({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
  search: {
    aggs: "{aggs}"
  },
})
```

```bash title="cURL"
curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/aggregate?aggs=%7Baggs%7D' \
  -H 'Authorization: ApiKey {your_api_key}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/aggregate?aggs=%7Baggs%7D", {
  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}/rows/aggregate?aggs=%7Baggs%7D",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "key": 0
}
```

## Bulk create/update/delete rows

`POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Request body

Content type: `application/json` (required).

- `creates` (array of objects, optional): Up to 1000 items.
- `deletes` (array of strings, optional): Up to 1000 items.
- `updates` (array of objects, optional): Up to 1000 items.
  - `data` (object, required)
  - `id` (string, required)

### Returns

200 `application/json`.

- `created` (array of objects, optional)
- `deleted` (array of strings, optional)
- `updated` (array of objects, optional)

### 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.row.bulk({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
  json: {
    creates: [
      {}
    ],
    deletes: [
      "string"
    ],
    updates: [
      {
        data: {},
        id: "string"
      }
    ]
  },
})
```

```bash title="cURL"
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk' \
  -H 'Authorization: ApiKey {your_api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "creates": [
    {}
  ],
  "deletes": [
    "string"
  ],
  "updates": [
    {
      "data": {},
      "id": "string"
    }
  ]
}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk", {
  method: "POST",
  headers: {
    Authorization: "ApiKey {your_api_key}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "creates": [
      {}
    ],
    "deletes": [
      "string"
    ],
    "updates": [
      {
        "data": {},
        "id": "string"
      }
    ]
  }),
})
const data = await response.json()
```

```python title="Python"
import requests

response = requests.post(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
    json={
        "creates": [
            {},
        ],
        "deletes": [
            "string",
        ],
        "updates": [
            {
                "data": {},
                "id": "string",
            },
        ],
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "created": [
    {}
  ],
  "deleted": [
    "string"
  ],
  "updated": [
    {}
  ]
}
```

## Get row

`GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Returns

200 `application/json`.

### Errors

- 404: `not_found`, `row_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.row.get({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}",
    row_id: "{row_id}"
  },
})
```

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

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_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}/tables/{table_id}/rows/{row_id}",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{}
```

## Update row

`PATCH /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Request body

Content type: `application/json` (required).

A object.

### Returns

200 `application/json`.

### Errors

- 404: `not_found`, `row_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.row.update({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}",
    row_id: "{row_id}"
  },
  json: {},
})
```

```bash title="cURL"
curl -X PATCH 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}' \
  -H 'Authorization: ApiKey {your_api_key}' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", {
  method: "PATCH",
  headers: {
    Authorization: "ApiKey {your_api_key}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
})
const data = await response.json()
```

```python title="Python"
import requests

response = requests.patch(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
    json={},
)
print(response.json())
```

### Response

```json title="200"
{}
```

## Delete row

`DELETE /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Returns

200 `application/json`.

- `id` (string, required)

### Errors

- 404: `not_found`, `row_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.row.delete({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}",
    row_id: "{row_id}"
  },
})
```

```bash title="cURL"
curl -X DELETE 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}' \
  -H 'Authorization: ApiKey {your_api_key}'
```

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

```python title="Python"
import requests

response = requests.delete(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.json())
```

### Response

```json title="200"
{
  "id": "string"
}
```

## The source file behind a row: download it, or open a PDF or image inline

`GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source`

Authentication: `Authorization: ApiKey {your_api_key}`.

### Path parameters

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

### Query parameters

- `disposition` (string, optional): One of `attachment`, `inline`. Defaults to `attachment`.

### Returns

200 `application/octet-stream`.

### Errors

- 404: `not_found`, `row_not_found`, `row_source_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.row.source({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}",
    row_id: "{row_id}"
  },
})
```

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

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source", {
  headers: {
    Authorization: "ApiKey {your_api_key}",
  },
})
const data = await response.text()
```

```python title="Python"
import requests

response = requests.get(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
)
print(response.text)
```
