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

# Filtering and pagination

> Learn to filter and paginate requests

Most endpoints that return a list of entities support filtering and pagination. Use the following **URL paramaters** to control the content returned by the endpoint.

| Parameter | Description                                                                                                                                                          | Default value |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `cursor`  | Endpoints that support pagination and have more results available will return a cursor value in `meta.cursor` . Use this value to retrieve the next page of results. | `undefined`   |
| `limit`   | Limit the number of results, with a minimum value of `1` and a maximum value of `100`.                                                                               | `50`          |

## Response structure

Endpoints returning a list of entities will always return an object containing two keys:

* `items` : An array of entities
* `meta`: An object with the following keys:
  * `total` : The total number of items of this resource
  * `links` : Direct links to the current resource, and first and last pages.
  * `cursor`: The value of the cursor to use to retrieve the next page

```json theme={"dark"}
{
  "items": [/* ... */],
  "meta": {
    "total": 241,
    "cursor": "9b8e2d44",
    "links": {
      "self": {
        "href": "https://api.algure.com/v1/countings?cursor=6f3e7f9a"
      },
      "first": {
        "href": "https://api.algure.com/v1/countings"
      },
      "next": {
        "href": "https://api.algure.com/v1/countings?cursor=9b8e2d44"
      }
    }
  }
}
```
