Skip to Content
Developer docs

Pagination

Walk through long lists with cursors.

The list endpoints (GET /v1/experiences and GET /embed/server/experiences) return experiences newest first, one page at a time.

ParameterMeaning
limitHow many to return, 1 to 100. 50 by default.
cursorThe previous page's nextCursor.
statusOnly experiences with this status.
orderReferenceOnly experiences with this order reference.
{
  "items": [{ "experienceId": "…" }, { "experienceId": "…" }],
  "nextCursor": "eyJpZCI6…"
}

Pass nextCursor back as cursor until it is absent. A page can hold fewer items than limit when filters skip rows, even when more pages follow, so always go by nextCursor, not by the page size.

let cursor;
do {
  const query = new URLSearchParams({ status: 'ready', ...(cursor ? { cursor } : {}) });
  const response = await fetch(`https://api.meishi.cards/v1/experiences?${query}`, {
    headers: { Authorization: `Bearer ${process.env.MEISHI_API_KEY}` },
  });
  const page = await response.json();
  for (const experience of page.items) console.log(experience.scanUrl);
  cursor = page.nextCursor;
} while (cursor);

Cursors are opaque: do not build or change them. A changed cursor answers 400 invalid_cursor.