Offset pagination
total, page, and per_page values to decide whether another page exists. Respect endpoint maximums.
Cursor pagination
next_cursor back unchanged. Cursors are opaque: do not decode, sort, or construct them.
Safe collection loops
- Keep filters and sort parameters unchanged on every page.
- Store the last cursor before processing records.
- Deduplicate by public
idwhen consuming pages asynchronously. - Handle
429and5xxresponses without advancing the cursor.