What metadata should a paginated API response include to help clients navigate large collections?

Last updated 29 June 2026

  • Navigation links (next, prev, first, last) so clients follow links instead of building URLs. For cursors include next_cursor and has_more.

  • Position and size: page, page_size, and total_count/total_pages when feasible (exact counts can be expensive on huge tables).

  • Place it in a body meta/links envelope or in headers like Link and X-Total-Count.

  • https://github.com/NationalBankBelgium/REST-API-Design-Guide/wiki/Pagination-Rules-and-metadata
  • https://refgrow.com/blog/best-practices-for-api-design
  • https://www.digitalapplied.com/blog/rest-api-design-2026-engineering-reference-best-practices
All REST API interview questions