FoodChecker

v0.1.0
io.github.kjagsadvisors/foodchecker Checked 22 hours ago Published 1 month ago

Is this food healthy? A 0-100 score from nutrition, additives and processing (Open Food Facts).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_food Check a food product

Looks up a packaged food or drink in Open Food Facts (3M+ products) by barcode or by name and returns a 0-100 health score (Excellent / Good / Poor / Bad) with the reasons: nutrition (Nutri-Score), additives and their risk level, and how processed it is. For questions such as whether a product is healthy. A barcode gives the most precise match.

ParameterTypeDescription
barcodestringEAN/UPC barcode digits, e.g. 3017620422003.
countrystringOptional country to prefer when searching by name, e.g. 'united-states', 'france', 'united-kingdom'.
querystringProduct name, ideally with the brand, e.g. 'Nutella hazelnut spread'. Used when there is no barcode.

analyze_label Score a food from its label

Scores a food from its label: the ingredient list and/or the nutrition facts, for example from a photo of the packaging or pasted text, including products that aren't in the database. Most accurate with the ingredient list exactly as printed, including E-numbers and words in brackets. Nutrition values can be per 100 g or per serving (with the serving size). Returns the same 0-100 score and reports any missing data.

ParameterTypeDescription
brandstring
categorystringNutri-Score family. Use fat_oil_nuts_seeds for oils, butter, nuts and nut butters; cheese for cheese; red_meat for beef, pork or lamb products.
fruit_veg_percentnumber% of fruit, vegetables and legumes, if the label states it.
ingredients_textstringThe full ingredient list exactly as printed.
is_drinkbooleanTrue for beverages (milk and plant drinks included). Values are then per 100 ml.
nutritionobjectThe nutrition facts table, copied exactly.
product_namestring

find_healthier_alternatives Find healthier alternatives

Finds similar products in the same Open Food Facts category that score clearly higher than the given product, best first, each with its score.

ParameterTypeDescription
barcode *stringBarcode of the product to beat.
countrystringOnly suggest products sold in this country, e.g. 'united-states'.
limitinteger

explain_additive Explain a food additive

Explains what a food additive is, what it does, and its risk level with sources, by E-number (E250) or name (sodium nitrite, Red 40, carrageenan).

ParameterTypeDescription
additive *stringE-number or name, e.g. 'E471' or 'Red 40'.