All resources that are retrieved as lists will be paginated. Paginated responses always have meta
and links
keys that contain information about the pagination's state.
{
"data": {
// ...
},
"links": {
"first": "https://api.givebutter.com/v1/campaigns?page=1",
"last": "https://api.givebutter.com/v1/campaigns?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://api.givebutter.com/v1/campaigns?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://api.givebutter.com/v1/campaigns",
"per_page": 20,
"to": 1,
"total": 10,
}
}
Currently, the max number of results per page is always 20. To retrieve all results, you must programmatically loop through the pages and fetch results.