USDA FoodData Central
FoodData Central (FDC) is the United States Department of Agriculture's food-composition database, managed by the Agricultural Research Service at the Beltsville Human Nutrition Research Center and hosted by the National Agricultural Library. It is the successor to the older National Nutrient Database and gathers several distinct data types under one roof: Foundation Foods (analytical values for commodity and minimally processed samples), SR Legacy (the historical Standard Reference set, with its final update in 2018), Survey Foods from FNDDS (used in the What We Eat in America dietary survey), Experimental Foods, and Branded Foods (label data supplied through a public-private partnership). Between them they record energy, macronutrients, vitamins, minerals and other components per food.
This is a structured reference database rather than a packaged machine-learning corpus, so you shape it to your needs. You can search and browse foods through the web portal, pull individual records in real time through the REST API using a free data.gov key, or take the whole thing from the download page as Excel-compatible CSV or JSON. For a corpus, the bulk download is the sensible route; for lookups, the API suits on-demand resolution. For RAG, one food per passage works well: build a short block naming the food and its key nutrient values so a retriever can answer questions about what a food contains.
The licence position is clean. FDC data are in the public domain under CC0 1.0 Universal, so commercial use is permitted and no permission is needed. USDA asks as a courtesy that you credit FoodData Central as the source, but this is a request, not a legal condition, so attribution is not strictly required. One caveat: Branded Foods entries describe commercial products, and the data licence does not give you the right to imply any brand endorses your work. It sits naturally alongside the sibling food sources we list, Open Food Facts and CoFID, as the authoritative US-centred option among them.
Related sources
McCance and Widdowson's CoFID
The UK reference database for the nutrient content of foods, continuing McCance and Widdowson. Published on GOV.UK as Excel spreadsheets under the Open Government Licence, covering energy, macronutrients, vitamins and minerals per 100g of food.
Open Beauty Facts / Open Products Facts
Sister projects to Open Food Facts that apply the same collaborative model to cosmetics (Open Beauty Facts) and general consumer goods (Open Products Facts). Contributors scan barcodes and photograph packaging to build an open database of ingredients and product information.
Open Food Facts
A collaborative, free, and open database of ingredients, nutrition facts, and information on food products from around the world. Contributors scan barcodes and photograph ingredient lists and nutrition tables, following the model of Wikipedia and OpenStreetMap. Covers millions of products across 140+ countries.
OpenCorporates
A global database of companies, their directors, and regulatory filings. The largest open database of companies in the world, though bulk and API access is commercially licensed rather than freely reusable.