Pagination
Cursor-based pagination for every list, with limits and a complete shell loop.
Lists take ?limit= (1–100, default 25; out-of-range values are clamped, never
refused) and ?cursor=. Pass back the nextCursor you were given until hasMore is
false.
{ "items": [], "nextCursor": "…", "hasMore": true }The cursor is opaque: do not build or edit one. A tampered cursor is a 400.
Walk every page
cursor=""
while :; do
page=$(curl -s -H "Authorization: Bearer $TOKEN" "$BASE/sources?limit=50${cursor:+&cursor=$cursor}")
echo "$page" | jq -r '.items[] | "\(.short_id)\t\(.url)"'
[ "$(echo "$page" | jq -r .hasMore)" = true ] || break
cursor=$(echo "$page" | jq -r .nextCursor)
doneWhy cursors
A page is keyed on the last row's sort value, never an offset, so a source saved while you page through does not shift or repeat what you see. Keep the same filters and sort for every page of one walk.
Reads that are not paginated
A few reads deliberately return everything at once, and say so in the API reference:
- the folder tree (
GET /folders) - every saved URL (
GET /sources/urls), meant for a local "is this saved?" cache - tag suggestions (
GET /tags/suggest), a ranked top-N - reactions on a source