+++
title = "API Result Pagination"
weight = 79
updated = 2023-07-07
aliases = ["/docs/api-result-pagination.html", "/docs/bonsai-api/reference/api-result-pagination/"]

[extra]
nav_title = "API Result Pagination"
weight = 10
+++

All API responses which support pagination will include a top level pagination fragment in the JSON response body.

## Pagination Query Parameters

All APIs supporting recognizes the following request parameters for pagination:

<table>
  <thead>
    <tr>
      <th>Parameter</th><th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>page</td><td>The page number, starting at 1</td>
    </tr>
    <tr>
      <td>size</td><td>The size of each page, with a max of 100</td>
    </tr>
  </tbody>
</table>

## Pagination Response Fragment

All API responses which support pagination will include a top level pagination fragment in the JSON response body, which looks like:

```javascript
"pagination": {
 "page_number": 1,
 "page_size": 20,
 "total_records": 255
}
```

With the above information, you can infer how many pages there are and iterate until the list is exhausted.
