OpenFoodFacts offers variety of options to consume their data: https://world.openfoodfacts.org/data. From my experience, their coverage for packaged foods from various countries is amazing, though it can be fairly noisy.
In US, USDA provides a more curated dataset through FoodData Central (https://fdc.nal.usda.gov/) - smaller dataset but higher quality (nutrient coverage, number of samples tested, etc).