โ
Overview
The Writer API lets you fetch published blog posts and their SEO metadata from Five Minutes Talk and embed them on your own website. All endpoints are read-only and require authentication via an API key.
๐
Read-only
No write access
๐
REST
JSON over HTTPS
๐
Paginated
Up to 100/page
๐
SEO-ready
Full meta fields
๐
Authentication
Include your API key in every request via the x-api-key header. Generate your key from the writer dashboard under Settings โ API Key.
http
GET /api/writer/blogs HTTP/1.1
Host: fiveminutestalk.com
x-api-key: wmk_your_api_key_hereโ ๏ธ
Keep your API key secret. Never expose it in client-side JavaScript, public repositories, or logs.
๐
List Blogs
GET
/api/writer/blogsPaginated list of published blogsQuery Parameters
Request
curl -X GET "https://fiveminutestalk.com/api/writer/blogs?page=1&limit=5" \
-H "x-api-key: wmk_your_api_key_here"Response
json
{
"blogs": [
{
"_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"title": "Getting Started with Next.js",
"slug": "getting-started-with-nextjs",
"excerpt": "A beginner-friendly guide to building apps with Next.js.",
"coverImage": "https://example.com/images/nextjs.jpg",
"author": "Jane Doe",
"publishedAt": "2024-11-01T10:00:00.000Z",
"category": { "name": "Technology", "slug": "technology" },
"seo": {
"metaTitle": "Getting Started with Next.js | Five Minutes Talk",
"metaDescription": "Learn how to build fast web apps with Next.js.",
"keywords": ["nextjs", "react", "web development"],
"ogImage": "https://example.com/images/nextjs-og.jpg",
"canonicalUrl": "https://fiveminutestalk.com/blogs/getting-started-with-nextjs"
}
}
],
"pagination": { "page": 1, "limit": 5, "total": 42, "totalPages": 9 }
}๐
Get Blog by Slug
GET
/api/writer/blogs/:slugFull blog content + FAQsPath Parameter
Request
curl -X GET "https://fiveminutestalk.com/api/writer/blogs/getting-started-with-nextjs" \
-H "x-api-key: wmk_your_api_key_here"Response
json
{
"blog": {
"_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"title": "Getting Started with Next.js",
"slug": "getting-started-with-nextjs",
"content": "## Introduction\n\nNext.js is a React framework...",
"excerpt": "A beginner-friendly guide to building apps with Next.js.",
"coverImage": "https://example.com/images/nextjs.jpg",
"author": "Jane Doe",
"publishedAt": "2024-11-01T10:00:00.000Z",
"category": { "name": "Technology", "slug": "technology" },
"seo": {
"metaTitle": "Getting Started with Next.js | Five Minutes Talk",
"metaDescription": "Learn how to build fast web apps with Next.js.",
"keywords": ["nextjs", "react", "web development"],
"ogImage": "https://example.com/images/nextjs-og.jpg",
"canonicalUrl": "https://fiveminutestalk.com/blogs/getting-started-with-nextjs"
},
"faqs": [
{
"question": "What is Next.js?",
"answer": "Next.js is a React-based framework for building server-rendered web apps."
}
]
}
}๐
Response Schema
Blog Object
๐
SEO Integration
๐ก
Always set the
canonicalUrl to point back to the original post on Five Minutes Talk to avoid duplicate content penalties.Next.js App Router
tsx
// app/blog/[slug]/page.tsx
export async function generateMetadata({ params }) {
const res = await fetch(`https://fiveminutestalk.com/api/writer/blogs/${params.slug}`, {
headers: { 'x-api-key': process.env.WRITER_API_KEY }
});
const { blog } = await res.json();
return {
title: blog.seo.metaTitle,
description: blog.seo.metaDescription,
keywords: blog.seo.keywords,
alternates: { canonical: blog.seo.canonicalUrl },
openGraph: {
title: blog.seo.metaTitle,
description: blog.seo.metaDescription,
images: [blog.seo.ogImage],
},
};
}FAQ Schema Markup (Rich Results)
jsx
const faqSchema = {
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": blog.faqs.map(faq => ({
"@type": "Question",
"name": faq.question,
"acceptedAnswer": { "@type": "Answer", "text": faq.answer }
}))
};
// In your <head>:
<script type="application/ld+json">
{JSON.stringify(faqSchema)}
</script>โ ๏ธ
Errors
Error Response Shape
json
{ "error": "Unauthorized" }๐ป
Code Examples
Fetch all blogs
curl -X GET "https://fiveminutestalk.com/api/writer/blogs?page=1&limit=10" \
-H "x-api-key: wmk_your_api_key_here"Fetch single blog
curl -X GET "https://fiveminutestalk.com/api/writer/blogs/your-blog-slug" \
-H "x-api-key: wmk_your_api_key_here"Filter by category
curl -X GET "https://fiveminutestalk.com/api/writer/blogs?category=technology&limit=5" \
-H "x-api-key: wmk_your_api_key_here"Render Markdown content
โน๏ธ
The
content field is Markdown. Use react-markdown or marked to render it.jsx
// npm install react-markdown
import ReactMarkdown from 'react-markdown';
// Render inside your component:
<ReactMarkdown>{blog.content}</ReactMarkdown>โก
Try It Live
โ ๏ธ
Requests are sent directly from your browser. Your API key is not stored anywhere.