ConceptsPagination
Pagination
How list endpoints page, for Koil resources and platform content alike.
Every paginated list returns a page of results in data, whether there is more in hasMore, and — when there is — a nextCursor to fetch it. Pass limit for the page size:
curl "https://api.koil.co/v1/backfill-requests?profileId=prof_123&limit=1" \ -H "Authorization: Bearer $KOIL_API_KEY" \ -H "Koil-Version: 2026-12-08"{ "data": [ { "kind": "backfill_request", "mode": "live", "id": "bf_2Jd8kQm4ZtPw7XcR1nVb", "profileId": "prof_123", "collection": "instagram.media.posts", "since": "2026-06-01T00:00:00.000Z", "maxItems": 1000, "status": "completed", "stopReason": "reached_since", "emitted": 212, "fetched": 240, "skipped": 28, "oldestEmittedAt": "2026-06-01T08:14:03.000Z", "startedAt": "2026-07-01T10:00:01.000Z", "completedAt": "2026-07-01T10:02:37.000Z", "metadata": {}, "createdAt": "2026-07-01T10:00:00.000Z", "updatedAt": "2026-07-01T10:02:37.000Z" } ], "nextCursor": "WyIyMDI2LTA3LTAxVDEwOjAwOjAwLjAwMFoiLCJiZl8ySmQ4a1FtNFp0UHc3WGNSMW5WYiJd", "hasMore": true}For the next page, pass cursor set to the previous page's nextCursor, with the same filters. Keep going until hasMore is false; the last page has no nextCursor.
curl "https://api.koil.co/v1/backfill-requests?profileId=prof_123&limit=1&cursor=WyIyMDI2LTA3LTAxVDEwOjAwOjAwLjAwMFoiLCJiZl8ySmQ4a1FtNFp0UHc3WGNSMW5WYiJd" \ -H "Authorization: Bearer $KOIL_API_KEY" \ -H "Koil-Version: 2026-12-08"A cursor is opaque: pass it back exactly as you received it. A malformed one is refused with validation_error.
- Koil resources — Connections, Profiles, Apps, publish requests, backfill requests, Event Destinations — page newest first. A cursor stays valid when the item it was taken from is deleted, so a page walk is never cut short.
- Platform content (
GET /v1/profiles/{profileId}/content/{collection}) pages through the platform's own cursor, which Koil passes through asnextCursor. Page sizes and ordering follow the platform; each collection'sliston its platform's page says what it returns. - Eligible profiles (
GET /v1/connections/{connectionId}/eligible-platform-profiles) page through the platform's own account listings (Facebook Pages, a Business Profile chain's locations, LinkedIn Pages), so ordering follows the platform. A page can hold fewer thanlimitprofiles, even none, whilehasMoreistrue, so keep going untilhasMoreisfalserather than stopping at a short page.
Each list endpoint's accepted limit range and filters are on its page in the API endpoints reference.