Get Recipe Nutritional Analysis
Return per-nutrient ingredient breakdown for the recipe.
Shows which ingredients contribute the most to each nutrient (protein, fat,
calories, vitamins, minerals, etc.) with percentage contributions. Use
nutrient_set to filter to a predefined group and top_n to limit
contributors per nutrient. Pass ?version_id= to read analysis at a
historical snapshot. Returns 404 if nutrition has not been computed yet.
recipe_id*Recipe Idnutrient_set?|Predefined nutrient group (e.g., fda_mandatory, macronutrients, vitamins_minerals)
bmids?|Comma-separated nutrient BMIDs (e.g., n_cf0wwfrw2sf4y,n_rqzvdbxyn4o7t)
top_n?|Max contributors per nutrient, sorted by amount descending
version_id?|Leave out for the current recipe. To read an earlier version, pass a version_id from the recipe's version list.
Successful Response
application/json- response
Response for get recipe nutritional analysis endpoint.
data*Nutritional analysis grouped by nutrient, with one ingredient entry per recipe row.
meta*Response metadata.
version_id?|Version committed for this mutation; pass on the next request as If-Match for optimistic concurrency. Present only on versions declaring the recipe_versioning capability.
curl -X GET 'https://api.bettermenu.live/studio/recipes/string/nutrition/analysis'{ "data": { "ingredients": [ { "name": "string", "quantity_g": 0, "original_text": "string", "kind": "standard", "custom_ingredient_id": "string" } ], "nutrients": [ { "bmid": "string", "name": "string", "unit": "string", "total": 0, "contributions": [ { "ingredient_index": 0, "amount": 0, "share_percent": 0 } ] } ] }, "meta": { "version": "string", "request_id": "string", "timestamp": "string" }, "version_id": "string"}