Docs
You can use examples below to check how DummyJSON works.
Recipes
Get all recipes
fetch('https://dj.tdn.wf/recipes')
.then(res => res.json())
.then(console.log);
Show output
Get a single recipe
fetch('https://dj.tdn.wf/recipes/1')
.then(res => res.json())
.then(console.log);
Show output
Search recipes
fetch('https://dj.tdn.wf/recipes/search?q=Margherita')
.then(res => res.json())
.then(console.log);
Show output
Limit and skip recipes
You can pass "limit" and "skip" params to limit and skip the
results for pagination, and use limit=0 to get all items.
You can pass "select" as query params with comma-separated values
to select specific data.
fetch('https://dj.tdn.wf/recipes?limit=10&skip=10&select=name,image')
.then(res => res.json())
.then(console.log);
Show output
Get all recipes tags
fetch('https://dj.tdn.wf/recipes/tags')
.then(res => res.json())
.then(console.log);
Show output
Get recipes by a tag
fetch('https://dj.tdn.wf/recipes/tag/Pakistani')
.then(res => res.json())
.then(console.log);
Show output
Get recipes by meal type
fetch('https://dj.tdn.wf/recipes/meal-type/snack')
.then(res => res.json())
.then(console.log);
Show output