Skip to content

Pagination & Search

Use cursor pagination consistently and understand when the API switches to search-backed queries.

Most list endpoints use cursor pagination with:

  • request: limit, cursor
  • response: before, after, limit

Basic Pattern

const page1 = await client.event.list({ limit: 20 });

const page2 = await client.event.list({
  limit: 20,
  cursor: page1.after ?? undefined,
});

after points forward. before is for reverse navigation when supported by the endpoint implementation.

Search-Backed Mode

For many resources, sending query switches to search-backed pagination instead of plain DynamoDB reads.

Examples:

  • event.list({ query: "festival" })
  • order.list({ query: "john doe" })
  • ticket.list({ query: "jane" })

Endpoint-Specific Notes

  • tickets.list requires at least one of: promoterId, eventId, customerId, or orderId.
  • orders.list supports mine: true for current-user order views.
  • events.list supports advanced filters (visibility, genres, categories, geo, date range).

Good Defaults

  1. Start with limit: 20.
  2. Persist cursors in UI state for back/forward pagination.
  3. Keep filters stable between page fetches.
  4. Treat cursors as opaque values.