# Automatic Pagination

## Overview

Pagination is used by APIs to divide a large amount of data into smaller chunks that are more manageable to retrieve and transfer.

### Manual pagination

If you implement pagination manually in a flow, you have to use

* a Looper,
* a special loop condition,
* sometimes a Dict Helper references the actual list of entities in the response, and
* a Dict Helper to flatten the loop's output

in order to get the results from all pages from a Connector.

<figure><img src="/files/SBhRjqgT6EMt10arKciq" alt="" width="563"><figcaption><p>Manual way of getting results from all pages</p></figcaption></figure>

### Automatic pagination

With Automatic Pagination the process is much simpler: Just toggle the **Retrieve all data** switch button on supported actions:

<figure><img src="/files/fDUt0gdSdhiOmbzrtGoy" alt="" width="563"><figcaption><p>Retrieve all data option</p></figcaption></figure>

This will automatically do the entire pagination logic and will output a nice 'flat' list of records, ready to be further used inside the flow, thus replacing the manual 4-step process with a button click.

{% hint style="info" %}
The maximum number of pages is currently limited to 100 pages.

Please contact us in case you're running into this limitation.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.locoia.com/automation/flow-builder/automatic-pagination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
