# Paginate results (https://developer.godaddy.com/en/docs/api-users/pagination)

***

title: Paginate results
description: Cursor-based pagination on v1 list endpoints with limit and marker.
agentNotes:
permissions: \["Any account"]
scopes: \["Any scope that allows list operations — e.g. domains.domain:read for GET /v1/domains"]
rateLimit: "Rate-limited per credential per window. Page sequentially rather than in parallel to stay within limits. Go to /docs/api-users/rate-limits for current values."
idempotent: true
destructive: false
failureRecovery: "Cursor markers (marker query param) are stable. Safe to retry any page request with the same marker value. If a marker becomes invalid, restart pagination from the first page."
related:
guides:

* title: "List registered domains"
  href: "/docs/api-users/manage-domains/list"
* title: "Handle rate limits"
  href: "/docs/api-users/rate-limits"
  concepts:
* title: "Error handling"
  href: "/docs/api-users/errors"

***

## Overview

List endpoints return paginated results using cursor-based pagination. Use pagination to walk large result sets without hitting [rate limits](https://developer.godaddy.com/docs/api-users/rate-limits) from parallel requests. The most common paginated endpoint is [list domains](https://developer.godaddy.com/docs/api-users/manage-domains/list).

## v1 cursor pagination

`GET /v1/domains` accepts two pagination query parameters:

| Parameter | Default        | Description                                     | Note                                                          |
| --------- | -------------- | ----------------------------------------------- | ------------------------------------------------------------- |
| `limit`   | Server default | Maximum number of items to return in this page. |                                                               |
| `marker`  | None           | Cursor pointing to the start of the next page.  | Set to the last item's identifier from the previous response. |

To page through all results, repeat the request with `marker` set to the last item's domain name from the previous page until the response array is shorter than `limit`.

```bash
# First page
curl -s "https://api.godaddy.com/v1/domains?limit=100" \
  -H "Authorization: Bearer $GODADDY_PAT"

# Subsequent pages — marker is the last domain from the previous page
curl -s "https://api.godaddy.com/v1/domains?limit=100&marker=last-domain-from-previous-page.com" \
  -H "Authorization: Bearer $GODADDY_PAT"
```

### Looping example

This pattern walks every page until the response is shorter than `limit`:

```js
const PAGE_SIZE = 100;
let marker = "";
const all = [];

while (true) {
  const url = new URL("https://api.godaddy.com/v1/domains");
  url.searchParams.set("limit", PAGE_SIZE);
  if (marker) url.searchParams.set("marker", marker);

  const res = await fetch(url, {
    headers: {
      Authorization: "Bearer " + process.env.GODADDY_PAT,
    },
  });
  const page = await res.json();
  all.push(...page);

  if (page.length < PAGE_SIZE) break; // last page
  marker = page[page.length - 1].domain;
}
```

## v2 list endpoints

v2 list endpoints (for example, domain forwarding lists, action lists) return the full collection in a single response and do not support `limit` or `marker` parameters.

## Pagination and retries

Cursor pagination is safe to interrupt and resume. The `marker` value remains valid as long as the underlying domain still exists in the account. If a request fails mid-walk, retry the same `(limit, marker)` pair.
