Field Manual PHP / Laravel reference
← HTTP / API

Pagination

Paginated APIs return bounded data and navigation information.

What it is

Paginated APIs return bounded data and navigation information.

When to use it

Avoid unbounded reads and document ordering.

Syntax

GET /orders?page=2&per_page=20

Example

{
  "data": [{"id":42,"status":"pending"}],
  "meta": {"current_page":2,"per_page":20},
  "links": {"next":"/orders?page=3"}
}

Common mistakes

Cap per_page and use stable ordering; concurrent changes make offset pages shift.

Related topics

Pagination