Skip to main content

Installation

Requirements: Node.js version 20 or greater for server-side usage.

Initialization

Initialize the SDK with your Read API token from the ButterCMS Settings.

Configuration options

You can customize the SDK behavior by passing an options object:

API methods

All methods return Promises and support both .then()/.catch() and async/await patterns.

Pages

Retrieve and search pages created in the ButterCMS dashboard.

Collections

Fetch content from Collections (structured data tables).

Blog Posts

Access the built-in Blog Engine for posts, categories, tags, and authors.

Authors

Categories

Tags

Feeds

Retrieve RSS, Atom, and Sitemap feeds.

Query parameters reference

Request cancellation

Cancel pending requests when needed (useful for React cleanup):

Complete example

Resources

GitHub Repository

View source code, report issues, and contribute

npm Package

Package details and version history