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

# Pagination

> Learn about how Nightly paginates content

In this guide, we will look at how to work with paginated responses when querying the Buckets API. By default, all responses limit results to 100. However, you can go as high as 1000 by adding a `limit` parameter to your requests.

When an API response returns a list of objects, no matter the amount, pagination is supported. In paginated responses, objects are nested in a `data` attribute and have a `has_more` attribute that indicates whether you have reached the end of the last page.

If `has_more` is set to true, a property called `next_uri` will also be present which points you to the next API call.

<Note>Our [libraries](/libraries) handle pagination automatically.</Note>

In this example, we request the page that starts after the user with id `nly_test_usr_8gkde9034zx`. As a result, we get a list of 100 users and can tell by the `has_more` attribute that we have reached the end of the resultset.

<RequestExample>
  ```bash Request
    curl -G https://api.nightly.sh/v1/users \
      -H "Authorization: Bearer {token}" \
      -d after="nly_test_usr_8gkde9034zx" \
      -d limit=100
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "has_more": false,
    "data": [
      {
        "id": "nly_test_usr_1amaj5125as",
        "username": "johndoe",
        "active": true,
        "permissions": {},
        "created_at": 692233200
      }
    ]
  }
  ```
</ResponseExample>
