The problem
A report has 1,400 records, but your script, Make Request step or export only ever gets the first few hundred. No error, just missing data.
Why it happens
Quickbase’s RESTful API uses size-based pagination on run query (POST /v1/records/query) and run report (POST /v1/reports/{id}/run). It returns as many records as fit, based on the approximate size of each record. Wide tables with many fields return fewer records per page. Every response includes a metadata object:
"metadata": { "totalRecords": 1400, "numRecords": 312, "numFields": 18, "skip": 0, "top": 0 }
If numRecords is less than totalRecords, there’s more to fetch.
The fix: loop until you have everything
async function queryAll(tableId, select, where) {
const all = [];
let skip = 0;
while (true) {
const res = await qbFetch('https://api.quickbase.com/v1/records/query', {
method: 'POST',
headers, // QB-Realm-Hostname, Authorization, Content-Type
body: JSON.stringify({
from: tableId, select, where,
sortBy: [{ fieldId: 3, order: 'ASC' }], // stable order: Record ID#
options: { skip },
}),
});
const { data, metadata } = await res.json();
all.push(...data);
skip += metadata.numRecords;
if (metadata.numRecords === 0 || skip >= metadata.totalRecords) break;
}
return all;
}
For run report, skip and top go on the query string instead (/v1/reports/{id}/run?tableId=...&skip=...).
Gotchas
- Sort by a stable key such as Record ID#. Without a fixed order, records can shift between pages and you’ll get duplicates or gaps.
- Data can change mid-loop. For exports that must be exact, filter on Date Modified up to a fixed timestamp captured before the first page.
- Select only the fields you need. Fewer fields per record means more records per page and fewer calls.
- Pipelines Make Request steps that call the API get one page per call. Use the Quickbase channel’s search steps, or loop with skip, if you need the full set.
- Respect rate limits while looping. Use backoff on 429s (see handling rate limits).
How to prevent it
Never assume one API call returns everything. Make every query helper paginate by default and log totalRecords vs. records received.