---
title: "Pagination"
description: "List endpoints return a page at a time; send the page's next cursor back as cursor, with the same other parameters, until it's null."
url: https://help.officelycrew.com/developers/pagination
product: developers
product_name: Developers
type: guide
platforms: [slack, teams]
private_beta: "The Officely Crew API is in private beta. Want in? [Contact support](/account/contact-support) to ask to join, and we'll turn on API tokens for your workspace. Once it's on, Account Admins see the API token setting under **Account & Billing**."
audience: [developer]
updated: 2026-11-30
verified: 2026-11-30
errors:
  - "INVALID_CURSOR"
related:
  - https://help.officelycrew.com/developers/rate-limits
  - https://help.officelycrew.com/developers/v1-users
  - https://help.officelycrew.com/developers/v1-insights-work-statuses
  - https://help.officelycrew.com/developers/filters-and-dates
---
# Pagination

> **Private beta.** The Officely Crew API is in private beta. Want in? [Contact support](https://help.officelycrew.com/account/contact-support) to ask to join, and we'll turn on API tokens for your workspace. Once it's on, Account Admins see the API token setting under **Account & Billing**.

List endpoints return a page at a time. Send the page's next cursor back as `cursor`, with the same other parameters, until it's `null`.

## Where the cursor is

| Endpoints | Next cursor | `limit` |
| --- | --- | --- |
| `/v1/users`, `/v1/teams`, `/v1/insights/people`, `/v1/insights/work-statuses` | `meta.page.nextCursor` | Default 100, up to 500 |
| `/v1/work-statuses` (preview) | `nextCursor`, at the top level | Default 500, up to 1,000 |
| `/v1/offices` and the single-result endpoints | Not paginated | — |

`meta.page.totalCount` tells you how many rows match across all pages.

## Rules

- Send the cursor with exactly the same filters, sorting and `referenceDate`. A changed query gets `400 INVALID_CURSOR`.
- If you didn't send `referenceDate`, take the resolved one from `meta.referenceDate` and send it from the second page on.
- Pages aren't a snapshot, so changes made while you page can show up on later pages.
- Pace yourself. Reports and work statuses allow 5 requests a minute, so wait about 12 seconds between pages. See [Rate limits](https://help.officelycrew.com/developers/rate-limits).
- CSV exports aren't paginated: `cursor` and `limit` aren't allowed with `format=csv`.

## Example

```sh
curl "https://api.officelycrew.com/v1/users?limit=100" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

The `meta` part of the response, trimmed from the `UsersExample` in `openapi.json`:

```json
{
  "meta": {
    "generatedAt": "2026-10-15T12:00:00Z",
    "referenceDate": "2026-10-15",
    "selection": {
      "officeIds": [],
      "teamIds": [],
      "userIds": []
    },
    "page": {
      "limit": 100,
      "nextCursor": null,
      "totalCount": 1
    }
  }
}
```

Here `nextCursor` is `null`, so this is the last page. Otherwise, call again with `cursor=<nextCursor>&referenceDate=2026-10-15`.

The same loop in Python, using only the standard library:

```python
import json, os, time, urllib.error, urllib.parse, urllib.request

BASE = "https://api.officelycrew.com"
TOKEN = os.environ["OFFICELY_API_TOKEN"]

def get(path, params):
    url = f"{BASE}{path}?{urllib.parse.urlencode(params)}"
    req = urllib.request.Request(url, headers={"Authorization": f"Bearer {TOKEN}"})
    while True:
        try:
            with urllib.request.urlopen(req) as r:
                return json.load(r)
        except urllib.error.HTTPError as e:
            if e.code != 429:
                raise
            time.sleep(int(e.headers.get("Retry-After", "60")))

params = {"from": "2026-10-01", "to": "2026-10-31", "types": "office", "limit": 500}
rows = []
while True:
    page = get("/v1/insights/work-statuses", params)
    rows += page["data"]
    cursor = page["meta"]["page"]["nextCursor"]
    if cursor is None:
        break
    params["cursor"] = cursor
    params["referenceDate"] = page["meta"]["referenceDate"]
    time.sleep(12)  # 5 requests a minute
```

For the preview `/v1/work-statuses`, read `page["nextCursor"]` instead.
