Recipe search

GET
/v1beta/search?type=recipe

Recipe search can be performed through generic Graph API search endpoint by passing type=recipe

Filter Operators

Only nutrition filter accepts filter operators at the moment.

OperatorDescriptionURL Encoded FormExamples
>Greater than%3EReturn results where a recipe energy greater than 100 kcal: nutrition=energy>100
<Less than%3CReturn results where a recipe fat less than 20 g: nutrition=fat<20
>=Greater than or equal to%3E%3DReturn results where a recipe carbohydrate is 5 g or more: nutrition=carbohydrate>=5
<=Less than or equal to%3C%3DReturn results where a recipe protein is 2.5 g or less: nutrition=protein<=2.5

Parameters can be combined. This example returns recipe with energy between 200 and 500 kcal:

nutrition=energy>200,energy<500

Available nutrients for filtering: energy, fat, carbohydrate, protein

User preferences

You can specify userId to get personlised result of search. Whisk considers User Preferences such as diets, avoidances, cooking skill and dislikedIngredients in recipe search.

Query parameters have more priority than user preferences. It means that, if a user diet is vegan and you pass in parametersdiets=pescatarian, a response will be recipes which support pescatarian diet

Parameters

ATTRIBUTETYPEDESCRIPTION
qstring

Search phrase

limitinteger

This is the maximum number of objects that may be returned

Default value: 16
beforestring

This is the cursor to return data on a page before it.

afterstring

This is the cursor to return data on a page before it.

cuisinesarray [string]
labelsarray [string]
nutritionarray [string]

nutrition filters e.g. energy>300,energy<500 Available nutrients: energy, fat, carbohydrate, protein

minHealthScoredouble

filter recipes with helthScore more then specified value

mealTypesarray [string]

include mealTypes

categorystring

recipe category, depends on a language available categories

excludeIngredientsarray [string]

recipes should not have any of these ingredients

includeIngredientsarray [string]

Recipes should include these ingredients. If parametr was specified, response will contain matched ingredients

minIngredientsShouldMatchint

if includeIngredients specified, number of minimum ingredients, which should be matched

maxTimeInMinutesint

recipes should take this total time at maximum

languagestring

recipes should be in this language, it allows only ISO 639-1 language codes

Default value: en
userIdstring

Identifier of user in Whisk system, more about user

Sample Request

curl "https://graph.whisk.com/v1beta/search?q=sandwich&type=recipe&includeIngredients=bread,meat" \ -H "Accept: application/json" \ -H "Authorization: Token <Access-Token>"

Response

Recipe search response with paging

ATTRIBUTETYPEDESCRIPTION
data*array [RecipeSearchHit]
paging*FinitePaging

RecipeSearchHit

Recipe content and search metadata

ATTRIBUTETYPEDESCRIPTION
content*RecipeResponse
matchedIngredientsMatchedIngredient

MatchedIngredient

Ingredients from request parameter includeIngredients which was matched

ATTRIBUTETYPEDESCRIPTION
namestring

Requested ingredient

RecipeResponse

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

NormalizedIngredient

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring
analysisRecipeIngredientAnalysis

VideoContainer

ATTRIBUTETYPEDESCRIPTION
urlstring

URL to original video provider page

contentUrlstring

URL to video file. Actual bytes of the media object

embedUrlstring

An embed format of video with player

playerTypeenum
Possible values: flash, html5, silverlight.
thumbnailstring

A thumbnail image relevant to the Video

durationnumber

The duration of the recording

heightnumber

The height of the item

widthnumber

The width of the item

RecipeSource

ATTRIBUTETYPEDESCRIPTION
name*string
displayNamestring
sourceRecipeUrlstring
licensestring
imageImageContainer

RecipeLabels

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

RecipeLabel

ATTRIBUTETYPEDESCRIPTION
name*string
displayName*string

RecipeDurationsResponse

ATTRIBUTETYPEDESCRIPTION
cookTimenumber

Cooking time in minutes

prepTimenumber

Preparation time in minutes

totalTimenumber

Total time in minutes

FinitePaging

ATTRIBUTETYPEDESCRIPTION
cursors*Cursors
total*integer

Cursors

ATTRIBUTETYPEDESCRIPTION
afterstring
beforestring

RecipeIngredientAnalysis

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

RecipeInstruction

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring
imagesImageContainer

RecipeInstructions

ATTRIBUTETYPEDESCRIPTION
steps*array [RecipeInstruction]

RecipeSaved

ATTRIBUTETYPEDESCRIPTION
valueboolean

True if this recipe is saved to favorites

collectionIdsarray [string]

RecipeAuthor

ATTRIBUTETYPEDESCRIPTION
name*string
imageImageContainer

ImageContainer

ATTRIBUTETYPEDESCRIPTION
url*string
responsiveImageResponsiveImage

ResponsiveImage

ATTRIBUTETYPEDESCRIPTION
url*string

