# Query rows

Source: https://neondeerdata.com/docs/api/lookup-tables/query-rows/

Query rows with filters and select the fields to return.

## Request

```http
POST /v1/lookup-tables/{table_id}/rows/query

```

Finds a table's rows that match every condition you send, one page at a time.

Requires `lookup_tables:read`. The connection also needs access to the relevant tables, objects, or workflows.

MCP action: `query_lookup_rows`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

## Parameters

| Name                               | Send in               | Required           | Type or allowed values                         | Notes                                                                                                                                                                                          |
| ---------------------------------- | --------------------- | ------------------ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `table_id`                         | path                  | Yes                | string                                         |                                                                                                                                                                                                |
| `filter`                           | JSON body             | No                 | object                                         | A condition is {"field": , "eq": } or {"field": , "in": \[, ...\]}. Use {"and": \[...\]} to require every condition, or {"or": \[...\]} to require any of them. eq null matches an empty cell. |
| `filter.field`                     | Within the JSON value | Within this object | string                                         | Alternative 1.                                                                                                                                                                                 |
| `filter.eq`                        | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 1\. Alternative 1.                                                                                                                                                                 |
| `filter.eq.objectId`               | Within the JSON value | Within this object | string (uuid)                                  | Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                                                 |
| `filter.eq.recordId`               | Within the JSON value | Within this object | string (uuid)                                  | Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                                                 |
| `filter.in`                        | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 1\. Alternative 2.                                                                                                                                                                 |
| `filter.in[].objectId`             | Within the JSON value | Within this object | string (uuid)                                  | Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                                                 |
| `filter.in[].recordId`             | Within the JSON value | Within this object | string (uuid)                                  | Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                                                 |
| `filter.and`                       | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 1.                                                                                                                                                                 |
| `filter.and[].field`               | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 1\. Alternative 1.                                                                                                                                                 |
| `filter.and[].eq`                  | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1.                                                                                                                                 |
| `filter.and[].eq.objectId`         | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                 |
| `filter.and[].eq.recordId`         | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                 |
| `filter.and[].in`                  | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 2.                                                                                                                                 |
| `filter.and[].in[].objectId`       | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                 |
| `filter.and[].in[].recordId`       | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                 |
| `filter.and[].and`                 | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1.                                                                                                                                 |
| `filter.and[].and[].field`         | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1.                                                                                                                                 |
| `filter.and[].and[].eq`            | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 1.                                                                                                                 |
| `filter.and[].and[].eq.objectId`   | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.and[].and[].eq.recordId`   | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.and[].and[].in`            | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 2.                                                                                                                 |
| `filter.and[].and[].in[].objectId` | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.and[].and[].in[].recordId` | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.and[].or`                  | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2.                                                                                                                                 |
| `filter.and[].or[].field`          | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2.                                                                                                                                 |
| `filter.and[].or[].eq`             | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 1.                                                                                                                 |
| `filter.and[].or[].eq.objectId`    | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.and[].or[].eq.recordId`    | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.and[].or[].in`             | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 2.                                                                                                                 |
| `filter.and[].or[].in[].objectId`  | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.and[].or[].in[].recordId`  | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 1\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.or`                        | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 2.                                                                                                                                                                 |
| `filter.or[].field`                | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 2\. Alternative 1.                                                                                                                                                 |
| `filter.or[].eq`                   | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1.                                                                                                                                 |
| `filter.or[].eq.objectId`          | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                 |
| `filter.or[].eq.recordId`          | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                                 |
| `filter.or[].in`                   | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2.                                                                                                                                 |
| `filter.or[].in[].objectId`        | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                 |
| `filter.or[].in[].recordId`        | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                                 |
| `filter.or[].and`                  | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1.                                                                                                                                 |
| `filter.or[].and[].field`          | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1.                                                                                                                                 |
| `filter.or[].and[].eq`             | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1.                                                                                                                 |
| `filter.or[].and[].eq.objectId`    | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.or[].and[].eq.recordId`    | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.or[].and[].in`             | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2.                                                                                                                 |
| `filter.or[].and[].in[].objectId`  | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.or[].and[].in[].recordId`  | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.or[].or`                   | Within the JSON value | Within this object | array of object                                | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2.                                                                                                                                 |
| `filter.or[].or[].field`           | Within the JSON value | Within this object | string                                         | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2.                                                                                                                                 |
| `filter.or[].or[].eq`              | Within the JSON value | Within this object | string or number or boolean or object or null  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1.                                                                                                                 |
| `filter.or[].or[].eq.objectId`     | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.or[].or[].eq.recordId`     | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 1\. Alternative 1\. Alternative 4.                                                                                 |
| `filter.or[].or[].in`              | Within the JSON value | Within this object | array of string or number or boolean or object | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2.                                                                                                                 |
| `filter.or[].or[].in[].objectId`   | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 4.                                                                                                 |
| `filter.or[].or[].in[].recordId`   | Within the JSON value | Within this object | string (uuid)                                  | Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 2\. Alternative 4.                                                                                                 |
| `fields`                           | JSON body             | No                 | array of string                                |                                                                                                                                                                                                |
| `limit`                            | JSON body             | No                 | integer                                        |                                                                                                                                                                                                |
| `cursor`                           | JSON body             | No                 | string                                         |                                                                                                                                                                                                |
| `segment`                          | JSON body             | No                 | integer                                        |                                                                                                                                                                                                |
| `total_segments`                   | JSON body             | No                 | integer                                        |                                                                                                                                                                                                |

## Response

| HTTP status | Result                                |
| ----------- | ------------------------------------- |
| `200`       | A page of matching rows, in id order. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field              | Type               | Required in object | Notes |
| --------------------------- | ------------------ | ------------------ | ----- |
| `data`                      | array of object    | Yes                |       |
| `data[].id`                 | string (uuid)      | Yes                |       |
| `data[].object`             | `"lookup_row"`     | Yes                |       |
| `data[].values`             | object             | Yes                |       |
| `data[].version`            | integer            | Yes                |       |
| `data[].roster_verified_at` | string (date-time) | No                 |       |
| `pagination`                | object             | Yes                |       |
| `pagination.next_cursor`    | string or null     | Yes                |       |

## Errors

| HTTP status | Meaning                                                                                                                                                   |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`       | One of: invalid_request, invalid_filter, invalid_value, invalid_cursor, credential_in_url.                                                                |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                   |
| `402`       | One of: payment_overdue.                                                                                                                                  |
| `403`       | One of: plan_required, not_available, insufficient_scope, operation_not_allowed, field_not_writable, plan_capacity_exceeded.                              |
| `404`       | One of: resource_not_found.                                                                                                                               |
| `409`       | One of: table_filling, table_fill_failed, lookup_key_required, key_conflict, version_conflict, table_busy, table_capacity_exceeded, idempotency_conflict. |
| `413`       | One of: request_too_large.                                                                                                                                |
| `422`       | One of: batch_rejected.                                                                                                                                   |
| `423`       | One of: organization_reopening.                                                                                                                           |
| `428`       | One of: customer_agreement_required.                                                                                                                      |
| `429`       | One of: rate_limited.                                                                                                                                     |
| `503`       | One of: service_unavailable.                                                                                                                              |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

The [public OpenAPI document](https://neondeerdata.com/docs/api/meta/openapi/) lists generally available API families. Alpha operations may not appear in that document; their request and response fields are listed on this page. Use the [API Playground](https://neondeerdata.com/docs/api/testing/) to inspect a real response with your connection's access.
