Home
/
JSON Examples
/
Recipe
Recipe JSON example
Last updated 2026-05-20
When to use this
Use this for a recipe app, a meal-planner UI, or a cooking-content CMS. Includes ingredients, instructions, prep/cook time, tags, mealType, and a rating so you can sort or filter the list immediately.
Example JSON
A single recipe, as returned by /recipes/1.
{
"id": 1,
"name": "Classic Margherita Pizza",
"ingredients": [
"Pizza dough",
"Tomato sauce",
"Fresh mozzarella cheese",
"Fresh basil leaves",
"Olive oil",
"Salt and pepper to taste"
],
"instructions": [
"Preheat the oven to 475°F (245°C).",
"Roll out the pizza dough and spread tomato sauce evenly.",
"Top with slices of fresh mozzarella and fresh basil leaves.",
"Drizzle with olive oil and season with salt and pepper.",
"Bake in the preheated oven for 12–15 minutes or until the crust is golden brown.",
"Slice and serve hot."
],
"prepTimeMinutes": 20,
"cookTimeMinutes": 15,
"servings": 4,
"difficulty": "Easy",
"cuisine": "Italian",
"caloriesPerServing": 300,
"tags": [
"Pizza",
"Italian"
],
"userId": 45,
"image": "https://jsonexamples.com/image/400?text=Recipe+1",
"rating": 4.6,
"reviewCount": 98,
"mealType": [
"Dinner"
]
}
Request examples
fetch()
Axios
cURL
Python
Copy
fetch('https://jsonexamples.com/recipes/1')
.then(r => r.json())
.then(recipe => console.log(recipe.name));
Copy
const { data: recipe } = await axios.get('https://jsonexamples.com/recipes/1');
Copy
curl -s https://jsonexamples.com/recipes/1
Copy
recipe = requests.get('https://jsonexamples.com/recipes/1', timeout=5).json()
Try the live endpoint
Click below to call /recipes/1 from your browser.
Call /recipes/1
// click the button to populate this block
Common variations
Recipe list by tag
Matches /recipes/tag/Italian.
{
"recipes": [
{
"id": 1,
"name": "Classic Margherita Pizza",
"cuisine": "Italian",
"rating": 4.6
},
{
"id": 7,
"name": "Spaghetti Carbonara",
"cuisine": "Italian",
"rating": 4.7
}
],
"total": 2,
"skip": 0,
"limit": 30
}
Compact ingredient-only response
Useful for an autocomplete or shopping list.
{
"id": 1,
"name": "Classic Margherita Pizza",
"ingredients": [
"Pizza dough",
"Tomato sauce",
"Fresh mozzarella cheese",
"Fresh basil leaves"
]
}
Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
TypeScript
JSON Schema
Zod
Copy
export interface Recipe {
"id": number;
"name": string;
"ingredients": string[];
"instructions": string[];
"prepTimeMinutes": number;
"cookTimeMinutes": number;
"servings": number;
"difficulty": string;
"cuisine": string;
"caloriesPerServing": number;
"tags": string[];
"userId": number;
"image": string;
"rating": number;
"reviewCount": number;
"mealType": string[];
}
Copy
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Recipe",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"ingredients": {
"type": "array",
"items": {
"type": "string"
}
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
},
"prepTimeMinutes": {
"type": "integer"
},
"cookTimeMinutes": {
"type": "integer"
},
"servings": {
"type": "integer"
},
"difficulty": {
"type": "string"
},
"cuisine": {
"type": "string"
},
"caloriesPerServing": {
"type": "integer"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"userId": {
"type": "integer"
},
"image": {
"type": "string"
},
"rating": {
"type": "number"
},
"reviewCount": {
"type": "integer"
},
"mealType": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"ingredients",
"instructions",
"prepTimeMinutes",
"cookTimeMinutes",
"servings",
"difficulty",
"cuisine",
"caloriesPerServing",
"tags",
"userId",
"image",
"rating",
"reviewCount",
"mealType"
],
"additionalProperties": false
}
Copy
import { z } from 'zod';
export const RecipeSchema = z.object({
id: z.number(),
name: z.string(),
ingredients: z.array(z.string()),
instructions: z.array(z.string()),
prepTimeMinutes: z.number(),
cookTimeMinutes: z.number(),
servings: z.number(),
difficulty: z.string(),
cuisine: z.string(),
caloriesPerServing: z.number(),
tags: z.array(z.string()),
userId: z.number(),
image: z.string(),
rating: z.number(),
reviewCount: z.number(),
mealType: z.array(z.string())
});
export type Recipe = z.infer<typeof RecipeSchema>;
Copy link to this example
https://jsonexamples.com/json-examples/recipe