---
title: "Query table rows"
url: https://memocore.ai/developers/query-rows
updated_at: "2026-11-26T14:30:35.213Z"
---

# Query table rows

```
POST /api/v1/projects/:id/rows/query
```

Filter, sort and page through the rows of a table project. Send `aggregate` to get counts and totals instead of rows. A project that is not a table answers 400.

## Path parameters

| Name | Type | Description |
|---|---|---|
| `id` | string, required | Project id of a table project. |

## Body parameters

| Name | Type | Description |
|---|---|---|
| `where` | object | Up to 20 conditions in total, joined by `mode`: `and` (all must match, the default) or `or` (any one is enough). A condition is `column`, `op` and `value`; `op` is `=`, `!=`, `>`, `>=`, `<`, `<=`, `in`, `contains`, `empty` or `not_empty`. Conditions can be grouped one level deep. |
| `sort` | object[] | Up to 3 columns, each with `order` `asc` or `desc`. Default: newest first. |
| `columns` | string[] | Return only these columns in each row. |
| `tags` | string[] | Tag ids an item must carry, all of them. |
| `exclude_tags` | string[] | Tag ids to leave out. An item with any of them is skipped. |
| `archived` | boolean | Set to `true` to query only archived rows. |
| `group_by` | object[] | With `aggregate`: up to 2 columns to group by. A datetime column takes a `step`: `day`, `week`, `month` or `year`. |
| `aggregate` | object[] | Up to 5 of `count`, `sum`, `avg`, `min` and `max`. Results are keyed like `count` or `sum_Amount`, up to 100 groups. |
| `timezone` | string | IANA timezone for grouping dates, for example `Europe/Berlin`. Default UTC. |
| `limit` | number | Rows per page, 1 to 90. Default 30. |
| `skip` | number | Results to skip, for paging. |

## Request

```
curl -X POST "https://memocore.ai/api/v1/projects/6a6194601cabf000d5fee17c/rows/query" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "where": { "conditions": [{ "column": "Status", "op": "=", "value": "new" }] },
    "sort": [{ "column": "Amount", "order": "desc" }],
    "limit": 10
  }'
```

## Response

```json
{
  "columns": [ … ],
  "rows": [
    {
      "id": "6ac4bc268fa4c72b3756aef8",
      "title": "Acme Inc.",
      "fields": { "Status": "new", "Amount": 12000 },
      "tags": [],
      "created_at": "2026-10-20T08:15:00.000Z",
      "updated_at": "2026-10-21T11:40:00.000Z"
    }
  ],
  "total": 1
}
```
