Food ingredient with nutritional information, category, measurement unit, and allergen data. Used for recipe management, meal planning, and dietary tracking applications.
https://api.mockly.codes/ingredients?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/ingredientsGet a collection of ingredients
/food/ingredients/ingredients/:idGet a single ingredient by ID
/food/ingredients/:id/ingredients/metaGet resource metadata and schema
/food/ingredients/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/ingredients?q=laptopGET https://api.mockly.codes/ingredients?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 ingredients
fetch('https://api.mockly.codes/ingredients?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/ingredients?count=10'
)
data = response.json()curl "https://api.mockly.codes/ingredients?count=10"fetch('https://api.mockly.codes/ingredients?nocache=true')idintegerUnique identifier for the ingredient
random_intnamestringName of the ingredient (e.g., flour, tomatoes, olive oil)
wordcategorystringIngredient category (e.g., vegetables, grains, dairy, spices, proteins)
categoryunitstringStandard measurement unit (e.g., grams, cups, tablespoons, pieces)
wordcaloriesintegerCalories per standard unit of the ingredient
random_intallergensarrayList of allergens present (e.g., gluten, dairy, nuts, eggs, soy)
tagscountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request