{"openapi":"3.1.0","info":{"title":"FMF Food Facts","version":"1.0.0","description":"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). Docs: https://food-facts.fmf-x402.workers.dev/docs — copy-paste examples for the mppx CLI, curl, the TypeScript SDK (mppx) and the Python SDK (pympp), plus an MCP config. Machine-readable: https://food-facts.fmf-x402.workers.dev/llms.txt and https://food-facts.fmf-x402.workers.dev/openapi.json. MCP (Streamable HTTP): https://food-facts.fmf-x402.workers.dev/mcp. Fleet of sister services: https://mpp-docs.fmf-x402.workers.dev, https://mpp-agent-data.fmf-x402.workers.dev, https://mpp-tools.fmf-x402.workers.dev, https://mpp-ai.fmf-x402.workers.dev, https://mpp-browser.fmf-x402.workers.dev, https://mpp-research.fmf-x402.workers.dev, https://mpp-chain.fmf-x402.workers.dev, https://mpp-stt.fmf-x402.workers.dev, https://mpp-compat.fmf-x402.workers.dev, https://mpp-domain.fmf-x402.workers.dev, https://mpp-utils.fmf-x402.workers.dev, https://mtg-sim.fmf-x402.workers.dev, https://controlplane-x402.fmf-x402.workers.dev, https://pokemon-tcg-sim.fmf-x402.workers.dev, https://yugioh-sim.fmf-x402.workers.dev, https://mpp-cryptotax.fmf-x402.workers.dev, https://mpp-biz.fmf-x402.workers.dev, https://lorcana-sim.fmf-x402.workers.dev, https://onepiece-sim.fmf-x402.workers.dev, https://hearthstone-sim.fmf-x402.workers.dev, https://chess-sim.fmf-x402.workers.dev, https://dota2-sim.fmf-x402.workers.dev, https://cs2-sim.fmf-x402.workers.dev. 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.","x-guidance":"POST JSON (or GET with query params) to any /mpp/* route and pay the 402 challenge with MPP on Tempo (USDC.e or pathUSD) or x402 v2 on Base (USDC). Bad input or an upstream failure returns 402 with an error and you are not charged. If you omit a documented input param, the route uses the default listed in this document and in the 402 challenge.","contact":{"name":"FMF Tools","url":"https://food-facts.fmf-x402.workers.dev/docs","email":"fmf-tools@agentmail.to"},"x-docs":"https://food-facts.fmf-x402.workers.dev/docs","x-mcp":"https://food-facts.fmf-x402.workers.dev/mcp","x-llms":"https://food-facts.fmf-x402.workers.dev/llms.txt","x-fmf-id":"food-facts","x-related":{"name":"FMF Recipes","what":"Which paid API to call for any agent task","find":"https://agent-recipes.fmf-x402.workers.dev/mpp/recipes/find","price_usd":0.003,"empty_call_ok":true,"mcp":"https://agent-recipes.fmf-x402.workers.dev/mcp","llms":"https://agent-recipes.fmf-x402.workers.dev/llms.txt"},"x-also":{"name":"FMF Tools Etsy Movers","what":"Today's top 20 Etsy shops by sales acceleration from the FMF Tools Etsy Pulse panel (no input)","find":"https://etsy-movers.fmf-x402.workers.dev/etsy/movers/today","price_usd":0.01,"empty_call_ok":true,"mcp":"https://etsy-movers.fmf-x402.workers.dev/mcp","llms":"https://etsy-movers.fmf-x402.workers.dev/llms.txt"}},"servers":[{"url":"https://food-facts.fmf-x402.workers.dev"}],"paths":{"/v1/food/nutrition":{"post":{"operationId":"_v1_food_nutrition","summary":"Meal / ingredient nutrition (USDA)","description":"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). Price $0.002 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"Up to 50 items: plain text (\"1 cup cooked white rice\", \"100 g chicken breast\", \"12 almonds\") or {food, amount, unit} or {fdc_id, grams} (default: [\"2 large eggs\",\"1 cup cooked white rice\",\"1 tbsp olive oil\",\"1 medium banana\"])"}}},"example":{"items":["2 large eggs","1 cup cooked white rice","1 tbsp olive oil","1 medium banana"]}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.002"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/v1/food/search":{"post":{"operationId":"_v1_food_search","summary":"Find USDA foods by name","description":"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. Price $0.001 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"q (default: greek yogurt)","default":"greek yogurt"},"limit":{"type":"integer","description":"default 5, max 20"}}},"example":{"q":"cheddar cheese","limit":3}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/v1/food/barcode":{"post":{"operationId":"_v1_food_barcode","summary":"Packaged food by barcode (Open Food Facts)","description":"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. Price $0.001 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"barcode":{"type":"string","description":"EAN-13, UPC-A or EAN-8 digits (default: 3017620422003)","default":"3017620422003"}}},"example":{"barcode":"3017620422003"}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/v1/food/tdee":{"post":{"operationId":"_v1_food_tdee","summary":"BMR, TDEE, BMI and macro targets","description":"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. Price $0.001 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sex":{"type":"string","description":"male or female (default: female)","default":"female"},"age":{"type":"number","description":"age (default: 30)","default":30},"weight_kg":{"type":"number","description":"weight_kg (default: 60)","default":60},"weight_lb":{"type":"number","description":"weight_lb"},"height_cm":{"type":"number","description":"height_cm (default: 165)","default":165},"height_ft":{"type":"number","description":"height_ft"},"height_in":{"type":"number","description":"height_in"},"activity":{"type":"string","description":"sedentary, light, moderate, active, very_active (default: moderate)","default":"moderate"},"goal":{"type":"string","description":"lose, maintain, gain (default: maintain)","default":"maintain"},"body_fat_pct":{"type":"number","description":"body_fat_pct"},"deficit_kcal":{"type":"number","description":"default 500"},"surplus_kcal":{"type":"number","description":"default 300"},"protein_g_per_kg":{"type":"number","description":"protein_g_per_kg"},"fat_pct":{"type":"number","description":"default 25"}}},"example":{"sex":"male","age":40,"height_ft":5,"height_in":11,"weight_lb":190,"activity":"light","goal":"lose"}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}}},"externalDocs":{"description":"Copy-paste examples (CLI, curl, TypeScript, Python, MCP)","url":"https://food-facts.fmf-x402.workers.dev/docs"},"components":{"securitySchemes":{"Payment":{"type":"http","scheme":"Payment","description":"MPP Payment credential on Tempo (USDC.e or pathUSD). Clients such as mppx handle the 402 challenge automatically. See https://mpp.dev/sdk"}}},"tags":[{"name":"paid","description":"Pay-per-call MPP routes. Unpaid requests receive 402. Invalid input is not charged."},{"name":"discovery","description":"Free discovery surfaces: /docs, /llms.txt, /openapi.json, /mcp, /health, /stats."}]}