Get Recipe Nutrition

GET
/v1beta/:id

Exactly the same endpoint can be used as for recipe details, but you need to request an additional field (as shown below).

GET /v1beta/:id?fields=nutrition
We highly optimised speed of serving nutritional information for recipes, but for performance reasons we still recommend including this field only when it is required. This can make server respond faster with basic recipe data and have less data to transfer.

Nutrients

Nutrition information is provided for a whole meal.

Supported nutrients for recipe

NameCode
EnergyENERC_KCAL
Total FatFAT
Saturated FatFASAT
Carbohydrate TotalCHOCDF
SugarsSUGAR
ProteinPROCNT
SodiumNA
FiberFIBTG
Trans FatFATRN
Monounsaturated FatFAMS
Polyunsaturated FatFAPU
CholesterolCHOLE
CalciumCA
MagnesiumMG
PotassiumK
IronFe
ZincZn
PhosphorusP
Vitamin AVITA_RAE
Vitamin CVITC
Thiamin B1THIA
Riboflavin B2RIBF
Niacin B3NIA
Vitamin B6VITB6A
Folic Acid B9FOL
Vitamin B12VITB12
Vitamin DVITD
Vitamin ETOCPHA
Vitamin KVITK1

Nutrition Labels

We provide a batch of labels based on nutrition information.

Available nutrition labels

  • Low Energy
  • Energy Free
  • Low Fat
  • Fat Free
  • Low Saturated Fat
  • Saturated Fat Free
  • Low Sugars
  • Sugars Free
  • Low Sodium
  • Very Low Sodium
  • Sodium Free
  • Low Salt
  • Very Low Salt
  • Salt Free
  • Cholesterol Free
  • Low Cholesterol
  • Source Of Fiber
  • High Fiber
  • Source Of Protein
  • High Protein
  • High Monounsaturated Fat
  • High Polyunsaturated Fat
  • Hight Unsaturated Fat

Also labels for each vitamin and mineral presented in nutrition info:
  • Source Of ...
  • High ...
e.g. Source Of Calcium or Hight Vitamin A

Health Score

Health Scores are calculated on a 1-10 scale based on nutrient density and USDA recommendations for a healthy diet. A higher Health Score means healthier food. The value is based on the impact of macronutrients and micronutrients in the recipe

Glycemic Index (GI)

This is the relative ranking of carbohydrate in foods according to how they affect blood glucose levels. Carbohydrates with a low GI value (55 or less) are more slowly digested, absorbed and metabolised and cause a lower and slower rise in blood glucose. Higher values are foods that cause a more rapid rise in blood sugar. There are three classifications:

  • Low (55 or less)
  • Moderate (56 – 69)
  • High (70 or more)

Glycemic Load (GL)

Glycemic Load combines the quantity and quality (GI) of carbohydrates providing a way to compare blood glucose values of different types and amounts of foods. Blood glucose levels rise and fall when you eat a meal containing carbohydrates. How high it rises and how long it stays high depends on GL. There are three classifications for GL: Low (10 or less), Moderate (11 – 19), and High (20 or more). The formula for calculating the

GL is: Glycemic Load = GI x Carbohydrate (g) content per portion ÷ 100.

Request parameters

ATTRIBUTETYPEDESCRIPTION
id*string

Recipe Id or URL. (can be path or query param id)

fieldsarray [string]

Extra fields to return on recipe

userIdstring

Allows to get information if this recipe is saved to favorites

servingsstring

Scale normalizedIngredients amounts to requested number of servings

Sample Request

curl "https://graph.whisk.com/v1beta/9773cb7eca5d11e7ae7e42010a9a0035?fields=nutrition" \ -H "Accept: application/json" \ -H "Authorization: Token <Access-Token>"

Response

ATTRIBUTETYPEDESCRIPTION
id*string
name*string
descriptionstring
numberOfServingsnumber

Original number of servings

numberOfServingsScalednumber

Requested number of servings

normalizedIngredients*array [NormalizedIngredient]
instructionsRecipeInstructions
imagesarray [ImageContainer]
videosarray [VideoContainer]
source*RecipeSource
durationsRecipeDurations
labels*RecipeLabels
nutritionRecipeNutrition
constraintsRecipeConstraints
savedRecipeSaved

This field is populated if fields=saved is added to request parameters

authorRecipeAuthor

RecipeNutrition

ATTRIBUTETYPEDESCRIPTION
total*array [Nutrient]
labels*array [RecipeLabel]
healthScoreHealthScore
glycemicIndexGlycemicScore

This is the relative ranking of carbohydrate in foods according to how they affect blood glucose levels.

glycemicLoadGlycemicScore

Glycemic Load combines the quantity and quality (GI) of carbohydrates providing a way to compare blood glucose values of different types and amounts of foods.

Nutrient

