Skip to main content

Pagination methods

ButterCMS offers two pagination approaches, each suited to different use cases. These methods are mutually exclusive - use one or the other, not both.

Page-based pagination

Page-based pagination is the most common approach and is ideal for traditional “page 1, page 2, page 3” navigation patterns. Parameters:
  • page - Page number (default: 1, minimum: 1)
  • page_size - Number of items per page (default: 10, minimum: 1, maximum: 100)
Example Request:
Response Structure:
React Implementation:

Offset-based pagination

Offset-based pagination is ideal for infinite scroll implementations and more flexible navigation patterns. Parameters:
  • limit - Maximum number of items to return (default: 10, minimum: 1, maximum: 100)
  • offset - Number of items to skip before returning results (default: 0, minimum: 0)
Example Request:
Response Structure:
Infinite Scroll Implementation:

Choosing the right pagination method

Filtering paginated results

To filter by author, category, tags, or custom field values, see Filtering Requests.

Combining pagination and filtering

Performance tips for pagination

  • 10-25 items is optimal for most use cases
  • Larger page sizes increase response time and payload
  • Smaller page sizes (under 10) may require excessive requests for large content sets
  • Consider your content type: text-heavy items warrant smaller pages
For blog post listings, always include exclude_body=true:
See Query Optimization for more on exclude_body and levels.
Implement client-side or server-side caching for paginated results:

Building archive pages

A common use case is building blog archive pages with category and date filtering: