Pagination

How list endpoints return paginated results.

When using a list API route, results are returned with pagination. You can use the query parameter ?per_page= to determine how many results you want per page (maximum is 50). If you exceed this limit, it defaults back to 15.

Paginated Response

{
  "data": [
    // ... data objects ...
  ],
  "links": {
    "first": "https://ploi.io/api/{route}?page=1",
    "last": "https://ploi.io/api/{route}?page=5",
    "prev": null,
    "next": "https://ploi.io/api/{route}?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "path": "https://ploi.io/api/{route}",
    "per_page": 15,
    "to": 15,
    "total": 73
  }
}