For any profile, the optimal diet would be either of the following:
- Plant-Based
- Mediterranean
- Low-Carb
- Paleo
Once the Diet & Nutrition report is successfully generated for the profile of interest, to get the optimal diet, use the GET composed-diet/profile/{profile_id} endpoint which returns a cumulative response containing the following top-level fields:
optimal_dietdiet_report(composed profile report for the Diet & Nutrition report, i.e. response of/composed-profile-report/profile/{profile_id}/report/{diet_report_id}/)diet_intake_form(diet intake form details:, i.e. response ofGET intake_form/diet/)diet_intake_form_answers(list of answers to the diet intake form by the queried profile, i.e. response ofGET /answer/?profile_id={profile_id}&questionnaire_id={diet_intake_form_questionnaire_id})
For complete API schema and nested fields' help texts, refer to the endpoint. Below is an example of the optimal_diet field in the response:
{
"optimal_diet": {
"id": "dfdffba3-bb2a-49bb-be2a-8943a8a9662f",
"name": "Mediterranean",
"summary_text": "<p><span style=\"color:#000000\">The </span><a href=\"https://selfhacked.com/blog/14-mediterranean-diet-health-benefits-food-list/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>Mediterranean diet</u></span></a><span style=\"color:#000000\"> is based on the traditional cuisine from the Mediterranean regions. It focuses on whole, plant-based foods and olive oil. The diet provides a balanced ratio of carbs, fat, and protein.</span></p>",
"description": "<p><span style=\"color:#000000\">The </span><a href=\"https://selfhacked.com/blog/14-mediterranean-diet-health-benefits-food-list/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>Mediterranean diet</u></span></a><span style=\"color:#000000\"> is based on the traditional cuisine from the Mediterranean regions such as Greece, Spain, southern Italy, and southern France. It gained popularity when researchers noticed significantly </span><span style=\"color:#000000\"><strong>lower heart disease rates</strong></span><span style=\"color:#000000\"> and higher life expectancy among Mediterranean folks [</span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6466433/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/in-depth/mediterranean-diet/art-20047801\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">]. </span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">This diet doesn’t actually represent the way people eat in the Mediterranean regions today, given the growing influence of Western dietary habits. A proper Mediterranean diet abounds in [</span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6466433/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4663587/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">]:</span></p>\r\n\r\n<ul>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Vegetables</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Fruits</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Whole grains</span></li>\r\n\t<li style=\"list-style-type:disc\"><a href=\"https://selfhacked.com/blog/olive-oil/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>Olive oil</u></span></a></li>\r\n</ul>\r\n\r\n<p><span style=\"color:#000000\">The following foods are eaten in moderation [</span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6466433/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4663587/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">]:</span></p>\r\n\r\n<ul>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Fish and seafood</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Eggs and poultry</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Dairy</span></li>\r\n</ul>\r\n\r\n<p><span style=\"color:#000000\">Red meat and sweets are eaten sparingly [</span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6466433/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/in-depth/mediterranean-diet/art-20047801\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">The Mediterranean diet provides a balanced ratio of carbs, fat, and protein. It’s one of the healthiest diets due to a diversity of </span><span style=\"color:#000000\"><strong>whole foods</strong></span><span style=\"color:#000000\"> that deliver essential nutrients such as [</span><a href=\"https://www.health.harvard.edu/blog/adopt-a-mediterranean-diet-now-for-better-health-later-201311066846\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">]:</span></p>\r\n\r\n<ul>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Vitamins and minerals</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Polyphenols and other antioxidants</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Healthy unsaturated fats</span></li>\r\n\t<li style=\"list-style-type:disc\"><span style=\"color:#000000\">Dietary fiber</span></li>\r\n</ul>",
"image": "https://selfdecode.com/cdn/media/health-analysis/Mediterranean_Diet.png",
"diet_distribution": {
"daily_calories_count": 2719,
"daily_macros_count": {
"protein": 170,
"carbs": 306,
"fat": 91
}
}
},
"diet_report": {*composed_profile_report obj*},
"diet_intake_form": {*diet_intake_form obj*},
"diet_intake_form_answers": [*diet_intake_form_answers list*]
}
Attempting the Diet Intake Form
The
optimal_diet.diet_distributionanddiet_intake_form_answersfields would only be populated in the response if the profile of interest has completed the diet intake form - the instructions for which are given here.
The fields from the response above can be used to generate a composed diet view as shown in the annotated illustrations below:

Optimal Diet with Daily Macronutrients Intake Suggestion
The ratios of the macronutrients are composed using the composed profile report returned in the diet_report field. For details, refer to the Health Reports section, specifically here, under the Composing Health Reports sub-section.
