page and limit query parameters. Where they differ is how they report the totals back, and there are two styles:
The caps differ too, so don’t carry an assumption from one family to another. Check the table below before hardcoding a value.
Per-endpoint defaults
page defaults to 1 on every paginated endpoint.
Custom Lists cap page differently. Instead of a flat ceiling, page × limit cannot exceed 10,000, so the last reachable page depends on the page size you chose: 200 at the default limit=50, 20 at limit=500, 10,000 at limit=1. Larger pages buy you fewer of them.
Endpoints not listed here either don’t paginate (they use a different model —
GET /sync/all-items uses date_from for incremental sync) or accept a much larger fixed window (e.g. GET /sync/playback returns up to 10,000 items in one shot). When in doubt, check the endpoint’s own reference page.Query parameters
limit above the endpoint’s cap, the server silently clamps it down — no error, no warning, just fewer items than you asked for. Same for a page above the ceiling. Read back what you actually got rather than assuming your request was honoured.
Clamping only applies to values that are numbers. On Custom Lists a non-numeric page or limit is rejected outright with 400 wrong_parameter — and because -1 isn’t a digit string, negative values are rejected rather than clamped.
Response headers
Header-paginated responses include:
Custom Lists send none of these headers. Read the
pagination object in the body instead.
The pagination object
Custom Lists carry their totals inline:
page and limit report what the server actually used after clamping, so compare them against what you sent to find out whether your request was adjusted.
On
GET /lists/{id}, don’t confuse pagination.total_items with counts.items. counts.items is how many titles the list holds; pagination.total_items is how many the current query matched. They usually agree, but only counts.items is the list’s real size.A simple paginator
These snippets default to a conservativelimit=50 that fits inside every paginated endpoint’s cap. Bump to 60 if you’re hitting a genre or premieres endpoint and want bigger pages.
They read the headers, so they work on every endpoint except Custom Lists — for those, read total_pages out of the body instead.