Skip to developer documentation
Browse developer documentation
API documentation

Get started

Pagination and completeness

Follow continuation cursors and distinguish complete totals from a limited list of rows.

Read every returned continuation

limit is a whole number from 1 to 500, default 50, where supported. Larger-site sales, breakdowns, standard stages and live visitors can return next_cursor. Saved-funnel definitions can also be paginated.

When next_cursor is a non-empty string, call the same endpoint with cursor set to that value. Keep the original site, report, dates, model and funnel selection. Treat the cursor as opaque and URL-encode it with your HTTP client's query builder.

Stop when next_cursor is null or absent. Some smaller-site responses only return the first limited rows and omit a cursor; do not treat absence as proof you exported every stored record.

Read a paginated source report

This server-side Node.js example follows only cursors actually returned by the API. Its rows are the available result pages, not a guaranteed historical backup.

javascript
const rows = [];
const query = new URLSearchParams({
  site: process.env.ATTRIBOO_SITE, from: "2026-10-01",
  to: "2026-10-07", compare: "none", limit: "100"
});
do {
  const response = await fetch(
    "https://www.attriboo.com/api/v1/stats/sources?" + query,
    { headers: { Authorization: "Bearer " + process.env.ATTRIBOO_TOKEN } }
  );
  const result = await response.json();
  if (!response.ok) throw new Error(result.error?.message || "Request failed");
  rows.push(...result.data.rows);
  if (!result.data.next_cursor) break;
  query.set("cursor", result.data.next_cursor);
} while (true);

Understand cursor lifetime and live data

Breakdown and detailed-report cursors expire after 24 hours and fix relative date selections. Sales cursors have their own bounded contract; use them promptly. A stale or mismatched cursor returns an error: restart from the first page.

Live-visitor continuation pages keep the original five-minute window. Reload the first request to see current visitors. Reports remain live across imports and edits; a cursor is not an immutable backup snapshot.

AI-search, time-to-purchase and a selected saved funnel have no continuation page. For ordered funnels, list with funnel=saved and then request funnel=ID.

Check coverage when present

Database-backed responses may include coverage.complete, historyFrom, snapshotAt, total_rows and returned_rows. Complete describes the supported report computation; returned_rows describes this page. Some report families add their own coverage fields.

Headline totals can cover more rows than a visible detail table. Do not add the same total again for each page, and do not infer a complete export from a single limited page.