DocsRecipes
Recipes API
The recipes endpoint offers a dataset of sample recipe data, including details like recipe names, ingredients, instructions, and images, useful for testing and prototyping cooking and food-related applications.
GET
/recipesReturns a paginated list of recipes.
Code Examples
fetch
fetch('https://api.dhanyalvian.my.id/dummy/v1/recipes', {
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));URL
https://api.dhanyalvian.my.id/dummy/v1/recipesQuery Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number for pagination. |
| limit | number | 20 | Number of items per page. |
| search | string | — | Search by name or description. |
Response (200 OK)
{
"meta": {
"reqId": "dae4a42c-abf3-44c1-aa97-bfff5a2ab0c2",
"code": "200"
},
"message": "",
"pagination": {
"page": 1,
"next": 2,
"record": 1,
"totalPage": 250,
"totalRecord": 250
},
"records": [
{
"id": "1",
"name": "Classic Nasi Goreng Kampung",
"image": "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?auto=format&fit=crop&q=80&w=600",
"cuisine": "Indonesian",
"cuisineCode": "ID",
"difficulty": "Easy",
"mealType": [
"Dinner",
"Lunch",
"Breakfast"
],
"tags": [
"Rice",
"Indonesian",
"Spicy",
"Quick",
"Street Food",
"Classic"
]
}
]
}Try it Yourself
GET
Query Params
page:
limit:
search:
GET
/recipes/:idReturns a single recipe by ID.
Code Examples
fetch
fetch('https://api.dhanyalvian.my.id/dummy/v1/recipes/1', {
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));URL
https://api.dhanyalvian.my.id/dummy/v1/recipes/:idPath Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | The unique identifier of the user. |
Response (200 OK)
{
"meta": {
"reqId": "dbe4a42c-abf3-44c1-aa97-bfff5a2ab0c2",
"code": "200"
},
"message": "",
"record": {
"id": "1",
"name": "Classic Nasi Goreng Kampung",
"image": "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?auto=format&fit=crop&q=80&w=600",
"cuisine": "Indonesian",
"cuisineCode": "ID",
"difficulty": "Easy",
"mealType": [
"Dinner",
"Lunch",
"Breakfast"
],
"tags": [
"Rice",
"Indonesian",
"Spicy",
"Quick",
"Street Food",
"Classic"
],
"description": "Authentic Indonesian fried rice flavored with garlic, shallots, sweet soy sauce, and shrimp paste—perfectly executed in the traditional way.",
"prepTime": 12,
"cookTime": 18,
"servings": 1,
"ingredients": [
{
"id": 1,
"name": "Steamed white rice (cold)",
"quantity": 440,
"unit": "gram"
},
{
"id": 2,
"name": "Chicken breast (diced)",
"quantity": 150,
"unit": "gram"
},
{
"id": 3,
"name": "Shallots (thinly sliced)",
"quantity": 4.5,
"unit": "pcs"
},
{
"id": 4,
"name": "Garlic (minced)",
"quantity": 2.7,
"unit": "pcs"
},
{
"id": 5,
"name": "Sweet soy sauce (Kecap Manis)",
"quantity": 2.7,
"unit": "tbsp"
},
{
"id": 6,
"name": "Salty soy sauce",
"quantity": 1.1,
"unit": "tbsp"
},
{
"id": 7,
"name": "Red bird's eye chilies",
"quantity": 2.7,
"unit": "pcs"
},
{
"id": 8,
"name": "Shrimp paste (Terasi), toasted",
"quantity": 0.6,
"unit": "tsp"
},
{
"id": 9,
"name": "Vegetable oil",
"quantity": 2.2,
"unit": "tbsp"
},
{
"id": 10,
"name": "Eggs",
"quantity": 2.2,
"unit": "pcs"
}
],
"instructions": [
{
"id": 1,
"stepNo": 1,
"description": "Heat vegetable oil in a large wok over medium-high heat. Scramble one egg and set aside."
},
{
"id": 2,
"stepNo": 2,
"description": "In the same wok, sauté sliced shallots, minced garlic, and chopped chilies until fragrant."
},
{
"id": 3,
"stepNo": 3,
"description": "Add the diced chicken and cook until it turns golden brown."
},
{
"id": 4,
"stepNo": 4,
"description": "Add the shrimp paste and stir well to break it up."
},
{
"id": 5,
"stepNo": 5,
"description": "Add the cold rice, breaking up any clumps, then drizzle sweet soy sauce and salty soy sauce over the rice."
},
{
"id": 6,
"stepNo": 6,
"description": "Stir-fry vigorously on high heat for 3-5 minutes until the rice is evenly coated and slightly caramelized."
},
{
"id": 7,
"stepNo": 7,
"description": "Mix in the scrambled eggs and cook for another minute."
},
{
"id": 8,
"stepNo": 8,
"description": "Serve hot, garnished with a sunny-side-up egg, cucumber slices, and shrimp crackers (kerupuk)."
}
]
}
}Error Response
{
"meta": {
"reqId": "4a16367e-66bc-4d5c-8ac1-c7e2eb294724",
"code": "400"
},
"message": "Data not found"
}Try it Yourself
GET