What metadata should a paginated API response include to help clients navigate large collections?
Last updated
Navigation links (
next,prev,first,last) so clients follow links instead of building URLs. For cursors includenext_cursorandhas_more.Position and size:
page,page_size, andtotal_count/total_pageswhen feasible (exact counts can be expensive on huge tables).Place it in a body
meta/linksenvelope or in headers likeLinkandX-Total-Count.