Installation
This package is published with CommonJS and ES Modules (ESM) support.
Quick Start
Authentication
The SDK uses API key authentication. Pass your API key when initializing the client:Available Resources
Posts
- List all posts
- Get a single post
Categories
- List all categories
- Get a single category
Tags
- List all tags
- Get a single tag
Authors
- List all authors
- Get a single author
Fields
- List custom fields
- Create and update field definitions
- Write field values on posts
Filtering Posts
Filter posts by categories, tags, or featured status:Pagination
Paginated endpoints return an async iterable. Usefor await...of to iterate through pages:
Error Handling
The SDK provides typed error classes for different error scenarios:Retries
The SDK automatically retries failed requests. You can customize retry behavior:Framework Guides
Astro
Use Content Collections with Astro.
Framer
Sync content to Framer CMS with the Marble plugin.
Next.js
Build static and server-rendered pages.
TanStack Start
Server functions with TanStack Start.
Additional Resources
NPM Package
View the package on npm.
GitHub
View the source code.