Home
/
JSON Examples
/
Product catalog
Product catalog JSON example
Last updated 2026-05-20
When to use this
Use this for an e-commerce product list, a category filter UI, or a search-results screen. Includes the standard pagination wrapper ({ products, total, skip, limit }) so you can wire pagination immediately.
Example JSON
A paginated product list response. Identical to /products?limit=3 in shape.
{
"products": [
{
"id": 1,
"title": "Essence Mascara Lash Princess",
"description": "The Essence Mascara Lash Princess is a popular mascara known for its volumising and lengthening effects.",
"price": 9.99,
"discountPercentage": 7.17,
"rating": 4.94,
"stock": 5,
"brand": "Essence",
"category": "beauty",
"thumbnail": "https://jsonexamples.com/image/400?text=Product+1"
},
{
"id": 2,
"title": "Eyeshadow Palette with Mirror",
"price": 19.99,
"rating": 3.28,
"stock": 44,
"brand": "Glamour Beauty",
"category": "beauty",
"thumbnail": "https://jsonexamples.com/image/400?text=Product+2"
},
{
"id": 3,
"title": "Powder Canister",
"price": 14.99,
"rating": 3.82,
"stock": 59,
"brand": "Velvet Touch",
"category": "beauty",
"thumbnail": "https://jsonexamples.com/image/400?text=Product+3"
}
],
"total": 100,
"skip": 0,
"limit": 3
}
Request examples
fetch()
Axios
cURL
React
Python
Copy
fetch('https://jsonexamples.com/products?limit=10&skip=0')
.then(res => res.json())
.then(({ products, total }) => console.log(products.length, 'of', total));
Copy
const { data } = await axios.get('https://jsonexamples.com/products', {
params: { limit: 10, skip: 0, select: 'title,price,thumbnail' }
});
Copy
curl -s 'https://jsonexamples.com/products?limit=10&skip=0&select=title,price'
Copy
function ProductList() {
const [data, setData] = useState({ products: [], total: 0 });
useEffect(() => {
fetch('https://jsonexamples.com/products?limit=12')
.then(r => r.json())
.then(setData);
}, []);
return <ul>{data.products.map(p => <li key={p.id}>{p.title} — ${p.price}</li>)}</ul>;
}
Copy
import requests
params = { 'limit': 10, 'skip': 0 }
resp = requests.get('https://jsonexamples.com/products', params=params, timeout=5)
resp.raise_for_status()
print(resp.json())
Try the live endpoint
Click below to call /products?limit=3 from your browser.
Call /products?limit=3
// click the button to populate this block
Common variations
Filtered by category
Same envelope shape, narrowed by category.
{
"products": [
{
"id": 6,
"title": "Calvin Klein CK One",
"price": 49.99,
"category": "fragrances"
},
{
"id": 7,
"title": "Chanel Coco Noir Eau De Parfum",
"price": 129.99,
"category": "fragrances"
}
],
"total": 5,
"skip": 0,
"limit": 30
}
Search response (q=phone)
Matches the /products/search endpoint.
{
"products": [
{
"id": 121,
"title": "iPhone 9",
"price": 549,
"category": "smartphones"
},
{
"id": 122,
"title": "iPhone X",
"price": 899,
"category": "smartphones"
}
],
"total": 2,
"skip": 0,
"limit": 30
}
Empty result
Shape returned when the filter matches zero items.
{
"products": [],
"total": 0,
"skip": 0,
"limit": 30
}
Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
TypeScript
JSON Schema
Zod
Copy
export interface ProductCatalog {
"products": {
"id": number;
"title": string;
"description": string;
"price": number;
"discountPercentage": number;
"rating": number;
"stock": number;
"brand": string;
"category": string;
"thumbnail": string;
}[];
"total": number;
"skip": number;
"limit": number;
}
Copy
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ProductCatalog",
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"price": {
"type": "number"
},
"discountPercentage": {
"type": "number"
},
"rating": {
"type": "number"
},
"stock": {
"type": "integer"
},
"brand": {
"type": "string"
},
"category": {
"type": "string"
},
"thumbnail": {
"type": "string"
}
},
"required": [
"id",
"title",
"description",
"price",
"discountPercentage",
"rating",
"stock",
"brand",
"category",
"thumbnail"
],
"additionalProperties": false
}
},
"total": {
"type": "integer"
},
"skip": {
"type": "integer"
},
"limit": {
"type": "integer"
}
},
"required": [
"products",
"total",
"skip",
"limit"
],
"additionalProperties": false
}
Copy
import { z } from 'zod';
export const ProductCatalogSchema = z.object({
products: z.array(z.object({
id: z.number(),
title: z.string(),
description: z.string(),
price: z.number(),
discountPercentage: z.number(),
rating: z.number(),
stock: z.number(),
brand: z.string(),
category: z.string(),
thumbnail: z.string()
})),
total: z.number(),
skip: z.number(),
limit: z.number()
});
export type ProductCatalog = z.infer<typeof ProductCatalogSchema>;
Copy link to this example
https://jsonexamples.com/json-examples/product-catalog