What it is
Pagination lets you retrieve large collections in bounded responses. YCloud list endpoints use either page-number or cursor pagination.Before you begin
Check the endpoint reference for its supported pagination parameters, filters, sort order, and response shape. Do not assume every list endpoint uses the same strategy.How it works
Request one page, process its items, and continue until the response indicates that no next page exists. Keep the same filters and sort settings for the entire traversal.Request and response
Page-number pagination
Most list endpoints support these query parameters:Offset-based endpoints commonly cap both
page and limit at 100, limiting
traversal to the first 10,000 items. Check each endpoint’s limits and use
cursor pagination when it is supported and you need a larger result set.length equals limit. Stop when length is less than limit.
Cursor pagination
Endpoints that returncursor.after support cursor pagination. Pass that value as pageAfter in the next request.
items, limit, length, and, when more results
exist, cursor.after. The cursor object is returned only by endpoints that
support cursor pagination.
length is 0 or the response no longer contains cursor.after.
Pagination and filter parameters vary by endpoint. Check the API reference before implementing a list operation.
Implementation checklist
- Set an explicit
limitinstead of depending on the default. - Preserve filters between page requests.
- Stop on the response condition, not on a guessed page count.
- Handle an empty first page as a successful result.
- Add a maximum page or item guard for background jobs.

