Pagination
Read long lists from the Sayvara API page by page with a cursor, without missing or repeating items.
List completed responses returns its results in pages. Each page has the items and a next cursor:
{
"items": [ { "id": "7b1e4c2a-5f3d-4e8b-9a6c-2d1f0e3b4a5c", "completedAt": "2026-11-01T09:30:00.000Z" } ],
"next": "WyIyMDI2LTExLTAxVDA5OjMwOjAwLjAwMDAwMFoiLCI3YjFlNGMyYS01ZjNkLTRlOGItOWE2Yy0yZDFmMGUzYjRhNWMiXQ"
}Read every page
- Call the operation without
cursor. Setlimitfrom 1 to 200; the default is 50. - Handle the
items. - If
nextis notnull, call again with the same filters andcursorset tonext. - Stop when
nextisnull.
curl "https://api.sayvara.com/v1/data/responses?limit=200&from=2026-11-01T00:00:00Z" \
-H "Authorization: Bearer $SAYVARA_API_KEY"
curl "https://api.sayvara.com/v1/data/responses?limit=200&from=2026-11-01T00:00:00Z&cursor=WyIyMDI2LTExLTAxVDA5OjMwOjAwLjAwMDAwMFoiLCI3YjFlNGMyYS01ZjNkLTRlOGItOWE2Yy0yZDFmMGUzYjRhNWMiXQ" \
-H "Authorization: Bearer $SAYVARA_API_KEY"Good to know
- Responses come oldest first, so new responses appear on the following pages.
- Treat
nextas an opaque string. Pass it back exactly as you received it; do not build or change it yourself. fromincludes responses completed at that time;toexcludes them. To read in daily batches, use the same time astoof one batch andfromof the next.- To pick up new responses on your next run, keep the last
completedAtyou handled and start the next run with it asfrom. Responses completed at exactly that time come again, so skip ids you already have.
Was this page helpful?
Thanks. Need more help? Email support@sayvara.com