---
updatedAt: 2025-06-05T20:02:29.000Z
agentTools:
  projectIndex: https://dev.streamlabs.com/llms.txt
---

# Pagination

Currently we only support cursor-based pagination, which is typically more optimal than offset-based.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Parameter
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        before
      </td>

      <td style={{ textAlign: "left" }}>
        Passing 'before' in your requests with an ID will only return records who's IDs come before the supplied ID.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        after
      </td>

      <td style={{ textAlign: "left" }}>
        Passing 'after' in your requests with an ID will only return records who's IDs come after the supplied ID.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        limit
      </td>

      <td style={{ textAlign: "left" }}>
        Each endpoint has a default limit, but most are lower than the supported maximum. You can pass 'limit' in your requests to increase or decrease the number of results returned.
      </td>
    </tr>
  </tbody>
</Table>

## Sample

Below is an example of how you can paginate through donations. First, you would call the [/donations](https://dev.streamlabs.com/reference/donations) endpoint and get your first page of results.

```text Initial Query
https://streamlabs.com/api/v2.0/donations?limit=50
```

And below is what the output would look like.

```json Output JSON
{  
  "data":[  
    {  
      "donation_id":"79808132"
      //...
    },
    //...
    {  
      "donation_id":"79530994"
      //...
    }
  ]
}
```

In order to grab the next page of results you would pass the last `donation_id ` as your `before` parameter.

```text Next Query
https://streamlabs.com/api/v2.0/donations?limit=50&before=79530994
```