Skip to content

Cursor-Based Pagination Guide

Klozeo uses cursor-based (keyset) pagination, not offset-based. This prevents duplicate or skipped results when data changes between pages.

Parameter Default Max Description
limit 50 1000 Results per page
cursor None None Opaque token from previous response
{
"leads": [...],
"next_cursor": "eyJpZCI6ImNsXzAxMjM...",
"has_more": true,
"count": 50
}
Field Description
next_cursor Pass as cursor in next request. Null if no more pages.
has_more true if there are more results
count Number of results in this page
Terminal window
# First page
curl "https://api.klozeo.com/api/v1/leads?limit=50" \
-H "X-API-Key: sk_live_your_key"
# Next page
curl "https://api.klozeo.com/api/v1/leads?limit=50&cursor=eyJpZCI6ImNsXzAxMjM..." \
-H "X-API-Key: sk_live_your_key"
  • The cursor is opaque: do not parse or construct it manually.
  • Cursors encode the current sort position. Changing sort_by or sort_order invalidates the cursor.
  • Filters are preserved across pages: pass the same filter params with each request.
  • For complete dataset export without pagination, use the Export endpoint instead.