DEV Community

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

Collapse
 
rhymes profile image
rhymes

I don't think there's much of a difference between the two. A page number is basically a mnemonic aid that gets translated by a paginator to an offset and a limit with the page size. APIs are for people so I would go with pages, it's also at an higher level somewhat

Collapse
 
joaofbantunes profile image
João Antunes

Yes, I agree. The end result is exactly the same, it's just for ease of understanding the API and maybe depending on the way the information is displayed, spare the client some math.