Hosted url of an image

width*integer

Image width

height*integer

Image height

Sample Response

{ "data": [ { "content": { "id": "97f77cceca5d11e7ae7e42010a9a0035", "name": "Quick coronation chicken sandwich", "description": "Use leftover roast chicken to make a delicious coronation chicken sandwich ready to pack in your lunchbox.", "images": [ { "url": "http://cdnwp.audiencemedia.com/wp-content/uploads/2015/01/478091-1-eng-GB_coronation-chick-sandwich-470x540.jpg", "responsive": { "url": "https://lh3.googleusercontent.com/crjY_vyxK8kdBYYBd6VVtlGwIXuG3pn9DuCSWP4-_VtURbrYfpKPrYDMmrlCwc8kqSAsgCBtjhqU2C7PEjU0wMDh4FSK", "width": 470, "height": 540 } }, { "url": "http://cdnwp.audiencemedia.com/wp-content/uploads/2015/01/478091-1-eng-GB_coronation-chick-sandwich.jpg", "responsive": { "url": "https://lh3.googleusercontent.com/fz02xdShfu1ax6ZZLhMp2zn7WwGXN7XlVx6ZXR8X_uN-x5DEdCW_Q9tIacitVtyI-yIkxZ6-nqpLCQIrPNijwM4wIPg", "width": 960, "height": 927 } } ], "source": { "name": "deliciousmagazine.co.uk", "displayName": "delicious. magazine", "sourceRecipeUrl": "http://www.deliciousmagazine.co.uk/recipes/quick-coronation-chicken-sandwich/", "license": "Fairuse", "image": { "url": "https://res.cloudinary.com/whisk/image/upload/v1401879186/content/publisher_logos/delicious-magazine-logo.png", "responsive": { "url": "https://res.cloudinary.com/whisk/image/upload/v1401879186/content/publisher_logos/delicious-magazine-logo.png", "width": 200, "height": 200 } } }, "author": { "name": "Author name", "image": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523894700/custom_upload/ba4d7363cd46c736675d2cc08754f5bc.png", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523894700/custom_upload/ba4d7363cd46c736675d2cc08754f5bc.png", "width": 800, "height": 800 } } }, "numberOfServings": 1, "labels": { "mealType": [], "cuisine": [], "category": [ { "name": "quick-and-easy", "displayName": "Quick and easy" } ] } }, "matchedIngredients": [ { "name": "meat" }, { "name": "bread" } ] }, { "content": { "id": "99a8776cca5d11e7ae7e42010a9a0035", "name": "Club sandwich", "description": "This layered sandwich, a favourite of gastro-pubs across the country, makes a tasty meal for one", "images": [ { "url": "https://www.bbcgoodfood.com/sites/default/files/styles/recipe/public/recipe_images/recipe-image-legacy-id--653594_11.jpg", "responsive": { "url": "https://lh3.googleusercontent.com/ZMk_3U8-5UbbwTFxXhHxuorv1KGB5ll5HG--2Ru1UuAZ9-uFOrNa_fNq5CfyssAAJbUKy8Rpno_-kpi3F_VZI721w6Q", "width": 500, "height": 454 } } ], "source": { "name": "bbcgoodfood.com", "displayName": "BBC Good Food", "sourceRecipeUrl": "https://www.bbcgoodfood.com/recipes/1363639/club-sandwich", "license": "Fairuse", "image": { "url": "https://res.cloudinary.com/whisk/image/upload/v1401879186/content/publisher_logos/foodnetwork-logo.png", "responsive": { "url": "https://res.cloudinary.com/whisk/image/upload/v1401879186/content/publisher_logos/foodnetwork-logo.png", "width": 200, "height": 200 } } }, "author": { "name": "Author name", "image": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523894700/custom_upload/ba4d7363cd46c736675d2cc08754f5bc.png", "responsive": { "url": "https://whisk-res.cloudinary.com/image/upload/v1523894700/custom_upload/ba4d7363cd46c736675d2cc08754f5bc.png", "width": 800, "height": 800 } } }, "numberOfServings": 1, "durations": { "cookTime": 10, "prepTime": 10, "totalTime": 20 }, "labels": { "mealType": [], "cuisine": [ { "name": "british", "displayName": "British" } ], "category": [ { "name": "dinner", "displayName": "Dinner" }, { "name": "quick-and-easy", "displayName": "Quick and easy" }, { "name": "appetizers-and-snacks", "displayName": "Appetizers and Snacks" }, { "name": "lunch", "displayName": "Lunch" }, { "name": "main-dishes", "displayName": "Main Dishes" } ] } }, "matchedIngredients": [ { "name": "bread" }, { "name": "meat" } ] } ], "paging": { "cursors": { "after": "eyJpZCI6ImNhZjVlOWY3Y2YxNzFkYjBmZTdkYjJmOTM4M2M0ZDIzIiwiaW5kZXgiOjF9" }, "total": 1300 } }