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

# Pagination

> Vintl API uses cursor-based pagination with has_more and next_cursor fields.

All list endpoints return paginated results. The default page size is 100, max is 1,000.

## Response fields

```json theme={"dark"}
{
  "object": "yield_series",
  "results": [...],
  "results_count": 100,
  "has_more": true,
  "next_cursor": "2025-01-15"
}
```

| Field           | Description                             |
| --------------- | --------------------------------------- |
| `results`       | Items for this page                     |
| `results_count` | Count of items returned                 |
| `has_more`      | `true` if there are more pages          |
| `next_cursor`   | Pass as `?cursor=` to get the next page |

## Paging through results

<CodeGroup>
  ```bash cURL theme={"dark"}
  # First page
  curl -H "X-API-Key: $VINTL_API_KEY" \
    "https://api.vintl.io/v1/treasury/yields?limit=100"

  # Next page — use next_cursor from previous response
  curl -H "X-API-Key: $VINTL_API_KEY" \
    "https://api.vintl.io/v1/treasury/yields?limit=100&cursor=2025-01-15"
  ```

  ```python Python theme={"dark"}
  import os, requests

  headers = {"X-API-Key": os.environ["VINTL_API_KEY"]}
  params = {"limit": 100}
  all_results = []

  while True:
      resp = requests.get(
          "https://api.vintl.io/v1/treasury/yields",
          headers=headers, params=params
      )
      data = resp.json()
      all_results.extend(data["results"])

      if not data["has_more"]:
          break
      params["cursor"] = data["next_cursor"]
  ```

  ```typescript TypeScript theme={"dark"}
  const headers = { "X-API-Key": process.env.VINTL_API_KEY! };
  const base = "https://api.vintl.io/v1/treasury/yields";
  const allResults: any[] = [];
  let cursor: string | undefined;

  do {
    const params = new URLSearchParams({ limit: "100" });
    if (cursor) params.set("cursor", cursor);

    const resp = await fetch(`${base}?${params}`, { headers });
    const data = await resp.json();
    allResults.push(...data.results);
    cursor = data.has_more ? data.next_cursor : undefined;
  } while (cursor);
  ```
</CodeGroup>

## Parameters

| Parameter | Type    | Default | Max  |
| --------- | ------- | ------- | ---- |
| `limit`   | integer | 100     | 1000 |
| `cursor`  | string  | —       | —    |

<Warning>
  Cursors are opaque. Don't parse, modify, or construct them — the format may change without notice.
</Warning>
