Recipe Search by Ingredients
Search for recipe that contain certain ingredients
Use searchRecipesByIngredientsto find recipes that contain a list of ingredients.
Parameter
Argument
Type
Description
mustIngredients
[String]!
List of ingredients recipe must contain
Example
Get the list of recipes with specific ingredients
Get the list of recipes which includes broccoli, eggs, and avocado ingredients
{
searchRecipesByIngredients(
mustIngredients: ["broccoli", "eggs", "avocado"]
) {
edges {
node {
name
ingredients {
name
}
ingredientLines
}
}
}
}{
"data": {
"searchRecipesByIngredients": {
"edges": [
{
"node": {
"name": "Garlic Roasted Broccoli",
"ingredients": [
{
"name": "Olive oil"
},
{
"name": "Broccoli florets"
},
{
"name": "Garlic"
},
{
"name": "Salt"
}
],
"ingredientLines": [
"12 oz broccoli leaves",
"1 tbsp extra virgin olive oil",
"2 cloves garlic, sliced",
"Salt, to taste",
"Freshly ground black pepper to taste"
]
},
{
"node": {
"name": "Avocado With Tomatoes",
"ingredients": [
{
"name": "Avocado"
},
{
"name": "Tomato"
},
{
"name": "Cumin"
},
{
"name": "Garlic powder"
},
{
"name": "Oregano"
},
{
"name": "Salt"
},
{
"name": "Lemon juice"
}
],
"ingredientLines": [
"* 1 avocado",
"* 1/2 tomato",
"* a dash of cumin powder",
"* a dash of garlic powder",
"* a dash of oregano",
"* little salt to taste",
"* few drop of lemon juice (optional)"
]
}
}
]
}
}
}Note: If no ingredients are added into the mustIngredients string, recipes with all ingredients will be retrieved.
UI/UX example
In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.
Login to the App, go to the Recipes option, introduce broccoli, eggs, avocado on the search field, all the recipes related to those ingredients are displayed. Look at the first two recipes, those are the same as the ones returned with the API query. Select the Garlic Roasted Broccoli, the ingredients are the same as the result retrieved in the API query

Last updated
Was this helpful?