Skip to content
Skip to Content
Docs
Studio

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.

GET
/studio/recipes/{recipe_id}/nutrition/analysis

Path Parameters

recipe_id*Recipe Id

Query Parameters

nutrient_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.

Response Body

Successful Response

application/json
  1. 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.

Example Request
curl -X GET 'https://api.bettermenu.live/studio/recipes/string/nutrition/analysis'
Example Response
{  "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"}

Recipe in, FDA-format Nutrition Facts out, with every version kept.

Start freeNo card needed.