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

# Pagination

> Learn how to handle paginated responses in the NeetoEngage API.

The [List voters of a feature request](/api/feature-requests/list-voters), [List feature requests a customer voted for](/api/votes/list) and [List changelogs](/api/changelogs/list) APIs are paginated.

[Search feature requests](/api/feature-requests/search) is not paginated. It takes `per_page` instead, with a maximum of 15 results. [List tracks](/api/tracks/list) returns all tracks in one response.

## Pagination parameters

You can control pagination using the following query parameters:

<ParamField query="page" type="integer">
  The page of results you want to retrieve (starting from 1).
</ParamField>

<ParamField query="page_size" type="integer">
  The number of items to return per page. The maximum is 100.
</ParamField>

## Example usage

Here's how to retrieve paginated results:

<CodeGroup>
  ```bash cURL theme={"system"}
  curl --request GET \
    --url "https://{your-subdomain}.neetoengage.com/api/external/v1/changelogs?page=2&page_size=10" \
    --header 'X-Api-Key: your-api-key'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch(
    "https://{your-subdomain}.neetoengage.com/api/external/v1/changelogs?page=2&page_size=10",
    {
      method: "GET",
      headers: {
        "X-Api-Key": "your-api-key",
        Accept: "application/json",
      },
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={"system"}
  import requests

  url = "https://{your-subdomain}.neetoengage.com/api/external/v1/changelogs"
  params = {
      "page": 2,
      "page_size": 10
  }
  headers = {
      "X-Api-Key": "your-api-key",
      "Accept": "application/json"
  }

  response = requests.get(url, params=params, headers=headers)
  data = response.json()
  print(data)
  ```
</CodeGroup>

This retrieves the second page of changelogs, with 10 results per page.

## Response structure

Paginated responses include the pagination fields at the top level, next to the list of records:

```json Response example theme={"system"}
{
  "changelogs": [
    // ... array of changelog objects
  ],
  "page": 2,
  "page_size": 10,
  "total_count": 34,
  "total_pages": 4
}
```

<ResponseField name="page" type="integer">
  The current page number.
</ResponseField>

<ResponseField name="page_size" type="integer">
  The number of items per page.
</ResponseField>

<ResponseField name="total_count" type="integer">
  The total number of items across all pages.
</ResponseField>

<ResponseField name="total_pages" type="integer">
  The total number of pages available. This is at least 1, even when there are no items.
</ResponseField>

## Default behavior

<Note>
  * If you leave out `page`, you get the first page.
  * If you leave out `page_size`, each page has 25 items.
  * A `page_size` above 100 is lowered to 100.
  * A page past the last one returns an empty list.
</Note>

## Best practices

1. **Start with reasonable page sizes**: Use page sizes between 10-100 items for optimal performance.
2. **Handle empty results**: Always check if the returned array is empty to detect the end of data.
3. **Use total\_pages**: Stop when `page` reaches `total_pages`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.