Pattern 38 / EDGE

Pagination (Cursor-Based)

Use this when returning large changing lists without skips or duplicate surprises.

Pressure
Returning large changing lists without skips or duplicate surprises
Mechanism
Return a page plus an opaque cursor anchored to the last seen item/order key
Toll
Harder than offset paging and requires stable ordering
Architecture plate38
Diagram for Pagination (Cursor-Based)
Executive brief

Pagination (Cursor-Based) fits when returning large changing lists without skips or duplicate surprises. Mechanism: return a page plus an opaque cursor anchored to the last seen item/order key. Use it for feeds, timelines, search results, logs, and activity history. The toll: harder than offset paging and requires stable ordering.

Use when

Feeds, timelines, search results, logs, and activity history.

Example

Next page after cursor=created_at+id from previous response.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

API Design Patterns

35API Gateway36Backend for Frontend (BFF)37Rate Limiting39API Versioning
โ† 3739 โ†’