Skip to content
APIs & Webhooks

What is Cursor vs Offset Pagination?

Two ways to page lists: offsets skip N rows but drift as data changes; cursors anchor to a stable row id. Feeds and chat histories need cursors, where new inserts must never shift or duplicate pages.

Example

Chat message history pages by cursor on message id; loading older messages never skips or repeats rows even while new messages arrive mid-scroll.

What people get wrong

Using OFFSET for live feeds. Inserts shift every page boundary, so users see duplicates and gaps; reserve offsets for stable admin exports.

Sources

Browse all APIs & Webhooks terms →