Recipe search can be performed through generic Graph API search endpoint by passing type=recipe. You can see an example of using this API at Getting Started and at the Showcase .
Parameters can be combined. This example returns recipe with energy between 200 and 500 kcal:
Copy nutrition = energy > 200,energy < 500
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
Copy curl "https://graph.whisk.com/v1/search?q=sandwich&type=recipe&includeIngredients=bread,meat" \
-H "Accept: application/json" \
-H "Authorization: Token <Access-Token>"
Copy {
"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
}