# 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="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FNzdatMUjrqQKvNqU5dgl%2Fimage.png?alt=media&#x26;token=712f9a8a-2c20-4f27-9bad-e7834d89b156" 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="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FfREOAQ2iMndGF3tYiKtu%2Fimage.png?alt=media&#x26;token=35a9071c-52c4-4519-b5eb-25d12742717d" 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 %}
