Pagination

Paginate list endpoints in API v2

API v2 paginates list responses into pages so large result sets stay fast and manageable.

Use page and per_page on list endpoints. The response includes a meta object with the current page, how many entries were returned, and the page size.

For example, with 100 records and per_page=25, there are 4 pages. Increase page to walk through them.

Request parameters

ParameterRequiredValidationsDescription
pagefalseMust be an integerPage number. Returns the first page if omitted
per_pagefalseMust be an integerNumber of entries per page

Response example

json
{
  "companies": [
    {
      "id": 26,
      "name": "Company 26"
    },
    {
      "id": 27,
      "name": "Company 27"
    },
    {
      "id": 28,
      "name": "Company 28"
    },
    {
      "id": 29,
      "name": "Company 29"
    }
  ],
  "meta": {
    "page": 2,
    "entries_count": 4,
    "per_page": 25
  }
}

Meta object

Example

json
{
  "meta": {
    "page": 2,
    "entries_count": 4,
    "per_page": 25
  }
}

Description

ParameterTypeDescription
pageIntegerCurrent page number
entries_countIntegerNumber of entries returned on this page
per_pageIntegerEntries requested per page

Search…

Start typing to search