Paginate by hand with from_id
Pagination is keyset, not offset, in ascending id order. Start at from_id=0; each list response then returns next_from_id — the cursor for the following page — and null on the last page. A call without from_id returns the first page in the table's default sort and no cursor. This is the loop the auto-paging iterator runs for you, written out by hand.
1. Follow next_from_id until it is null
The first request passes from_id=0; each subsequent one passes the previous page's next_from_id.
let fromId = 0 let total = 0 let pageNum = 0 for (;;) { const page = await api.nba.teams.list({ limit: 100, from_id: fromId }) pageNum += 1 total += page.teams.length console.log(`page ${pageNum}: ${page.teams.length} rows, next cursor = ${page.next_from_id ?? 'none'}`) if (page.next_from_id === null) break fromId = page.next_from_id } console.log(`walked ${total} teams across ${pageNum} pages by hand`)