Skip to main content
List endpoints return paginated responses. Each response includes a links object for navigation URLs and a meta object with pagination details.

Example response

{
  "data": [...],
  "links": {
    "first": "http://.../api/users/search?page=1",
    "last": "http://.../api/users/search?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": null,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://.../api/users/search?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next »",
        "page": null,
        "active": false
      }
    ],
    "path": "http://.../api/users/search",
    "per_page": 2,
    "to": null,
    "total": 0
  }
}
AttributeDescription
firstURL for the first page. Always present.
lastURL for the last page. Always present.
prevURL for the previous page. null when on the first page.
nextURL for the next page. null when on the last page or when there is only one page.
Use these URLs to move between pages without building query strings yourself.

Meta

AttributeDescription
current_page1-based index of the current page.
from1-based index of the first item on the current page. null when the page has no items.
last_pageTotal number of pages.
pathBase URL of the endpoint (without page or other query params).
per_pageNumber of items per page (page size).
to1-based index of the last item on the current page. null when the page has no items.
totalTotal number of items across all pages.
meta.links is an array of page navigation entries. Each entry has:
AttributeDescription
urlFull URL for that page, or null when the link is disabled (e.g. “Previous” on page 1).
labelDisplay label (e.g. "1", "« Previous", "Next »").
pagePage number, or null for prev/next links.
activetrue for the current page, false otherwise.
Use meta.links to render a page navigator (e.g. « Previous, 1, 2, 3, Next ») and meta.total / meta.last_page to show “Page X of Y” or “Showing N of M results”.