Equivalent Recipes (Calories)
Query to obtain recipes with similar macronutrient distribution
Use the similarCaloriesRecipes query to obtain recipes equivalent in macronutrient distribution as the one provided in the argument. Use the size argument to indicate the number of recipes returned.
If you already have a meal from a mealPlan query, you can use the serving argument to find more recipes. The recipes in the response will also have a serving field to know how many of the total numbers of servings have to be served to keep a similar amount of calories.
Arguments
Type
Required
Description
recipeId
ID
True
Recipe to which equivalents are to be returned
serving
Int
False
The number of recipe servings served. Default to 1.
size
Int
False
Define the number of returned recipes.
If this parameter is not sent, the default number is 3.
Example
The following example returns recipes equivalent to the recipe ID provided in the argument. Since the size parameter is not defined, by default, the number of recipes retrieved is 3.
query {
  similarCaloriesRecipes(
    recipeId: "UmVjaXBlOjE0ZGQ1N2ZmLTgxYzgtNGZhNS1iNjA0LTkwZTc0ZTdhNDc3Ng==",
    numberOfServings: 1
  ) {
    id
    name
    serving
    numberOfServings
  	nutrientsPerServing {
      calories
      carbs
      fat
      protein
    }
  }
}{
  "data": {
    "similarCaloriesRecipes": [
      {
        "id": "UmVjaXBlOjk1M2JiY2U2LWM2M2UtNGZiOS1hZWM5LWRhYWVhZWUxODZlYQ==",
        "name": "Blackberry Compote Oat Pot",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 258,
          "carbs": 28,
          "fat": 8.5,
          "protein": 17
        }
      },
      {
        "id": "UmVjaXBlOmIzY2ZjOGU2LWE4Y2UtNDMyZi04NjcwLWQ0MjZjYjE4MGE0OA==",
        "name": "Vegan Blackberry Compote Oat Pot",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 258,
          "carbs": 28,
          "fat": 8.5,
          "protein": 17
        }
      },
      {
        "id": "UmVjaXBlOmU3ZmMwZWMyLWViNzEtNGNhYS05NjMzLWE1MjhmZWI0Y2ZkMA==",
        "name": "Vegan Protein Shake & An Apple",
        "serving": 1,
        "numberOfServings": 1,
        "nutrientsPerServing": {
          "calories": 246.21,
          "carbs": 36.97,
          "fat": 3.88,
          "protein": 15.84
        }
      }
    ]
  }
}The following example retrieves 8 similar recipes:
query {
  similarCaloriesRecipes(
    recipeId: "UmVjaXBlOjE0ZGQ1N2ZmLTgxYzgtNGZhNS1iNjA0LTkwZTc0ZTdhNDc3Ng==",
    numberOfServings: 1,
    size: 8
  ) {
    id
    name
    serving
    numberOfServings
  	nutrientsPerServing {
      calories
      carbs
      fat
      protein
    }
  }
}{
  "data": {
    "similarCaloriesRecipes": [
      {
        "id": "UmVjaXBlOjk1M2JiY2U2LWM2M2UtNGZiOS1hZWM5LWRhYWVhZWUxODZlYQ==",
        "name": "Blackberry Compote Oat Pot",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 258,
          "carbs": 28,
          "fat": 8.5,
          "protein": 17
        }
      },
      {
        "id": "UmVjaXBlOmIzY2ZjOGU2LWE4Y2UtNDMyZi04NjcwLWQ0MjZjYjE4MGE0OA==",
        "name": "Vegan Blackberry Compote Oat Pot",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 258,
          "carbs": 28,
          "fat": 8.5,
          "protein": 17
        }
      },
      {
        "id": "UmVjaXBlOmM5NmQ4OWM0LTRlNTctNGY5MC04OTFiLTU1MDU3OWJjYWNjMg==",
        "name": "Classic Porridge Topped With Berries",
        "serving": 1,
        "numberOfServings": 1,
        "nutrientsPerServing": {
          "calories": 231.98,
          "carbs": 42.09,
          "fat": 4.88,
          "protein": 4.93
        }
      },
      {
        "id": "UmVjaXBlOmU3ZmMwZWMyLWViNzEtNGNhYS05NjMzLWE1MjhmZWI0Y2ZkMA==",
        "name": "Vegan Protein Shake & An Apple",
        "serving": 1,
        "numberOfServings": 1,
        "nutrientsPerServing": {
          "calories": 246.21,
          "carbs": 36.97,
          "fat": 3.88,
          "protein": 15.84
        }
      },
      {
        "id": "UmVjaXBlOmI3MjcwZGUxLTkwMjQtNDFmYy04YjQ2LTM2MTA3MDg2NTY4MA==",
        "name": "Turmeric Baked Eggs (Shakshuka)",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 257,
          "carbs": 32,
          "fat": 7.2,
          "protein": 17
        }
      },
      {
        "id": "UmVjaXBlOjM1ZDVjOGJhLWVkYmEtNDU0Yi1iMDcwLWViZmUwNDg3YmIxNQ==",
        "name": "Mushroom And Red Pepper Frittata",
        "serving": 1,
        "numberOfServings": 4,
        "nutrientsPerServing": {
          "calories": 244,
          "carbs": 4.6,
          "fat": 17,
          "protein": 19
        }
      },
      {
        "id": "UmVjaXBlOjhjOGMzYTkxLThiMTUtNDQ4My1iZjkwLWYyNGJjNmI2NTNmMg==",
        "name": "White Bean Shakshuka",
        "serving": 1,
        "numberOfServings": 2,
        "nutrientsPerServing": {
          "calories": 238,
          "carbs": 42,
          "fat": 1.5,
          "protein": 13
        }
      },
      {
        "id": "UmVjaXBlOmM5NmZkZWY2LTFjNjYtNGI5ZS04ZDc3LWMxNTM5NmU2NzA0Zg==",
        "name": "Protein Pancakes",
        "serving": 1,
        "numberOfServings": 3,
        "nutrientsPerServing": {
          "calories": 271,
          "carbs": 33,
          "fat": 7.5,
          "protein": 20
        }
      }
    ]
  }
}Last updated
Was this helpful?