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

# Pagination

> Walk long lists with a cursor, or let the SDK do it for you.

Lists are returned newest first, one page at a time, with a cursor to the next page.

```json theme={null}
{
  "object": "list",
  "data": [{ "id": "fi_2d6a91c4" }, { "id": "fi_7c01e5b8" }],
  "next_cursor": "fi_7c01e5b8"
}
```

## With the SDK

`iterate` fetches pages as you go, so you can loop over everything:

```ts theme={null}
for await (const intent of useroutr.fundingIntents.iterate({ status: "CREDITED" })) {
  console.log(intent.id);
}
```

`list` returns a single page when you want to control paging yourself:

```ts theme={null}
const page = await useroutr.fundingIntents.list({ limit: 50 });
const next = page.next_cursor
  ? await useroutr.fundingIntents.list({ limit: 50, cursor: page.next_cursor })
  : null;
```

## Over HTTP

Pass `limit` (1 to 100; 50 by default, 20 for quotes) and, after the first page, `cursor` set to
the previous page's `next_cursor`. When `next_cursor` is `null`, you have everything.

```bash theme={null}
curl "https://api.sandbox.useroutr.com/v1/funding-intents?limit=50&cursor=fi_7c01e5b8" \
  -H "Authorization: Bearer $USEROUTR_API_KEY"
```


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