Recipe
The Recipe API service lets you read and write any internal and external recipes and your Whisk recipe collections.
Let's first understand the Recipe object and its data structure before looking at its endpoints' description.
Recipe Object
A Recipe object is a collection of arrays and attributes that defines the data structure for any given recipe.
This is how the data structure of a recipe looks in JSON format:
Core Attributes
The following attributes define the core of a recipe:
Attribute | Type | Description |
| string | The recipe identifier. |
| string | The full name of the recipe. |
| string | A summary describing the recipe. |
| integer | The number of people that can be served the original recipe. |
| integer | The number of servings based on the requirement you specified while pulling the recipe details. |
| string | As per ISO 639 standards, a two-letter code indicating the language used in recipe definition. |
In addition to the base attributes, there are objects and arrays that contain more information on the recipe.
Ingredients
This array contains information on the ingredients used in the recipe.
Attribute | Type | Description |
| string | A specific ingredient used in the recipe — sugar 2-tbsp, flour 10g, or garlic 3-cloves. |
| string | The group name if the ingredient falls under a particular group of ingredients. |
| object | This object contains details of a branded product that is stored in Whisk Studio and is being used as an ingredient. |
The linked_product
object contains the following attributes:
Attribute | Type | Description |
| string | The product identifier. |
| string | The product’s full name. |
| array | One or more images of the product. This array contains the hosted URL and size details of each product image. |
| string | An identifier assigned by the product's author. |
Images
This array contains information on one or more images of the completed dish included in the recipe.
Attribute | Type | Description |
| string | Hosted URL of an image. |
| object | A responsive image adjusts its size based on the screen size. This object contains attributes to access the image with flexible size based on need. |
The responsive
object contains the following attributes:
Attribute | Type | Description |
| string | Hosted URL of an image. |
| number | Image width. |
| number | Image height. |
Source
This object contains details of the recipe origins.
Attribute | Type | Description |
| string | Indicates the name of the recipe’s origin. |
| string | Indicates the display name of the recipe's origin. |
| string | The recipe’s origin URL. |
| object | This object includes information on the origins of the recipe's image. |
Durations
This object contains information on the time it takes to prepare and cook the recipe.
Attribute | Type | Description |
| number | The time (in minutes) it takes to cook the dish. |
| number | The time (in minutes) it takes to prepare the items used in the recipe's instructions. |
| number | The total time (in minutes) it takes to prepare the dish. |
Labels
This object contains information on the labels attached to the recipe that helps distinguish its type, cuisine, category, and the techniques required to cook.
Each label attached to the recipe appears as a child-array.
Attribute | Type | Description |
| array | Indicates the meal type that applies to the recipe. |
| array | Indicates the recipe's cuisine. |
| array | Indicates the recipe's category. |
| array | Indicates the cooking technique required to cook the recipe. |
Each of these arrays contains the following attributes:
Attribute | Type | Description |
| string | The label name saved in the source. |
| string | The label name that appears on the front-end. |
For information on supported labels, see Recipe Labels.
Author
This object includes information about the Whisk user who created the recipe.
Attribute | Type | Description |
| string | The recipe creator's identifier. |
| string | The recipe creator's name. |
| object | The recipe creator's image. See the images array description for more information. |
Custom Labels
This array includes a list of user-defined labels linked to the recipe.
Attribute | Type | Description |
| string | Label group's name. |
| array | A list of labels inside the group. |
Tips
This array includes a list of advice linked to the recipe.
Type | Type | Description |
header | string | A heading for the advice. |
text | string | Text describing the advice. |
Main ingredients
The most important products of a recipe. We consider them to be equal in case there are several products returned.
Optional Data
The recipe data structure may include extra information based on any additional parameters included in the API request.
Normalized Ingredients
This array includes detailed analysis of each recipe's ingredient.
Attribute | Type | Description |
| string | A specific ingredient used in the recipe — sugar 2-tbsp, flour 10g, or garlic 3-cloves. |
| string | The group name if the ingredient falls under a particular group of ingredients. |
| object | This object contains details of a branded product that is stored in Whisk Studio and is being used as an ingredient. For more information, see the ingredients array. |
| array | Detailed information on the ingredient that is not linked to any product stored in Whisk Studio. |
| string | The ingredient name saved in the source. |
The analysis
array includes the following attributes:
Attribute | Type | Description |
| object | The canonical and original name of the product being used as an ingredient. It should not be confused with the |
| object | The alternative measurment unit for ingredient. Contains metric and imperial units and measurments |
| object | The canonical name of the category to which the ingredient belongs. |
| object | The ingredient product's brand canonical name. |
| number | The ingredient volume or count. |
| string | Any additional info attached with the ingredient. |
| string | The measurement unit of the ingredient's quantity. |
| number | The factor for unit conversion. |
| string | The source location of the ingredient's image. |
Instructions
This object includes information on each step required in the recipe preparation.
Attribute | Type | Description |
| array | An array containing a list of steps required to cook the recipe. |
The steps array contains the following attributes:
Attribute | Type | Description |
| string | A specific step in the list of instructions to cook the recipe — “Heat the oil in a large frying pan”. |
| string | The group name if the step falls under a particular group of steps. |
| array | One or more images attached to the step. This array contains the hosted URL and size details of each image. |
| array | One or more user-defined labels attached to the step. For more information, see the custom labels array. |
Nutrition
This object contains information about the recipe's nutritional value.
Attribute | Type | Description |
| string | The recipe's nutritional information availability status. |
| array | This array contains a detailed analysis of nutrients available in the recipe. |
| string | A value between 0-1 to indicate the extent of analysis done while calculating the nutritional facts. |
| object | The recipe's health score and analysis. |
| object | The glycemic index is a value that indicates the recipe's impact on blood glucose levels. |
| object | The glycemic load is a value that indicates the recipe's impact on blood sugar levels. |
Each object contains additional attributes.
Total
This array contains information about the nutrients available in the recipe. Each nutrient carries the following information:
Attribute | Type | Description | Example |
| enum | The nutrient code. |
|
| string | The name of the nutrient. |
|
| integer | The nutrient's value/amount. |
|
| enum | The measurement unit of the nutrient's value. |
|
Health Score
This array contains information on the health score assigned to the recipe.
Attribute | Type | Description |
| double | The health score assigned to the recipe. |
| array | The components based on which the health score is derived. |
Glycemic Index
This array includes information on the glycemic index score assigned to the recipe. It helps in understanding the impact of the recipe on blood sugar levels.
Attribute | Type | Description |
| double | The glycemic index score. |
Glycemic Load
This array includes information on the glycemic load score assigned to the recipe. It helps in understanding the impact of the recipe on blood glucose levels.
Attribute | Type | Description |
| double | The glycemic load score. |
Last updated