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

# Pagination

> Use limit and offset parameters to page through large result sets.

Endpoints that return lists support pagination using `limit` and `offset` query parameters.

## Parameters

| Parameter | Type    | Default | Constraints  | Description                         |
| --------- | ------- | ------- | ------------ | ----------------------------------- |
| `limit`   | integer | `100`   | 1 to 100     | Maximum number of results to return |
| `offset`  | integer | `0`     | 0 or greater | Number of results to skip           |

## Usage

Append `limit` and `offset` as query parameters:

```bash theme={null}
# First 25 results
curl "https://assess.ayliea.com/api/v1/recommendations?limit=25" \
  -H "X-API-Key: ayliea_pk_YOUR_API_KEY"

# Next 25 results
curl "https://assess.ayliea.com/api/v1/recommendations?limit=25&offset=25" \
  -H "X-API-Key: ayliea_pk_YOUR_API_KEY"
```

## Paginated endpoints

The following endpoints support pagination:

| Endpoint                      | Pagination applies to     |
| ----------------------------- | ------------------------- |
| `GET /api/v1/recommendations` | Recommendation list       |
| `GET /api/v1/discovery`       | Discovered platforms list |

The `GET /api/v1/scores` endpoint returns one score per framework and does not support pagination.

## Validation errors

Invalid pagination parameters return a `400` response:

```json theme={null}
// limit out of range
{ "error": "limit must be an integer between 1 and 100" }

// negative offset
{ "error": "offset must be a non-negative integer" }
```

## Tips

* Start with the default `limit` of 100 and add pagination only if you need smaller pages
* If you receive fewer results than your `limit`, you have reached the end of the list
* Results are ordered by the endpoint's default sort (e.g., recommendations are sorted by priority ascending, then created date descending)
