Generate Meal Plan
GET {{baseUrl}}/mealplanner/generate?timeFrame=day&targetCalories=2000&diet=vegetarian&exclude=shellfish, olives
Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
timeFrame | string | Either for one "day" or an entire "week". | |
targetCalories | number | What is the caloric target for one day? The meal plan generator will try to get as close as possible to that goal. | |
diet | string | Enter a diet that the meal plan has to adhere to. See a full list of supported diets. | |
exclude | string | A comma-separated list of allergens or ingredients that must be excluded. |
RESPONSES
status: OK
{"meals":[{"id":655219,"title":"Peanut Butter And Chocolate Oatmeal","imageType":"jpg","readyInMinutes":45,"servings":1,"sourceUrl":"https://spoonacular.com/recipes/peanut-butter-and-chocolate-oatmeal-655219"},{"id":649931,"title":"Lentil Salad With Vegetables","imageType":"jpg","readyInMinutes":45,"servings":4,"sourceUrl":"https://spoonacular.com/recipes/lentil-salad-with-vegetables-649931"},{"id":632854,"title":"Asian Noodles","imageType":"jpg","readyInMinutes":45,"servings":4,"sourceUrl":"https://spoonacular.com/recipes/asian-noodles-632854"}],"nutrients":{"calories":1735.81,"carbohydrates":235.17,"fat":69.22,"protein":55.43}}