ATTRIBUTETYPEDESCRIPTION
code*enum
Possible values: ENERC_KCAL, FAT, FASAT, CHOCDF, SUGAR, PROCNT, NA, FIBTG, FATRN, FAMS, FAPU, CHOLE, CA, MG, K, Fe, Zn, P, VITA_RAE, VITC, THIA, RIBF, NIA, VITB6A, FOL, VITB12, VITD, TOCPHA, VITK1.
label*string

A readable name e.g. Energy, Total Fat ...

value*integer
unit*enum
Possible values: g, mg, µg, kcal.

HealthScore

ATTRIBUTETYPEDESCRIPTION
value*double
nutrientsInfluence*array [NutrientsInfluence]

Components which influence health score

NutrientsInfluence

ATTRIBUTETYPEDESCRIPTION
code*string
influence*double
comment*string

GlycemicScore

ATTRIBUTETYPEDESCRIPTION
value*double

NormalizedIngredient

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring
analysisRecipeIngredientAnalysis

RecipeIngredientAnalysis

ATTRIBUTETYPEDESCRIPTION
product*string
canonicalName*string
quantitynumber
unitstring
multipliernumber
brandstring
commentstring
categoryProductCategory

ProductCategory

ATTRIBUTETYPEDESCRIPTION
name*string
displayName*string

ImageContainer

ATTRIBUTETYPEDESCRIPTION
url*string
responsiveImageResponsiveImage

ResponsiveImage

ATTRIBUTETYPEDESCRIPTION
url*string

Hosted url of an image

width*integer

Image width

height*integer

Image height

RecipeSource

ATTRIBUTETYPEDESCRIPTION
name*string
displayNamestring
sourceRecipeUrlstring
licensestring
imageImageContainer

RecipeLabels

ATTRIBUTETYPEDESCRIPTION
mealType*array [RecipeLabel]
cuisine*array [RecipeLabel]
category*array [RecipeLabel]

RecipeLabel

Some RecipeLabel description

ATTRIBUTETYPEDESCRIPTION
name*string
displayName*string

RecipeDurations

ATTRIBUTETYPEDESCRIPTION
cookTimenumber

Cooking time in minutes

prepTimenumber

Preparation time in minutes

totalTimenumber

Total time in minutes

Sample Response

