Currently we only support cursor-based pagination, which is typically more optimal than offset-based.
before | Passing before in your requests with an ID will only return records who's IDs come before the supplied ID. |
after | Passing after in your requests with an ID will only return records who's IDs come after the supplied ID. |
limit | 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. |
An Example
Below is an example of how you can paginate through donations. First, you would call the /donations endpoint and get your first page of results:
https://streamlabs.com/api/v1.0/donations?access_token=YOUR_ACCESS_TOKEN&limit=50
{
"data":[
{
"donation_id":"79808132"
//...
},
//...
{
"donation_id":"79530994"
//...
}
]
}
And then, to grab the next page of results you would pass the last donation_id
as your before
parameter:
https://streamlabs.com/api/v1.0/donations?access_token=YOUR_ACCESS_TOKEN&limit=50&before=79530994