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.
{"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}},...],"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": {...}}],"paging": {"cursors": {"after": "eyJpZCI6ImNhZjVlOWY3Y2YxNzFkYjBmZTdkYjJmOTM4M2M0ZDIzIiwiaW5kZXgiOjF9"},"total": 1300}
The Search API accepts a query object that looks similar to this:
{"query": "string","language": "string","country": "string","min_ingredients_should_match": 0,"max_time_in_minutes": 0,"min_health_score": 0,"ordering": "ORDERING_INVALID","has_instructions": true,"paging": {...},"labels": [...],"exclude_ingredients": {...},"include_ingredients": {...},"glycemic_filter": {...},"nutrition": [...],"fields": [...],"custom_labels": {...}}
It is made up of the following attributes:
ATTRIBUTE | TYPE | DESCRIPTION |
| string | Search phrase |
| string | recipes should be in this language, it allows only ISO 639-1 language codes Default value: en |
| int | if includeIngredients specified, number of minimum ingredients, which should be matched |
| int | recipes should take this total time at maximum |
| double | filter recipes with healthScore more than specified value |
| ​ | ​ |
| ​ | ​ |
| ​object​ | ​ |
| ​array​ | ​ |
| ​object​ | ​ |
| ​object​ | ​ |
| ​object​ | ​ |
| ​array​ | ​ |
| array | ​ |
| object | ​ |
In addition to the base attributes, there are additional objects that contain more detailed information on the search parameters.
"paging": {"limit": 0,"cursors": {"after": "string","before": "string"}},
"labels": [{"label": {"diet": "DIET_INVALID","category": "CATEGORY_INVALID","avoidance": "AVOIDANCE_INVALID","cuisine": "CUISINE_INVALID","meal_type": "MEAL_TYPE_INVALID","nutrition": "NUTRITION_INVALID","feature": "string","holiday": "HOLIDAY_INVALID","seasonality": "SEASONALITY_INVALID"},"boost": true}],
"exclude_ingredients": {"list": ["string"]},
"include_ingredients": {"list": ["string"]},​
"glycemic_filter": {"glycemic_index": 0,"glycemic_load_total": 0,"glycemic_load_serving": 0},
"nutrition": [{"nutrition": "NUTRITION_INVALID","condition": "CONDITION_INVALID","value": 0}],
"ordering": "ORDERING_INVALID",
"fields": ["RECIPE_FIELD_INVALID"],
"custom_labels": {"everywhere": {"in": [{"group": "string","label": "string"}],"boost_in": [{"group": "string","label": "string"}]},"in_recipe": {"in": [{"group": "string","label": "string"}],"boost_in": [{"group": "string","label": "string"}]},"in_ingredients": {"in": [{"group": "string","label": "string"}],"boost_in": [{"group": "string","label": "string"}]},"in_instruction_steps": {"in": [{"group": "string","label": "string"}],"boost_in": [{"group": "string","label": "string"}]}}
curl -X POST "https://api.whisk.com/recipe/v2/search" \-H "accept: application/json" \-H "Authorization: Token <Access-Token>" \-H "Content-Type: application/json" \-d "{ \"language\": \"en\", \"paging\" : {\"limit\": 2}}"
​
​
​