Simplist is a headless CMS for blogs. The TypeScript SDK provides a typed and fast way to manage articles, analytics and SEO, while the REST API remains available for direct integrations.
- Install and configure the SDK (and env variables)
- Understand the main modules: Articles, Project, Analytics, SEO, Multilingual
- See quick examples of reading content and configuration
- Access configuration options and response format
- Articles — Retrieve, filter and search articles
- Project — Project information and statistics
- Analytics — Track views and get stats
- SEO — Generate sitemap, RSS, structured data
- Multilingual — Manage language variants
Install the SDK
Add Simplist to your project with your preferred package manager.
pnpm add @simplist.blog/sdkInstall the SDK
Add Simplist to your project with your preferred package manager.
pnpm add @simplist.blog/sdkGet your API key
Create a project and get your API key from your dashboard at simplist.blog.
Get your API key
Create a project and get your API key from your dashboard at simplist.blog.
Configure the environment
Add your API key to your .env file. This variable will be automatically used by the SDK.
| Variable | Required | Default | Description |
|---|---|---|---|
SIMPLIST_API_KEY | Required | — | Your Simplist project API key |
Configure the environment
Add your API key to your .env file. This variable will be automatically used by the SDK.
| Variable | Required | Default | Description |
|---|---|---|---|
SIMPLIST_API_KEY | Required | — | Your Simplist project API key |
Initialize the client
Create a new instance of the SimplistClient to start fetching articles.
import { SimplistClient } from "@simplist.blog/sdk"
const client = new SimplistClient({
apiKey: process.env.SIMPLIST_API_KEY
})Initialize the client
Create a new instance of the SimplistClient to start fetching articles.
import { SimplistClient } from "@simplist.blog/sdk"
const client = new SimplistClient({
apiKey: process.env.SIMPLIST_API_KEY
})Alternatively, pass the API key directly when creating the client:
client.tsimport { SimplistClient } from "@simplist.blog/sdk"
const client = new SimplistClient({
apiKey: 'prj_your_api_key'
})client.tsimport { SimplistClient } from "@simplist.blog/sdk"
const client = new SimplistClient({
apiKey: process.env.SIMPLIST_API_KEY
})
const response = await client.articles.latest(10)
if (response.success) {
console.log(response.data)
}client.tsconst response = await client.articles.get('article-slug')
if (response.success) {
const article = response.data
console.log(article.title)
console.log(article.content)
}client.tsconst response = await client.articles.published({
page: 1,
limit: 20
})
if (response.success) {
const articles = response.data
articles.forEach(article => {
console.log(article.title)
})
}client.tsconst client = new SimplistClient({
apiKey: 'prj_your_api_key', // Required
baseUrl: 'https://api.simplist.blog', // Optional, default shown
path: 'blog', // Optional, URL prefix for articles
timeout: 10000, // Optional, request timeout in ms
retries: 3, // Optional, number of retries
retryDelay: 1000 // Optional, delay between retries in ms
})All SDK methods return this format:
{
success: boolean
data?: any // Present if success is true
error?: { // Present if success is false
message: string
status?: number
}
meta?: { // Present for list endpoints
page: number
limit: number
total: number
totalPages: number
}
}- Articles API - Fetch and filter articles
- Analytics - Track page views
- SEO - Generate sitemaps and RSS feeds
- Multilingual - Handle translations