/api/content/{slug}Retrieve the full content and metadata of a specific page.
This endpoint returns the complete content of any page in the CMS, including:
This is the core of the headless CMS functionality - content is separated from presentation.
GET https://api.infinity.b0x.store/api/content/{slug}.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Yes | The page slug or route path |
{
"route": "/api",
"title": "GROOV API - Self-Documenting Grav CMS",
"slug": "api",
"content": "<h1>GROOV API: The Self-Documenting Content Management System</h1>\n<p>Welcome to...</p>",
"raw_content": "# GROOV API: The Self-Documenting Content Management System\n\nWelcome to...",
"metadata": {
"title": "GROOV API - Self-Documenting Grav CMS",
"process": {
"markdown": true,
"twig": true
},
"visible": true,
"routable": true,
"cache_enable": true
},
"date": "2025-12-04T00:00:00Z",
"modified": "2025-12-04T20:33:00Z",
"taxonomy": {},
"checksum": "sha256:abc123..."
}
{
"error": "Page not found",
"slug": "nonexistent-page",
"message": "The requested page does not exist"
}
Fetch content from Grav and render it in any frontend framework (React, Vue, Angular, etc.)
Retrieve content for republishing on other platforms or in different formats
Display API documentation dynamically by fetching content pages
Validate content structure and formatting in automated tests
import { useState, useEffect } from 'react';
function ApiDocPage({ slug }) {
const [content, setContent] = useState(null);
useEffect(() => {
fetch(`https://api.infinity.b0x.store/api/content/${slug}.json`)
.then(res => res.json())
.then(data => setContent(data));
}, [slug]);
if (!content) return <div>Loading...</div>;
return (
<article>
<h1>{content.title}</h1>
<div dangerouslySetInnerHTML={{ __html: content.content }} />
</article>
);
}
# Get content for a specific page
curl https://api.infinity.b0x.store/api/content/api.json | jq '.title, .content'
# Get raw markdown
curl https://api.infinity.b0x.store/api/content/api.json | jq -r '.raw_content'
import requests
def get_page_content(slug):
url = f'https://api.infinity.b0x.store/api/content/{slug}.json'
response = requests.get(url)
if response.status_code == 200:
return response.json()
else:
return None
# Fetch and display content
page = get_page_content('api')
if page:
print(f"Title: {page['title']}")
print(f"Content: {page['raw_content'][:200]}...")
This endpoint creates perfect self-reference:
/api/content/content to read this page's documentationLast updated: 2025-12-10 13:14:22