# Filtering & pagination

> Retrieve predictable pages and narrow queries to the work you need.

Source: https://math-api.qmindlabs.ai/docs/guides/pagination

## Page through results

| Parameter | Default | Range |
| --- | --- | --- |
| `page` | 1 | 1–100,000 |
| `page_size` | 25 | 1–100 |

```sh
curl --fail-with-body 'https://math-api.qmindlabs.ai/api/math/tasks?page=2&page_size=50' \
  -H "Authorization: Bearer $MATH_API_KEY"
```

Most paginated responses include `total`. Stop when your requested page reaches that count. Notes have no total; stop on a short page. Attachments, key lists, and audit endpoints use fixed caps documented on their reference pages.

## Filter tasks

Combine `question_id`, `run_id`, `reviewer_id`, `client_id`, `review_state`, and `decision`. Reviewer and client filters also accept `unassigned`.

`q` is a case-insensitive literal substring search. Percent and underscore are treated as ordinary characters. What is searched is documented per endpoint.

[GETAll task filters](https://math-api.qmindlabs.ai/docs/api-reference/tag/tasks-review/GET/api/math/tasks.md)

## Surfaces and sorting

`surface=all` includes archived tasks and is the default for task and seed-task lists. `archive` returns archived tasks only; `release` returns current accepted reports. Other surfaces exclude archived tasks.

Task sorting supports `updated`, `oldest`, and `topic`, with stable tie ordering. These are live pages rather than a snapshot; concurrent updates can move records between pages.

## Visibility applies to counts

Filters cannot expand access. Reviewer searches, results, and totals are restricted to currently assigned tasks. Use `/api/math/seeds` for assignment-scoped topic summaries; whole-run topic listings require Owner or Admin.
