Home
/
JSON Examples
/
Blog post
Blog post JSON example
Last updated 2026-05-20
When to use this
Use this shape for a blog feed, a single-article page, or a CMS-style content list. Each post has tags, reactions, and a userId so you can join it to /users or /comments.
Example JSON
A single blog post, as returned by /posts/1.
{
"id": 1,
"title": "His mother had always taught him",
"body": "His mother had always taught him not to ever think of himself as better than others. He'd tried to live by this motto. He never looked down on those who were less fortunate or who had less money than him.",
"tags": [
"history",
"american",
"crime"
],
"reactions": {
"likes": 192,
"dislikes": 25
},
"views": 305,
"userId": 121
}
Request examples
fetch()
Axios
cURL
Node.js
Python
Copy
fetch('https://jsonexamples.com/posts/1')
.then(res => res.json())
.then(post => console.log(post.title));
Copy
const { data: post } = await axios.get('https://jsonexamples.com/posts/1');
Copy
curl -s https://jsonexamples.com/posts/1
Copy
const post = await fetch('https://jsonexamples.com/posts/1').then(r => r.json());
Copy
post = requests.get('https://jsonexamples.com/posts/1', timeout=5).json()
Try the live endpoint
Click below to call /posts/1 from your browser.
Call /posts/1
// click the button to populate this block
Common variations
Paginated post list
{
"posts": [
{
"id": 1,
"title": "His mother had always taught him",
"userId": 121,
"tags": [
"history"
]
},
{
"id": 2,
"title": "He was an expert but not in a discipline",
"userId": 92,
"tags": [
"american",
"crime"
]
}
],
"total": 150,
"skip": 0,
"limit": 30
}
Post with embedded author
Useful for a server-rendered article page that wants the author inline.
{
"id": 1,
"title": "His mother had always taught him",
"body": "...",
"tags": [
"history",
"american"
],
"reactions": {
"likes": 192,
"dislikes": 25
},
"author": {
"id": 121,
"firstName": "Emily",
"lastName": "Johnson",
"image": "https://jsonexamples.com/image/100?text=User+121"
}
}
Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
TypeScript
JSON Schema
Zod
Copy
export interface BlogPost {
"id": number;
"title": string;
"body": string;
"tags": string[];
"reactions": {
"likes": number;
"dislikes": number;
};
"views": number;
"userId": number;
}
Copy
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BlogPost",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"reactions": {
"type": "object",
"properties": {
"likes": {
"type": "integer"
},
"dislikes": {
"type": "integer"
}
},
"required": [
"likes",
"dislikes"
],
"additionalProperties": false
},
"views": {
"type": "integer"
},
"userId": {
"type": "integer"
}
},
"required": [
"id",
"title",
"body",
"tags",
"reactions",
"views",
"userId"
],
"additionalProperties": false
}
Copy
import { z } from 'zod';
export const BlogPostSchema = z.object({
id: z.number(),
title: z.string(),
body: z.string(),
tags: z.array(z.string()),
reactions: z.object({
likes: z.number(),
dislikes: z.number()
}),
views: z.number(),
userId: z.number()
});
export type BlogPost = z.infer<typeof BlogPostSchema>;
Copy link to this example
https://jsonexamples.com/json-examples/blog-post