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

# Pagination

All top-level resources support pagination. All `Find` methods return a list of results along with pagination details. Each query can return up to 100 results. The most performant and reliable method for pagination is **cursor-based**, but **offset-based pagination** is also supported.

## Cursor-Based Pagination

Cursor-based pagination is used by default. If the cursor argument is empty or omitted, results begin at the start of the dataset (by default ordered by ascending `id`).

```json theme={null}
{
  "next": "https://sandbox.elationemr.com/api/2.0/allergies?cursor=cD0xMDYxNzEyNjg0Nzc3NDk2",
  "previous": null,
  "results": [
    { ... },
    { ... },
    { ... }
  ]
}
```

* `next`: URL for the next page of results
* `previous`: URL for the previous page (if available)
* `results`: The current page of data

## Offset-Based Pagination

If an `offset` parameter is provided, the API will use offset-based pagination. This method uses the `limit` and `offset` parameters.

```json theme={null}
{
  "count": 123,
  "next": "https://sandbox.elationemr.com/api/2.0/allergies/?limit=10&offset=10",
  "previous": "https://sandbox.elationemr.com/api/2.0/allergies/?limit=10",
  "results": [
    { ... },
    { ... },
    { ... }
  ]
}
```

* `count`: The total number of items in the full result set
* `next`: URL for the next page of results
* `previous`: URL for the previous page of results
* `results`: The current page of data

***

**Summary:** Use cursor-based pagination whenever possible for the best performance and reliability. Offset-based pagination remains available for users that require it.
