Parameters
| Parameter | Default | Max | Notes |
|---|---|---|---|
limit | 50 | 250 | Number of items in the response. |
cursor | — | — | Opaque token from the previous response. |
Response shape
Every list response carries apagination block:
next_cursoris the token to pass on the next request, ornullif there are no more pages.has_moreis a boolean shortcut. Equivalent tonext_cursor !== null.
Looping through everything
- The first request omits
cursorentirely. Don’t passcursor=nullorcursor=— that’s abad_request. limit=250is the highest the API allows. You almost always want it for back-fills and full syncs; use a smallerlimitfor interactive UIs where time-to-first-result matters.- The cursor is the only state you need to persist between pages. If a sync job crashes mid-way, store the cursor and resume.
Single-resource endpoints
Endpoints that return one resource —/v1/cards/{id}, /v1/sets/{code} — don’t paginate. The pagination block on these responses is always:
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_cursor | Cursor is malformed, expired, or from another path. |
| 400 | bad_request | limit is non-numeric or > 250. |
/v1/cards?element=fire against /v1/cards?element=water is invalid_cursor. The fix: drop the cursor and start over.