{ "id": "9773cb7eca5d11e7ae7e42010a9a0035", "name": "Omelette pancakes with tomato & pepper sauce", "description": "Healthy, low-calorie and gluten-free - these herby egg 'pancakes' will become your go-to favourite for a quick midweek meal", "ingredients": [ { "text": "4 large eggs" }, { "text": "handful basil leaves" }, { "text": "2 tsp rapeseed oil, plus a little extra for the pancakes" }, { "text": "1 yellow pepper, quartered, deseeded and thinly sliced" }, { "text": "2 garlic cloves, thinly sliced" }, { "text": "1 tbsp cider vinegar" }, { "text": "400g can chopped tomatoes" }, { "text": "wholemeal bread or salad leaves, to serve" } ], "images": [ { "url": "https://www.bbcgoodfood.com/sites/default/files/styles/recipe/public/recipe_images/omelette-pancakes-with-tomato-pepper-sauce.jpg", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523012138/recipe/758058656142eaae402f1781e18c527c.jpg", "width": 454, "height": 500 } } ], "videos": [], "source": { "name": "bbcgoodfood.com", "displayName": "BBC Good Food", "sourceRecipeUrl": "https://www.bbcgoodfood.com/recipes/omelette-pancakes-tomato-pepper-sauce", "license": "Fairuse", "image": { "url": "https://whisk-res.cloudinary.com/image/upload/publishers/logos/bbcgoodfood-logo.png", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/publishers/logos/bbcgoodfood-logo.png", "width": 256, "height": 256 } } }, "numberOfServings": 2, "durations": { "cookTime": 20, "prepTime": 10, "totalTime": 30 }, "nutrition": { "status": "Available", "total": [ { "label": "Sugars", "code": "SUGAR", "value": 18.032, "unit": "G" }, { "label": "Energy", "code": "ENERC_KCAL", "value": 552.149, "unit": "Kcal" }, { "label": "Vitamin K", "code": "VITK1", "value": 67.71400000000001, "unit": "Mkg" }, { "label": "Carbohydrate Total", "code": "CHOCDF", "value": 43.497, "unit": "G" }, { "label": "Riboflavin B2", "code": "RIBF", "value": 0.8960000000000001, "unit": "Mg" }, { "label": "Thiamin B1", "code": "THIA", "value": 0.256, "unit": "Mg" }, { "label": "Iron", "code": "Fe", "value": 8.199, "unit": "Mg" }, { "label": "Magnesium", "code": "MG", "value": 62.458000000000006, "unit": "Mg" }, { "label": "Monounsaturated Fat", "code": "FAMS", "value": 12.365999999999998, "unit": "G" }, { "label": "Niacin B3", "code": "NIA", "value": 2.0069999999999997, "unit": "Mg" }, { "label": "Potassium", "code": "K", "value": 1547.69, "unit": "Mg" }, { "label": "Saturated Fat", "code": "FASAT", "value": 6.438, "unit": "G" }, { "label": "Calcium", "code": "CA", "value": 185.481, "unit": "Mg" }, { "label": "Total Fat", "code": "FAT", "value": 27.037000000000006, "unit": "G" }, { "label": "Sodium", "code": "NA", "value": 1430.048, "unit": "Mg" }, { "label": "Cholesterol", "code": "CHOLE", "value": 654.72, "unit": "Mg" }, { "label": "Vitamin A", "code": "VITA_RAE", "value": 1004.706, "unit": "Mkg" }, { "label": "Folic Acid B9", "code": "FOL", "value": 113.88000000000001, "unit": "Mkg" }, { "label": "Polyunsaturated Fat", "code": "FAPU", "value": 6.467999999999999, "unit": "G" }, { "label": "Phosphorus", "code": "P", "value": 444.51200000000006, "unit": "Mg" }, { "label": "Zinc", "code": "Zn", "value": 3.0579999999999994, "unit": "Mg" }, { "label": "Protein", "code": "PROCNT", "value": 30.446000000000005, "unit": "G" }, { "label": "Vitamin C", "code": "VITC", "value": 129.308, "unit": "Mg" }, { "label": "Vitamin B12", "code": "VITB12", "value": 1.566, "unit": "Mkg" }, { "label": "Vitamin B6", "code": "VITB6A", "value": 0.715, "unit": "Mg" }, { "label": "Fiber", "code": "FIBTG", "value": 10.701, "unit": "G" }, { "label": "Trans Fat", "code": "FATRN", "value": 0.10800000000000001, "unit": "G" }, { "label": "Vitamin E", "code": "TOCPHA", "value": 4.6659999999999995, "unit": "Mg" }, { "label": "Vitamin D", "code": "VITD", "value": 3.608, "unit": "Mkg" } ], "labels": [ { "name": "low-saturated-fat", "displayName": "Low Saturated Fat" }, { "name": "high-monounsaturated-fat", "displayName": "High Monounsaturated Fat" }, { "name": "source-of-vitamin-a", "displayName": "Source Of Vitamin A" }, { "name": "low-sugars", "displayName": "Low Sugars" }, { "name": "source-of-protein", "displayName": "Source Of Protein" }, { "name": "high-protein", "displayName": "High Protein" }, { "name": "source-of-vitamin-c", "displayName": "Source Of Vitamin C" }, { "name": "diabetic-friendly", "displayName": "Diabetes Friendly" } ], "healthScore": { "value": 5.328398771869642, "nutrientsInfluence": [ { "code": "FAT_UNSAT", "influence": 0.6939760843841576, "comment": "Medium positive impact" }, { "code": "SUGAR", "influence": -0.16607094540196313, "comment": "Low negative impact" }, { "code": "CHOCDF", "influence": -0.32233080518343327, "comment": "Low negative impact" }, { "code": "Fe", "influence": 0.7959836140700944, "comment": "Strong positive impact" }, { "code": "MG", "influence": 0.42528069107651134, "comment": "Medium positive impact" }, { "code": "K", "influence": 0.5341771359436212, "comment": "Medium positive impact" }, { "code": "FASAT", "influence": -0.20384433830804286, "comment": "Low negative impact" }, { "code": "CA", "influence": 0.4175784374308489, "comment": "Medium positive impact" }, { "code": "NA", "influence": -0.652384776600362, "comment": "Medium negative impact" }, { "code": "CHOLE", "influence": -1, "comment": "Strong negative impact" }, { "code": "VITA_RAE", "influence": 0.41592973912427417, "comment": "Medium positive impact" }, { "code": "PROCNT", "influence": 0.661881064471508, "comment": "Medium positive impact" }, { "code": "VITC", "influence": 0.723662907280685, "comment": "Medium positive impact" }, { "code": "FIBTG", "influence": 0.5679207239135912, "comment": "Medium positive impact" }, { "code": "FATRN", "influence": -0.09403816166121269, "comment": "Insignificant impact" } ] }, "glycemicIndex": { "value": 41.37 }, "glycemicLoad": { "value": 9 } }, "labels": { "mealType": [ { "name": "lunch", "displayName": "Lunch" }, { "name": "main-course", "displayName": "Main Course" }, { "name": "dinner", "displayName": "Dinner" } ], "cuisine": [ { "name": "french", "displayName": "French" } ], "category": [ { "name": "main-dishes", "displayName": "Main Dishes" }, { "name": "healthy-recipes", "displayName": "Healthy Recipes" }, { "name": "lunch", "displayName": "Lunch" }, { "name": "quick-and-easy", "displayName": "Quick and easy" }, { "name": "dinner", "displayName": "Dinner" } ], "technique": [] }, "constraints": { "violates": { "diets": [ "lacto-vegetarian", "vegan" ], "avoidances": [ "egg", "gluten", "yeast", "wheat" ] } }, "author": { "name": "Sara Buenfeld" } }