Foods
The food database backs meal logging (carb counting). Search is cached server-side via NutritionService.searchAndCache.
Public API (API key)
curl "https://api.levelcast.org/api/v1/public/foods/search?q=apple" \ -H "X-API-KEY: lc_your_key_here"# → { "success": true, "data": [ …up to 20 items with macros… ] }qneeds at least 2 characters (400otherwise).- No patient scoping: any valid key (
readscope) can search. - Up to 20 results with macros per item.
Pair with POST /api/v1/public/patients/:patientId/events (eventType: "meal", value + valueUnit) to log what was eaten.