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

# Query blocks

> Page through your install's blocks of one type whose state matches.

> Reintersect apps are in developer preview. Names and limits can still change before general
> release.

Finds blocks of one type created by your install whose state has the given top-level values.

Authenticate with an install token. No scope is needed.

## Body

| Field | Type | Required | Description |
| - | - | - | - |
| `type` | `string` | Yes | The block type. |
| `stateMatch` | `object` | Yes | Up to 8 top-level state keys with string, number, boolean or `null` values. `{}` matches every block of the type. |
| `cursor` | `string` | No | `nextCursor` from the previous page. |
| `limit` | `number` | No | 1 to 100. |

## Response

| Field | Type | Description |
| - | - | - |
| `items` | `Block[]` | Matching blocks, as in [Get a block](/api-reference/blocks/get). |
| `nextCursor` | `string \| null` | Pass it as `cursor` for the next page. |

## Errors

| `_tag` | Status | Cause |
| - | - | - |
| `ReintersectAppBlockTypeUnknownError` | 422 | The installed version has no block of this type. |
| `ReintersectApiInvalidCursorError` | 400 | The cursor isn't from this query. |

With the SDK, call `reintersect.blocks.query(TaskBlock, { stateMatch: { status: "doing" } })`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.