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

# [23.11.26] Cursor Pagination for Contracts & Classes Lists

> GET /contracts, GET /classes, and GET /classes/:classHash/contracts moved from page-number pagination to cursor pagination.

The 23 November 2026 release migrated the contracts and classes list endpoints to cursor
pagination. They now page the same way as the
[transactions, events, and messages lists](https://docs.voyager.online/changelog/transactions-events-messages-cursor-pagination.md),
which moved in the same release.

## Affected Endpoints

* `GET /contracts`
* `GET /classes`
* `GET /classes/{classHash}/contracts`

## Compatibility Note

This change is **not backward-compatible** for clients that paged with `p` or read
`lastPage`.

> [!WARNING]
>
> Responses no longer include `lastPage`, and the page-number
> parameter is ignored on these endpoints. Page with the returned cursors instead.

## New Behavior

Responses carry server-issued cursors:

```json theme={null}
{
  "items": [...],
  "nextCursor": "next:1655799:07b7196ce287",
  "prevCursor": null
}
```

* Pass a previous response's `nextCursor`/`prevCursor` back verbatim as `cursor` to page;
  omit it for the first page. A `null` `nextCursor` means the end of the list.
* A cursor marks a fixed point in the list, so new blocks don't shift your pages, and each
  page loads just as fast however far you go.
* Malformed cursors return `400`.

## Additional Changes

* **Window filters** on `GET /contracts` and `GET /classes`: `blockStart`/`blockEnd` or
  `timestampFrom`/`timestampTo` (unix seconds) bound the list to an inclusive deployment /
  declaration window. The two window kinds are mutually exclusive; inverted windows return
  `400`. An empty window value, such as `blockEnd=`, is ignored, as if the parameter were not
  sent.
* **Type filter validation** on `GET /contracts`: unrecognized `type` values return
  `400` instead of silently returning the unfiltered list.
* **Capped activity counts** on `GET /classes/{classHash}/contracts`: `txnCount` and
  `accountCallCount` stop counting at 1000 and return `"1000+"` above that, where they used to
  return the exact count.
* `GET /classes` list items include `blockNumber` (the declaration block).

Questions or migration issues: [contact us](https://docs.voyager.online/guides/contact.md).


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