Skip to Content
FanConvert Docs
REST API

Pagination

Cursor pagination — items, nextCursor, cursor and limit.

1 min readOpen in ChatGPTOpen in Claude

Growing lists are paginated by cursor:

{ "items": [ … ], "nextCursor": "eyJ…" }
  • Pass nextCursor back as the cursor parameter for the next page; null = last page.
  • limit goes from 1 to 100 (50 by default).
  • A cursor is opaque: do not build or edit it.
let cursor = null;
do {
  const url = new URL("https://app.fanconvert.ai/public/v1/creators/emma-demo/conversations");
  if (cursor) url.searchParams.set("cursor", cursor);
  const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.FANCONVERT_API_KEY}` } });
  const page = await res.json();
  for (const conversation of page.items) console.log(conversation.id);
  cursor = page.nextCursor;
} while (cursor);

Last updated on