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

# Pagination

Some of the top-level API resources have support for bulk fetches through “list” API methods.
For example, you can list groups or list workspace users.
These list API methods share a common structure and accept, at a minimum, the two parameters: `limit` and `cursor`.

folk's list API methods use an opaque cursor-based pagination through the `cursor` parameter. When you perform the first request on a paginated resource, you can receive a `pagination.nextLink` value in the response.
This value contains the full URL of the next page of results. You can either use this URL directly or pick the `cursor` parameter from the URL and use it in the next request. <br />
If there are no more pages of results, the `pagination.nextLink` will be omitted from the response.

The `limit` parameter is used to limit the number of objects returned in the response. The maximum number of objects you can return in a single request and the default value of this parameter depends on the resource requested. Check the documentation of the endpoint you are requesting for more information about the default and maximum values.

#### Example

Initial request to list groups:

```http theme={null}
GET https://api.folk.app/v1/groups
```

```json theme={null}
{
  "data": {
    "items": [
      ...
    ],
    "pagination": {
      "nextLink": "https://api.folk.app/v1/groups?limit=20&cursor=eyJvZmZzZXQiOjIwfQ%3D%3D"
    }
  }
}
```

Use the `nextLink` value to fetch the next page of results:

```http theme={null}
GET https://api.folk.app/v1/groups?limit=20&cursor=eyJvZmZzZXQiOjIwfQ%3D%3D
```

```json theme={null}
{
  "data": {
    "items": [
      ...
    ],
    "pagination": {}
  }
}
```

No `nextLink` value means there are no more pages to fetch.
