Catalogian uses cursor-based pagination for all list endpoints. Cursors are opaque strings that point to a position in the result set — more reliable than offset-based pagination for data that changes frequently.
Every paginated response includes a hasMore boolean and a nextCursor string. Pass nextCursor as the cursor query parameter in your next request to get the next page.
# First page GET /v1/sources/:id/delta?limit=10 # Response includes: # "hasMore": true, # "nextCursor": "eyJpZCI6ImV2dF8wMWou..." # Next page GET /v1/sources/:id/delta?limit=10&cursor=eyJpZCI6ImV2dF8wMWou...
| Endpoint | Default limit | Max limit |
|---|---|---|
GET /v1/sources/:id/delta | 50 | 200 |
GET /v1/sources/:id/delta/:deltaEventId/rows | 50 | 200 |
GET /v1/sources/:id/snapshot-rows | 50 | 200 |
GET /v1/sources/:id/snapshots | 100 | 100 |
{
"sourceId": "src_01j...",
"count": 10,
"hasMore": true,
"nextCursor": "eyJpZCI6ImV2dF8wMWou...",
"events": [ ... ]
}The array key varies by endpoint (events, rows, or snapshots), but the pagination fields are always the same.
Fetch all delta events for a source, page by page:
const API = "https://api.catalogian.com/v1";
const headers = { Authorization: "Bearer cat_live_..." };
async function fetchAllDeltaEvents(sourceId) {
const allEvents = [];
let cursor = null;
do {
const url = new URL(`${API}/sources/${sourceId}/delta`);
url.searchParams.set("limit", "200");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers });
const data = await res.json();
allEvents.push(...data.events);
cursor = data.hasMore ? data.nextCursor : null;
} while (cursor);
return allEvents;
}since on the delta endpoint to paginate only recent events.Need help with authentication? Authentication & API Keys →