topic
Verified 2026-09-18

HTTP API Pagination

Pagination limits response size and gives clients a stable way to traverse a changing collection.

Prefer opaque cursor pagination for frequently changing data. Return a clear next link or cursor, define ordering and consistency, and enforce limits server-side.

httpapicollectionsperformance

Reference (http)

GET /api/events?limit=50&after=opaque-cursor HTTP/1.1
Link: </api/events?limit=50&after=next>; rel="next"

Prefer opaque cursor pagination for frequently changing data. Return a clear next link or cursor, define ordering and consistency, and enforce limits server-side.

Common mistakes

  • Using page numbers for a rapidly changing collection and allowing client-controlled limits to exhaust memory or bandwidth.
Permalink: https://merginit.com/reference/http/pagination