Content

Blog Post JSON Example

A complete JSON example for a blog post content type — includes title, slug, author, tags, SEO meta, and rich body fields. Copy-ready for headless CMS and content API design.

{
  "id": "post_6Rk3mNpQxT",
  "slug": "how-to-use-json-in-rest-apis",
  "title": "How to Use JSON in REST APIs: A Complete Guide",
  "excerpt": "Learn how to structure JSON request and response bodies for clean, consistent REST APIs.",
  "body": "<h2>Introduction</h2><p>JSON (JavaScript Object Notation) has become the de-facto format for REST API payloads...</p>",
  "author": {
    "id": "usr_9k2mXpQr4t",
    "name": "Ravi Mehta",
    "avatarUrl": "https://cdn.example.com/avatars/usr_9k2mXpQr4t.jpg",
    "bio": "Senior Backend Engineer at TechCraft, Ahmedabad."
  },
  "categories": [
    "APIs",
    "JSON",
    "Backend Development"
  ],
  "tags": [
    "rest",
    "json",
    "api-design",
    "backend",
    "tutorial"
  ],
  "status": "published",
  "featuredImage": {
    "url": "https://cdn.example.com/blog/json-rest-apis.jpg",
    "alt": "JSON code on a dark background",
    "width": 1200,
    "height": 630
  },
  "seo": {
    "metaTitle": "How to Use JSON in REST APIs: A Complete Guide",
    "metaDescription": "Step-by-step guide to structuring JSON payloads for REST APIs. Covers request bodies, response envelopes, error formats, and pagination.",
    "canonicalUrl": "https://blog.example.com/how-to-use-json-in-rest-apis",
    "openGraphImage": "https://cdn.example.com/blog/json-rest-apis-og.jpg"
  },
  "readingTimeMinutes": 8,
  "viewCount": 14320,
  "likeCount": 287,
  "commentsEnabled": true,
  "publishedAt": "2025-03-15T09:00:00Z",
  "updatedAt": "2025-04-01T12:00:00Z",
  "createdAt": "2025-03-10T15:00:00Z"
}

Field Reference

idstringrequiredUnique post identifier with post_ prefix
slugstringrequiredURL-safe identifier derived from the title, used in permalink
statusstringrequiredLifecycle state: draft, scheduled, published, or archived
authorobjectrequiredEmbedded author object with id, name, avatar, and bio
bodystringrequiredHTML or Markdown body content of the post
seoobjectoptionalSEO overrides for meta title, description, canonical, and Open Graph
readingTimeMinutesintegeroptionalEstimated reading time in minutes, auto-calculated from word count
publishedAtstring (ISO 8601)optionalTimestamp when the post became publicly visible

Variants

MinimalDraft post with only required content fields, no SEO or analytics data.
{
  "id": "post_1Bn4pQmZrX",
  "slug": "getting-started-with-typescript",
  "title": "Getting Started with TypeScript",
  "excerpt": "A beginner's introduction to TypeScript types, interfaces, and configuration.",
  "body": "<p>TypeScript is a typed superset of JavaScript...</p>",
  "author": {
    "id": "usr_3hFwLmNz8q",
    "name": "Priya Sharma"
  },
  "categories": [
    "TypeScript",
    "Programming"
  ],
  "tags": [
    "typescript",
    "beginner"
  ],
  "status": "draft",
  "commentsEnabled": true,
  "createdAt": "2025-05-18T10:00:00Z",
  "updatedAt": "2025-05-18T10:00:00Z"
}
ExtendedPublished post with full SEO, schema markup, related posts, and engagement stats.
Extended
{
  "id": "post_6Rk3mNpQxT",
  "slug": "how-to-use-json-in-rest-apis",
  "title": "How to Use JSON in REST APIs: A Complete Guide",
  "excerpt": "Learn how to structure JSON request and response bodies for clean, consistent REST APIs.",
  "body": "<h2>Introduction</h2><p>JSON (JavaScript Object Notation) has become the de-facto format for REST API payloads...</p>",
  "author": {
    "id": "usr_9k2mXpQr4t",
    "name": "Ravi Mehta",
    "avatarUrl": "https://cdn.example.com/avatars/usr_9k2mXpQr4t.jpg",
    "bio": "Senior Backend Engineer at TechCraft, Ahmedabad."
  },
  "categories": [
    "APIs",
    "JSON",
    "Backend Development"
  ],
  "tags": [
    "rest",
    "json",
    "api-design",
    "backend",
    "tutorial"
  ],
  "status": "published",
  "featuredImage": {
    "url": "https://cdn.example.com/blog/json-rest-apis.jpg",
    "alt": "JSON code on a dark background",
    "width": 1200,
    "height": 630
  },
  "seo": {
    "metaTitle": "How to Use JSON in REST APIs: A Complete Guide",
    "metaDescription": "Step-by-step guide to structuring JSON payloads for REST APIs.",
    "canonicalUrl": "https://blog.example.com/how-to-use-json-in-rest-apis",
    "openGraphImage": "https://cdn.example.com/blog/json-rest-apis-og.jpg"
  },
  "schemaOrg": {
    "@context": "https://schema.org",
    "@type": "BlogPosting",
    "headline": "How to Use JSON in REST APIs: A Complete Guide",
    "author": {
      "@type": "Person",
      "name": "Ravi Mehta"
    }
  },
  "relatedPostIds": [
    "post_2Cm5rSnYpZ",
    "post_3Dn6tToZqA"
  ],
  "readingTimeMinutes": 8,
  "viewCount": 14320,
  "likeCount": 287,
  "commentsEnabled": true,
  "publishedAt": "2025-03-15T09:00:00Z",
  "updatedAt": "2025-04-01T12:00:00Z",
  "createdAt": "2025-03-10T15:00:00Z"
}

Common Use Cases

  • Defining the content schema for a headless CMS like Contentful, Sanity, or a custom API
  • Rendering blog post pages in a Next.js or Nuxt application from an API response
  • Indexing blog content into Algolia or Elasticsearch for full-text search
blogCMScontentSEOheadless

Validate or format this JSON

Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.

Frequently Asked Questions

Markdown is more portable and easier to version-control, while HTML offers richer layout control. Many headless CMSs use a structured rich-text format (like Portable Text or Lexical) that serializes to both.

Use status: 'scheduled' and set publishedAt to a future ISO 8601 timestamp. The publishing service checks this field and flips status to 'published' at the specified time.

Group all SEO overrides under a nested 'seo' object with metaTitle, metaDescription, canonicalUrl, and openGraphImage. This keeps the top-level schema clean and lets SEO fields be optional.

Related JSON Examples