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

# Pagination

> Page through lists with cursors and keep your own copy of the data in sync.

Endpoints that return lists are paginated using cursors. By default, 50 records are returned per page; however, you may request up to 200 records per page using the `per_page` query parameter:

```http theme={null}
GET /api/v0/bills?jurisdiction=US-TX&per_page=100
```

Paginated responses contain the records in a `data` array, along with `links` and `meta` objects describing the surrounding pages:

```json theme={null}
{
  "data": [ ... ],
  "links": {
    "prev": null,
    "next": "https://app.policymate.io/api/v0/bills?jurisdiction=US-TX&cursor=eyJpZCI6..."
  },
  "meta": {
    "per_page": 100,
    "next_cursor": "eyJpZCI6...",
    "prev_cursor": null
  }
}
```

To retrieve the next page, simply follow `links.next`. When `links.next` is `null`, you have reached the last page.

## Cursor vs. Offset Pagination

Unlike offset pagination, a cursor marks your position relative to the last record you received instead of by page number. As a result, new records arriving while you page through results will never cause you to skip a record or receive one twice. Cursor pagination also stays fast no matter how deep into the results you are.

The trade-off is that cursor pagination does not report a total record count, and you cannot jump directly to a given page.

## Syncing Changes

Every list endpoint accepts an `updated_since` parameter. Combined with pagination, this makes it simple to keep your own copy of PolicyMate's data current with a nightly job:

```http theme={null}
GET /api/v0/bills?jurisdiction=US-TX&updated_since=2026-11-04T00:00:00Z
```

If you would rather be notified as changes happen, take a look at [webhooks](https://docs.policymate.io/webhooks.md).


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