Pagination Structure
Usage
Basic Pagination
Add thepage parameter to get a specific page:
Customize Items Per Page
Use theper_page parameter (default: 15, max: 100):
Navigate Through Pages
The API provides two ways to navigate through pages:Using Meta Information
meta.current_page: Current page numbermeta.last_page: Total number of pagesmeta.total: Total number of itemsmeta.per_page: Items per pagemeta.from: Starting item numbermeta.to: Ending item numbermeta.path: Base URL for the endpoint
Using Links
links.first: URL for the first pagelinks.last: URL for the last pagelinks.prev: URL for the previous page (null if on first page)links.next: URL for the next page (null if on last page)
meta.links array also provides formatted pagination links with labels that can be used to build a UI pagination component.
Best Practices
- Use the provided
linksinstead of constructing URLs manually - Always check
meta.last_pageto know when to stop paginating - Use reasonable
per_pagevalues to optimize performance (max: 100) - Handle empty pages gracefully (check
dataarray length) - Cache paginated results when appropriate
- Consider using the included
meta.linksfor building pagination UI - Always append existing query parameters when navigating pages
Example Implementation
With Query Parameters
When using pagination with other query parameters (filters, sorting, etc.), the pagination links will automatically include them:Notes
- Pagination is mandatory for list endpoints
- Maximum of 100 items per page
- Use filtering to reduce the total number of pages
- Links automatically preserve all query parameters
- Meta information includes everything needed for custom pagination implementations
- Use
linksnavigation when possible instead of constructing URLs manually

