SELECT ... LIMIT 20 OFFSET 200. Simple, but slows on large offsets: the DB still scans part of the table to skip the first 200 rowsWHERE id > {last_id} LIMIT 20. Stable speed regardless of pagination depth. Recommended for large tables and real-time feedsReturn metadata alongside data: current page, total items, links to next/previous. For cursor-based — a next cursor token.
{
"data": [...],
"meta": { "total": 1240, "per_page": 20, "next_cursor": "abc123" }
}