# Pagination

How TimeSubmit API lists are paged with limit, cursor and nextCursor, and why a filtered page can be short while more follow.

## Pages and cursors

Every list answers one page: `data`, and `nextCursor`. Pass `nextCursor` as `cursor` to get the next page. On the last page it is `null`.

`limit` sets the page size, from 1 to 100, and is 25 when you leave it out. Keep the other parameters the same while you follow a cursor.

```json
{
  "data": [
    { "id": "k57d1w3q8r2t6y9u0p4s7v1x5z", "name": "Northwind Traders" }
  ],
  "nextCursor": "eyJpZCI6Ims1N2QxdzNxOHIyIn0"
}
```

Each item in `data` has every field of its resource; this example shows two of them.

## Filtered lists

A filtered list, such as [invoices](https://www.timesubmit.com/developers/reference/invoices) in one status, can answer a page with fewer than `limit` items, or none, while `nextCursor` still leads on. Keep following the cursor until it is `null`, rather than stopping at the first short page.
