core practice · coding problem

Design cursor pagination

List endpoint returns 10M rows. Why offset pagination fails? Sketch cursor on (created_at, id).

The mechanism

An API is a contract you cannot easily change. Design for evolution: version it, paginate every list, make errors machine-readable, and keep resources consistent.

Study API Design

Expected evidence

Offset scans skip rows; cursor is stable under inserts.

Try this drill in the practice workspace →

Hints when you need them
  • Opaque cursor encodes position.
  • Consistent sort key required.

Watch for these mistakes

  • Unpaginated list endpoints that fall over at scale
  • Breaking changes without a version bump
  • Inconsistent error shapes across endpoints

Check the sources

Browse all practice briefs