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

# Pagination

> Read all items when a list has more than one page.

Some API lists return one page at a time. A cursor is a value that tells the API where to start the next page. Copy it from the response without changing it. Keep the same filters and sort order. Each operation lists the maximum number of items per page.

## Match the response format

| List | Items | Continue while | Next request |
| - | - | - | - |
| Access lists that use a cursor | `items` | `page.hasMore` is `true` | Send `page.nextCursor` as `cursor`. |
| Linked accounts | `data` | `has_more` is `true` | Send `next_cursor` as `cursor`. |
| Other lists | See the endpoint response | See the endpoint response | Follow the steps listed for that endpoint. |

## Access lists

Access lists that use a cursor return `items` and `page`:

```json theme={null}
{
  "items": [],
  "page": { "hasMore": false, "nextCursor": null }
}
```

Continue while `page.hasMore` is `true`, passing `page.nextCursor` as `cursor`.

![Process each Access page. When page.hasMore is true, send page.nextCursor as the next request cursor. Stop when hasMore is false.](https://mintcdn.com/ofauth/VVqOdSxbrh7mDF0M/images/v3/cursor-pagination.svg?fit=max\&auto=format\&n=VVqOdSxbrh7mDF0M\&q=85\&s=ed086a9293a9276b89925256af3d61dc)

The [SDKs](https://docs.ofauth.com/v3.md#official-sdks) can fetch each page for you. This example prints the user ID from every chat:

```typescript TypeScript SDK theme={null}
import { OFAuthClient } from "@ofauth/onlyfans-sdk"

const client = new OFAuthClient({
  accessToken: process.env.ACCESS_TOKEN!,
  linkedAccountId: process.env.LINKED_ACCOUNT_ID!
})
for await (const chat of client.access.chats.iterate({ limit: 20 })) {
  console.log(chat.user.id)
}
```

## Linked accounts

In the TypeScript SDK, use `client.linkedAccounts.iterate()` to read all pages.

`GET /v3/linked-accounts` returns `data`, `has_more`, and `next_cursor`. Pass `next_cursor` as `cursor` while `has_more` is `true`.

The token response includes only the first page of linked accounts. Use its cursor to get the rest. See [List linked accounts](https://docs.ofauth.com/v3/api-reference/account/linked-accounts.md#list-linked-accounts) for a complete example.

## Other lists

Lists do not all use the same page format. Vault+, analytics, and some other operations return different fields. Check the endpoint's input and response fields before requesting the next page.


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