Nutrition Tools
Read the food log, supplements, water and nutrition targets.
getMeals
The meals the user logged for a date range: when each was eaten, its name, items and nutrients (kcal, protein_g, carbs_g, fat_g, fiber_g, sugar_g, sodium_mg and any others recorded). Water and supplements are not meals: use getSupplementsAndWater.
| Parameter | Notes |
|---|---|
from | Required. YYYY-MM-DD. At most 92 days per call; page through longer periods. |
to | YYYY-MM-DD, inclusive. Defaults to from. |
zoneId | IANA time zone. Defaults to UTC. |
getSupplementsAndWater
The supplements and water the user logged for a date range: when, name, serving and nutrients. A logged glass of water is an entry carrying water_ml.
Same parameters as getMeals.
getNutritionTargets
The user's daily targets (kcal, protein_g, carbs_g, fat_g, fiber_g, sugar_g, sodium_mg, water_ml…), each with a value and whether to stay under or reach it, and the nutrients the user tracks. Targets never customised are the Betterness defaults.
Parameters: none
Permission: health:read. To write to the log, see Logging.

