←back to thread

311 points joshdickson | 3 comments | | HN request time: 0s | source

Hi HN!

Today I’m excited to launch OpenNutrition: a free, ODbL-licenced nutrition database of everyday generic, branded, and restaurant foods, a search engine that can browse the web to import new foods, and a companion app that bundles the database and search as a free macro tracking app.

Consistently logging the foods you eat has been shown to support long-term health outcomes (1)(2), but doing so easily depends on having a large, accurate, and up-to-date nutrition database. Free, public databases are often out-of-date, hard to navigate, and missing critical coverage (like branded restaurant foods). User-generated databases can be unreliable or closed-source. Commercial databases come with ongoing, often per-seat licensing costs, and usage restrictions that limit innovation.

As an amateur powerlifter and long-term weight loss maintainer, helping others pursue their health goals is something I care about deeply. After exiting my previous startup last year, I wanted to investigate the possibility of using LLMs to create the database and infrastructure required to make a great food logging app that was cost engineered for free and accessible distribution, as I believe that the availability of these tools is a public good. That led to creating the dataset I’m releasing today; nutritional data is public record, and its organization and dissemination should be, too.

What’s in the database?

- 5,287 common everyday foods, 3,836 prepared and generic restaurant foods, and 4,182 distinct menu items from ~50 popular US restaurant chains; foods have standardized naming, consistent numeric serving sizes, estimated micronutrient profiles, descriptions, and citations/groundings to USDA, AUSNUT, FRIDA, CNF, etc, when possible.

- 313,442 of the most popular US branded grocery products with standardized naming, parsed serving sizes, and additive/allergen data, grounded in branded USDA data; the most popular 1% have estimated micronutrient data, with the goal of full coverage.

Even the largest commercial databases can be frustrating to work with when searching for foods or customizations without existing coverage. To solve this, I created a real-time version of the same approach used to build the core database that can browse the web to learn about new foods or food customizations if needed (e.g., a highly customized Starbucks order). There is a limited demo on the web, and in-app you can log foods with text search, via barcode scan, or by image, all of which can search the web to import foods for you if needed. Foods discovered via these searches are fed back into the database, and I plan to publish updated versions as coverage expands.

- Search & Explore: https://www.opennutrition.app/search

- Methodology/About: https://www.opennutrition.app/about

- Get the iOS App: https://apps.apple.com/us/app/opennutrition-macro-tracker/id...

- Download the dataset: https://www.opennutrition.app/download

OpenNutrition’s iOS app offers free essential logging and a limited number of agentic searches, plus expenditure tracking and ongoing diet recommendations like best-in-class paid apps. A paid tier ($49/year) unlocks additional searches and features (data backup, prioritized micronutrient coverage for logged foods), and helps fund further development and broader library coverage.

I’d love to hear your feedback, questions, and suggestions—whether it’s about the database itself, a really great/bad search result, or the app.

1. Burke et al., 2011, https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3268700/

2. Patel et al., 2019, https://mhealth.jmir.org/2019/2/e12209/

Show context
johnisgood ◴[] No.43570336[source]
Just at a quick glance...

How can a large egg (50 g) contain 147 g choline?

https://www.opennutrition.app/search/eggs-eeG7JQCQipwf

Additionally, on https://www.opennutrition.app/search/brown-lentils-VwKWF7CQq... it says:

> Unlike larger legumes, they require no pre-soaking and cook in 20-30 minutes, making them ideal for soups, stews, and salads

That is not necessarily true. Based on my experience, it does require pre-soaking, otherwise you will have to cook it for a long time, as opposed to red lentils (which is done under 15 minutes, no pre-soaking needed), although red lentils taste more like yellow peas.

In any case, I think this could be really useful, once accurate enough. One could even implement other features on top, such as a calorie tracker and so forth, but that is a huge project on its own.

I wish you luck!

replies(2): >>43570483 #>>43570503 #
joshdickson ◴[] No.43570503[source]
That is missing a milligram label, thank you for pointing that out. Fix uploading now.
replies(2): >>43570546 #>>43570716 #
johnisgood ◴[] No.43570716[source]
That is what I thought.

BTW when you hover over the ingredients, you just get back the name. Are you guys going to do something with it in the future? Right now there is a visual feedback (the cursor changes), but it is not useful yet. I am not entirely sure what I would have expected, perhaps a description of what it is, and upon clicking on it, it could have information gathered from various sources, like examine.com and what have you, but that would be a huge change on its own, the short description upon mouse hover-over should work for now and may not be a huge change.

replies(1): >>43570897 #
joshdickson ◴[] No.43570897{3}[source]
The goal, without question, is 100% full coverage on citations for every piece of data that's in the database, even if the citation is an LLM's general reasoning (which for o1-pro is both quite good and often includes study citations).

Right now you'll see that aggregated on some items like this where the reported data is an ensemble of all of the linked resources: https://www.opennutrition.app/search/eggs-eeG7JQCQipwf

Frankly, I just couldn't justify the additional time and monetary expense in doing that if I released this initial version and nobody cared or found it useful. This dataset was also compiled before tools like Claude Citations came out which could make it easier. That is the nature of AI-driven data; I think this is useful now, it is also the worst it will ever be.

replies(1): >>43570930 #
1. johnisgood ◴[] No.43570930{4}[source]
I am not complaining by the way, it was more of a feature request, for example when you hover over an ingredient (e.g. "Choline", "Tryptophan", etc.), it may display a somewhat concise description of that ingredient (e.g. "Tryptophan is ..."). It is fine as it is either way, all things considered.
replies(1): >>43576081 #
2. joshdickson ◴[] No.43576081[source]
Ah that's a good idea, should add that. Also I appreciate your phrasing of "you guys" when, as a solo developer, if someone thinks your efforts are the product of a larger team, it's always appreciated :)
replies(1): >>43578810 #
3. johnisgood ◴[] No.43578810[source]
Yeah I thought more people worked on it, it looks good. :P

Keep it as accurate as possible, and maintainable, and then it will be easy to add larger features. If no one else does, I might add a calorie tracker of some sort, it would be helpful to my mom. It is helpful as it is even now. How difficult would it be to add translations right now? She might look for "tojás" which is "egg" in Hungarian, and I would like her to be able to do that at some point.