N Docs
← Back to site

Pagination and filters

1 min readUpdated November 23, 2026

Lists come in pages, and feeds are read in order with a cursor.

Lists#

Lists take ?limit= and ?offset=, and answer { "data": […], "meta": {…} }.

# The second page of 50 links
curl "https://api.yourbrand.com/api/links?limit=50&offset=50" -H 'Authorization: Bearer nl_live_…'

Read every page in a loop:

let offset = 0, all = [];
while (true) {
  const res = await fetch(`${BASE}/api/links?limit=100&offset=${offset}`, { headers });
  const { data } = await res.json();
  all.push(...data);
  if (data.length < 100) break;
  offset += 100;
}

Feeds#

Feeds (/api/partner/clicks, /api/partner/events, /api/site/clicks) are read oldest first with ?after_id=: pass meta.next_after_id (or the last id you got) as after_id on the next call.

let after = loadSavedCursor() || 0;
const res = await fetch(`${BASE}/api/partner/clicks?after_id=${after}&limit=500`, { headers });
const { data, meta } = await res.json();
process(data);
saveCursor(meta.next_after_id ?? after);

Save the cursor after each batch. If your job stops, it carries on from the same place, with nothing missed or read twice.

Common filters#

FilterOnExample
?domain_id=LinksOnly links on one domain
?search=ClientsName or email contains
?external_id=ClientsFind by your own ID
?client=Partner listsOne client’s items
?days=StatsThe last N days
?from=&to=StatsA range, in Unix seconds

Filters combine: ?client=ext:user_42&days=7.