DEV Community

Discussion on: Pagination in an API: page number vs start index

Collapse
 
joaofbantunes profile image
João Antunes

Yes, on the client side I agree it's simpler (at least if the client is using a table style view using the page numbers for navigation).

Regarding the payload size, I would think there is't much difference, as the client could end up specifying a large page size, the same way it could send a large limit for the index based alternative. Either way, the API should have safeguards in place if it is not desired to support a "give me everything" scenario.