Cursor beats offset
Some APIs page by offset (?skip=100), which breaks when items are added in the middle. A cursor (an opaque token pointing at the last item seen) does not shift. Prefer the cursor when the list changes while you read it.
Stop on empty, not on next
A page can have a next that returns empty, or return items with no next. End the loop when a page has no items, not only when next is missing, so a trailing empty page does not spin forever.