Nutrition for a meal written in plain words ("2 large eggs, 1 cup cooked white rice, 1 tbsp olive oil"): each item matched to a USDA FoodData Central record, quantity converted to grams from USDA portion weights, 19 nutrients per item and totals, with the match and the gram basis shown so nothing is a guess. Also barcode lookup (Open Food Facts: nutrients, Nutri-Score, NOVA, allergens) and BMR / TDEE / BMI / macro targets (Mifflin-St Jeor, Harris-Benedict, Katch-McArdle).
Full docs with copy-paste examples (mppx CLI, curl, TypeScript, Python, MCP).
| Route | Price | What you get |
|---|---|---|
POST /v1/food/nutrition | $0.002 | Meal / ingredient nutrition (USDA) Nutrition for a meal written in plain words ("2 large eggs, 1 cup cooked white rice, 1 tbsp olive oil"): each item matched to a USDA FoodData Central record, quantity converted to grams from USDA portion weights, 19 nutrients per item and totals, with the match and the gram basis shown so nothing is a guess. Also barcode lookup (Open Food Facts: nutrients, Nutri-Score, NOVA, allergens) and BMR / TDEE / BMI / macro targets (Mifflin-St Jeor, Harris-Benedict, Katch-McArdle). |
POST /v1/food/search | $0.001 | Find USDA foods by name Search the bundled USDA FoodData Central foods (SR Legacy + FNDDS, 13,224 foods) by name: fdc_id, description, nutrients per 100 g and every USDA portion weight. Use the fdc_id with /v1/food/nutrition for an exact pick. |
POST /v1/food/barcode | $0.001 | Packaged food by barcode (Open Food Facts) Look up a packaged food by EAN/UPC barcode on Open Food Facts: name, brand, nutrients per 100 g and per serving, Nutri-Score, NOVA group, allergens, traces, vegan/vegetarian/palm-oil flags, ingredients. Not found returns found:false. |
POST /v1/food/tdee | $0.001 | BMR, TDEE, BMI and macro targets Daily calorie needs from sex, age, height, weight and activity: BMR and TDEE by Mifflin-St Jeor, revised Harris-Benedict and (with body fat %) Katch-McArdle, a goal target (lose / maintain / gain), protein / fat / carb grams and BMI. Exact formulas, computed in the worker. |
Data: USDA FoodData Central SR Legacy + FNDDS (public domain, CC0), bundled; Open Food Facts (ODbL 1.0) for barcodes. Formulas computed in the worker. Operated by FMF Tools (fmf-tools@agentmail.to). Pay per call; invalid input or an upstream failure returns 402 and is not charged.