Free Blog & CMS API — Mock REST API for Testing & Development
Provides realistic blog articles, markdown body content, authors, tags, and publication dates for testing headless CMS integrations.
Interactive Live API Explorer
/api/posts
List blog posts with pagination, filtering (status, category, search), and sorting.
You can add or change query parameters in the path above (e.g., ?name=User).
/api/posts
Create new blog post with SEO metadata.
/api/posts/{slug}
Get single post by slug with full content. Replace {slug} with an actual post slug like "getting-started-javascript".
Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).
/api/categories
List post categories and tags with post counts.
You can add or change query parameters in the path above (e.g., ?name=User).
Code Integration Examples
// Free Blog & CMS API - JavaScript Fetch Example
async function fetchBlogCMSAPI() {
try {
const response = await fetch('https://gen-endpoint.com/api/posts', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Success:', data);
return data;
} catch (error) {
console.error('Fetch error:', error);
}
}
fetchBlogCMSAPI();Sample JSON Response
{
"posts": [
{
"id": "post_123",
"title": "Getting Started with JavaScript",
"slug": "getting-started-javascript",
"excerpt": "Learn the basics of JavaScript programming...",
"author": {"id": "usr_1", "name": "Alice Wonderland"},
"publishedAt": "2024-08-15T10:00:00Z",
"readTime": "5 min"
}
],
"pagination": {"page": 1, "limit": 10, "total": 45}
}Common Developer Use Cases
Testing blog layout templates in Next.js or Nuxt.
Building article search and category filters.
Related Free REST APIs
Comments & Reviews API
Handle user comments, reviews, ratings, moderation, and threaded discussions.
User Management API
A comprehensive API for managing user accounts, including CRUD operations.
Advanced Search API
Demonstrates complex querying, filtering, sorting, and pagination with full-text search capabilities.
Frequently Asked Questions
Does the API return Markdown?
Yes, post content includes formatted Markdown text suitable for react-markdown.