> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hirehive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Example overview page before API endpoints

Endpoints that return a collection of results are always paginated. Paginated results will return a `PagedResponse<T>[]` object.
The objects contains `meta`, `links` and `items` properties.

## Paginated request

<ParamField query="page" type="integer" default="1">
  The number of the page to return.
</ParamField>

<ParamField query="page_size" type="integer" default="30">
  The number of items to return. Defaults to 30. Min = 1. Max = 100
</ParamField>

## Paginated response

<ResponseField name="meta" type="object">
  Contains information about the number of results and pages

  <Expandable title="properties" defaultOpen="true">
    <ResponseField name="page_size" type="integer">
      The of items in the current page
    </ResponseField>

    <ResponseField name="page" type="integer">
      The number of the current page. 1 based index
    </ResponseField>

    <ResponseField name="total_items" type="integer">
      The total number of items
    </ResponseField>

    <ResponseField name="total_pages" type="integer">
      The total number of pages
    </ResponseField>

    <ResponseField name="has_next_page" type="boolean">
      Whether there is a next page of results
    </ResponseField>

    <ResponseField name="has_previous_page" type="boolean">
      Whether there is a previous page of results
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="links" type="object">
  Useful links to get the first/last and next/previous page of results

  <Expandable title="properties" defaultOpen="true">
    <ResponseField name="first" type="integer">
      A url to retrieve the first page of results
    </ResponseField>

    <ResponseField name="last" type="string">
      A url to retrieve the last page of results
    </ResponseField>

    <ResponseField name="next" type="string">
      A url to retrieve the next page of results, `null` if there is no next page
    </ResponseField>

    <ResponseField name="previous" type="string">
      A url to retrieve the previous page of results, `null` if there is no previous page
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="items" type="Array<T>">
  An array of the items requested
</ResponseField>

<ResponseExample>
  ```json Example theme={null}
  {
    "meta": {
      "page_size": "integer",
      "page": "integer",
      "total_items": "integer",
      "total_pages": "integer",
      "has_next_page": "boolean",
      "has_previous_page": "boolean"
    },
    "links": {
      "first": "string",
      "last": "string",
      "next": "string",
      "previous": "string"
    },
    "items": []
  }
  ```
</ResponseExample>
