Installation
- Maven
- Gradle
Add to your
pom.xml:Initialization
Initialize the SDK with your Read API token from the ButterCMS Settings.Configuration options
The client constructor accepts additional parameters for customization:API methods
All methods return strongly-typed response objects.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
Query parameters reference
| Parameter | Applies To | Description |
|---|---|---|
page | Posts, Pages | Page number for pagination |
page_size | Posts, Pages | Number of items per page |
exclude_body | Posts | Exclude post body for faster response |
author_slug | Posts | Filter posts by author |
category_slug | Posts | Filter posts by category |
tag_slug | Posts | Filter posts by tag |
include | Authors, Categories, Tags | Include recent_posts with response |
locale | Pages, Collections | Locale code for localized content |
preview | Pages | Set to 1 to include draft content |
levels | Pages | Depth of nested references (1-3) |
Complete example
Resources
GitHub Repository
View source code, report issues, and contribute
Maven Central
Package details and version history