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

# Pagination

> List endpoints always return paged results.

To make it easier to work with list endpoints, our API uses cursor based pagination.

Cursor-based pagination is an efficient method for retrieving paginated results from a data set, especially in cases where data changes frequently or the dataset is very large. It works by using a cursor—a unique identifier or pointer representing the current position in the dataset. This approach avoids the potential pitfalls of offset-based pagination (e.g., performance degradation or duplicate/missing results when data changes between requests).

## How It Works

1. Initial Request:

* The client requests the first page of results. The server returns the requested items along with a cursor pointing to the next position in the dataset.

2. Subsequent Requests:

* For subsequent pages, the client includes the cursor received from the previous response in the request.
* The server uses this cursor to determine where to start fetching the next set of results.

3. Final Page:

* If there are no more results, the server indicates this, often by omitting the cursor or returning an empty data set.

### Example

Take the last `Id` of the result and pass it as the `nextOffset` parameter. The `hasMore` parameter will indicate if there are more results.

```json theme={null}
{
    "results": [
        {
          ...
        },
        {
          "id" : "daf7afac-94f6-4b23-91da-01259fae8b96"
          , ...
        }
    ],
    "nextOffset": "daf7afac-94f6-4b23-91da-01259fae8b96",
    "hasMore": true
}
```
