API design · Flashcard

Why do feeds use cursor pagination instead of ?page=N (offset)?

medium Databases

Answer

An offset makes the database skip N rows, which gets slower the deeper you go, and new items shift the pages, so users see duplicates or miss posts. A cursor (e.g. "after id 8231") seeks with an index and stays stable as items arrive.

Review this in your daily deck All cards in API design