Hacker News new | past | comments | ask | show | jobs | submit login
Open Food Facts – A free food products database (openfoodfacts.org)
381 points by teolemon on Jan 24, 2015 | hide | past | favorite | 93 comments



I love this idea. I have wanted to build something similar for a long time. One of the key features I believe would be to track ingredient changes over time, per product.

I put a great amount of effort into purchasing products without specific ingredients for the allergy concerns of my family. One of those is High Fructose Corn Syrup. I had finally found a brand of BBQ sauce that was HFCS free, and used it for quite a long time. One day I became curious if the ingredients had changed, and sure enough, the company had started using HFCS at home point.

Tracking these sorts of changes of course requires a great amount of crowd-sourcing effort, but I believe that it's worth so much more than the effort put in. In my case, it was just HFCS, and not much of a problem. But had it been one of the allergens that we have to avoid, that would have caused a much bigger problem.

Great work, keep it up! I look forward to contributing.


Indeed it will be very interesting to see how products evolve over time. Open Food Facts also has a "Food Archeology" project. The idea is to find old products and put them in the database as well. Anyone knows soda cans collectors? :-)

Something very interesting as well is to compare products accross different countries, first to identify differences, and second to see if there is a correlation between those differences and differences in the prevalence of some affections like diabetes or obesity.


There's an interesting NPR Planet Money article on a related topic http://www.npr.org/blogs/money/2014/06/05/319084976/why-a-pa...

It might be difficult to track the products which change labels as ingredients change.

Another interesting idea would be to see how product lines evolve. Watch as the product line is split into two or more lines to target different types of consumers (or merged for that matter), while at the same time keeping record of ingredients and other interesting info. Sounds fun!


We're actually looking for both technical and non technical contributors, on a wide range of topics. We have a Wiki (http://en.wiki.openfoodfacts.org) Slack (http://openfoodfacts.slack.com) and the source code is available on GitHub.


Is the data available via a RESTful JSON API? If not is that something that would be possible, more than willing to help.

The data would be very useful to mobile apps and mashups if presented in an API.


yes it is. you have a read API being built at http://world.openfoodfacts.org/data and a basic write one at http://en.wiki.openfoodfacts.org/Project:API If you'd like to help improve it, send a mail to pierre at openfoodfacts dot org so that i can invite you to our Slack.


I second the idea of tracking ingredients. It would be good if price could also be tracked.


Would it be possible to display the data on a "per package" basis instead of the usual "per 100 g" or "per serving" basis?

I'm not a stupid person, but I still can't for the life of me figure out why the food industry deemed it necessary to invent a psudo-unit, "the serving", that differs depending on what food you're eating and what brand of that food you're eating.


FDA calculated the reference amounts for persons 4 years of age or older to reflect the amount of food customarily consumed per eating occasion by persons in this population group. These reference amounts are based on data set forth in appropriate national food consumption surveys.

[1] http://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfcfr/cfrs...


right, and the standard user of orange tic tacs only eats one per occasion.


In the UK this is commonplace as a way to 'cheat' when displaying nutritional information.

For example; displaying the fat, sugar, etc contained in half a bag of crisps prominently on the front, and claiming this is a serving size.

I find the practice completely ridiculous and misleading, practically worse than simply not having the information at all (the stats per 100g, etc are still displayed on the back).

Who eats half a chocolate bar? Half a bag of crisps? Half a microwave meal? Drinks half or a third of a can of coke? Even if they did, almost without fail the other fraction would be consumed within the same day anyway.


It's definitely possible. There's a game that uses the Open Food Facts data and asks you to guess how much sugar there is in a product (the whole package). It also uses the same physics engine as Angry Birds (box2d) to make sugar cubes fall: http://howmuchsugar.in/


Tried it for a few rounds. I think if you've reached a point where you're adding up the nutritional value of food you consumed as a function of bottles of Worcestershire sauce, you have bigger problems to resolve.


This is a fantastic idea.

My only worry is that the owners will be legally hounded from every corner of the world due to the fact that most large food corporations don't really want you to know what's in their products.

Like the fact that "orange juice" is basically rancid orange sugar water left sitting in large vats for up to a year that is doused with orange oil before sale, apparently. [0]

I would get some legal cousel were I persuing this venture.

[0] http://www.cbc.ca/news/business/orange-juice-is-premium-juic...


Valid concerns, and I share your sentiment about the inexcusable behavior of large-scale food manufacturers, but wouldn't it be better to focus on getting some real traction before wasting mental energy on what might happen; or investing in potentially unnecessary and costly legal counsel?

To my knowledge, they're not divulging any info that isn't already public - not to mention it could take a long time for this to ever reach a critical mass in which a manufacturer would care to go on the offensive towards them.

Probably would be best to keep grinding, build traction - and then pursue legal counsel; when you've got some revenue to pay for such things or even capital investment if that is a road the founders wish to pursue.

Actively working to keep everything open source & decentralized is a great insurance against those types of adversaries anyway.


Where are you getting that the orange juice goes rancid in storage? Evaporation and concentration is a way of preserving juice, not a way of destroying it. And vat is such a loaded term. Concentrate is stored in closed stainless steel tanks, just like every other liquid beverage, not some concrete trough.


Did you actually read the linked article? It's about not-from-concentrate orange juice, so your entire comment is basically irrelevant.


There's also nothing about "Rancid" juice in the article either. I don't understand the discontent with adding orange oil to orange juice. The orange oil is made from the juicing process as a byproduct from the skins.

There's hundreds of varieties of vanilla flavor extracts available from "flavor companies that also make perfumes" (which is a false equivalence, implying that a perfume is inherently toxic, synthetic and evil), all made from vanilla beans. Problem as well?


Great idea -- as a user of Musicbrainz, it's right up my alley. I went ahead and made some updates to a nutella http://world.openfoodfacts.org/product/009800895007 page, and it works as I'd expect.

The Android app has problems, though.

1. The barcode scanner doesn't work, at least on the product I mentioned above. I tried it with the Barcode Scanner app, and it works fine there.

2. No barcode search. Since I used the Barcode Scanner app to get the barcode, I wanted to try to paste the result into OFF. No go.

3. The scan help text "Scan the barcode to find or add a product" is very hard to read on a dark background. There's probably a better way to show this help text.

4. Pressing physical back button in "scan" mode does not go back: https://github.com/openfoodfacts/openfoodfacts-android/issue...


Interestingly enough, there is at least also a "nutella" (not capitalized) for Nutella bought in Germany: http://world.openfoodfacts.org/product/4008400401621/nutella...


It appears that the Android app is made with Cordova. I wonder if a lot of the problems are due to it not being a native Android app?

The UI also looks like an ancient iOS app which doesn't give a good first impression either.


Today I learned that you can graph data from the website. It's a great way to see how one can make better decisions with open food facts http://world.openfoodfacts.org/cgi/search.pl?action=process&...


Whoa, it's really worrying how much sugar is in all these products. And this is even without all the starches I guess -- considering a lot of rye products are still on the left side.


Wow. Mountain Dew stands out with 77g of sugar per 100g in the soda category.

http://world.openfoodfacts.org/cgi/search.pl?action=process&...


That's a mistake. It's 77g sugar for 20 fl oz (which is a lot more than 100 ml) http://world.openfoodfacts.org/product/01213104


I was interested and then surprised on visiting the site that there seemed to be quite a few listings. However, most of what I clicked on had no nutritional information (a few lines of "?" instead). I would be much more likely to add information if I could easily see either a list or table of products which have been added (i.e. name and a picture) but have no/missing data. Also as rpedela has mentioned, an API would be helpful for adding and consuming the data.


The API is there. As for the incomplete products, you can drill them down by status if you want to help complete them. You can pick and choose from http://world.openfoodfacts.org/states

For instance, here are the US products with photos selected, but still in need of nutrition info: http://us.openfoodfacts.org/state/photos-validated/state/nut...


The API seems extremely limited. It seems you can find product info based on barcode or something, but there doesn't seem any way to submit products using an API. Of course with scraping one could "fake" and API, but that kind of sucks ...


For now, you have a write API being built at http://world.openfoodfacts.org/data and http://en.wiki.openfoodfacts.org/Project:API If you'd like to use the API to contribute or help improve it, send a mail to contact at openfoodfacts dot org.


First: looks great, well done.

The problem with other food databases I've seen is the amount of duplicate or incorrect information. Are y'all actively taking steps to curtail this?


Yes: so far we have a revision history for each product, and a revert system, we use the photos to ensure accuracy of data and we rely on the Barcode to limit duplication. If you're interested in helping on quality, please send me your email to pierre at openfoodfacts dot org so that I can invite you to our Slack.


I'm dreaming of a "GPL" food movement, where the process of making the food in question can be inspected by anyone at any time, and where the ingredients and sub-ingredients that went into it are also recursively "open source". There would be a Sourceforge/GitHub/YouTube site where you could upload and view videos of those inspections and leave comments.

Then you could even have a 100% "open source" product label when all the ingredients and sub-ingredients you used were also "open source".

You may ask: why would anyone other than paid food inspectors be interested in checking out those places? For one, it can be very educative to take your kids to show them how things are made. If you have allergies you may be interested in double-checking claims. It could also be an alternative fun thing for people into geocaching, for example to help "complete" the "100% open source" label for a given product.

You may also ask: why would anybody in the food industry be interested in making their food open source? Why would they want to give up their trade secrets? Well, for one not every product has to be mysterious: e.g., bread is bread, you just want to know if any suspicious additive has been used, and if your bread is good you want people to know it. It can be a marketing tool. You could prove that your product is 100% organic/local/kosher/gluten-free/peanut-free, etc., because all of the sub-ingredients have been verified to be the same as well, and you've crowd-sourced the work of verifying this.

Thoughts?


A detailed list with the exact amount of all ingredients and the original recipe (with all technical details) that was used to produce the food.

That would be a big step in the right direction, similar to the open source free software movement.

All food treatments should be more regulated and some marketing terms banned. There is already a common misuse of terms like e.g. "gluten-free" to market even products that cannot contain gluten in anyway - it's just a PR vehicle on purpose. Processing milk products to remove lactose just to broaden the market value of products should be evaluated by the government and natural un-processed products favored.


> and natural un-processed products favored.

Should they be favored automatically, or only if there's evidence that the un-processed foods are actually better?



I could not find any mention of a free license which makes a non-alternative in my opinion.


Says they have 1,000 products... seems quite small in comparison.


Should've linked to the original German site (just fddb.info), which has 233,000.


Neat! I was thinking about an optimal design for a similar idea just the other day. Motivated by the lack of accountability by food producer/manufacturers - and lack of a venue for consumers to voice concerns.

This was a direct result of a jar of honey I had qualms about (and probably an aggregate of other concerns & thoughts that we all build up over time on topics like this).

I wrote the producer an email, but would much prefer voicing my opinion public - seems that would be a far more effective way to get the issue resolved.

Anyway, I gave it a go with this Open Food Facts site. Here's the product I added:

http://world.openfoodfacts.org/product/5220400060/raw-organi...

My first impression is that the interface is a tad cluttered.

Secondly, some of the categorization fields on the Add Product page are redundant.

Last & most importantly: my most desired use-case for this application is not actually accommodated for.

In addition to the detailed product info, which the site does a nice job of allowing me to enter, I want to be able to leave feedback about the product itself.

For example, with this particular jar of honey my main gripe was the film/plastic foil residue left on the outer rim of the jar when you first open it up. It's great that this product is in a glass jar, is 100% raw and organic - but when little chunks of plastic foil end up in my honey it totally invalidates those benefits.

Anyway, the feedback feature could be as simple as a comment thread below the page. And perhaps thinking a bit father out, ideally: an Amazon style review system.

Either way - love the progress so far, props for a great app already.


This looks like a great free alternative to Nutritionix and/or MyFitnessPal. I've never been approved for a MFP API account. I'm definitely going to be checking this out!

So many places charge outrageous sums for this data, especially if you have UPCs. I didn't see UPCs anywhere on the site- any plans to track those as well?


Totally agree that most company charge a fortune for using the data that their customer entered for them :) ... I guess if you have a free app you should know that you are the product. And yes MFP doesn't allow access to their API except if you are an already established company with thousand of users, again it make sense given their business model. OFF has UPC has well, if you download the app you can scan a product and if it doesn't match the database you can add the information and attach the pictures of ingredients and nutritional info.


Open Food Facts uses UPCs to identify products, it's the primary key of the database, and it's available on each product page.

Food data needs to be public, free and open, it's way too important and useful to be kept behind a paywall.


Really nice - especially seeing as a lot of things I'd actually find in a supermarket are there.

Is there any way to get a database dump of some sort? I managed to find a Open Food Facts API on Github, but I'd imagine it might be better to be able to export data so I'm not chewing up resources on Open Food Facts' server.



A wiki for food nutrition info, nice work and good to see there's already considerable community support.

One odd thing I noticed while at first browsing with Javascript disabled is clicking the site logo in the top left opens a file upload dialog. Not sure exactly what purpose using an input element for the logo is.


As the comments point out, apart from immediate use to consumers, it can also help understand underlying temporal trends and perhaps with some data analysis suggest healthier substitutes based on user tastes.

However, as part of a course project in using Convolutional nets for image recognition, I was wondering, what if, we could simply take a picture of a rack in a grocery store and augment the image with the overall "healthiness" heatmap.

And now to the meat of the problem, data. Is there a readily available dataset on which the image recognition can be trained? Note that each product will need to have a images taken from a variety of angles and lighting conditions. There exist methods to automatically generate alternate sets of images, but they are not perfect and we would still need data.


Yes, we have a tagged dataset, and image recognition would just be awesome. Can you send a mail to pierre@openfoodfacts.org so that I can invite you to the OpenFoodFacts slack, so that we can discuss it further ?


Something else that would be quite useful is to include links to the international names of each product so that you can compare their ingredients.

For example, Kellogg's Frosted Flakes [1][2] are called Frosties in the UK, France [3] and some parts of Europe, but do not have identical ingredients.

[1] http://en.wikipedia.org/wiki/Frosted_Flakes

[2] http://world.openfoodfacts.org/product/038000219634/frosted-...

[3] http://world.openfoodfacts.org/product/5053827104081/frostie...


Hi teolemon, if you're still following:

Please consider allowing multiple barcodes for an individual product. I live in the USA, where (because of tradition and archaic technology) some grocers don't like to market products bearing only EAN barcodes. So, many imported items have both UPC and EAN barcode.

I hit a different case today: a box of 20 pieces with one barcode, but the individual item inside has a different barcode.

Maybe the functionality is already there, but I couldn't figure out how to do this.


Can you send a mail to pierre@openfoodfacts.org so that I can invite you to the OpenFoodFacts slack. Barcodes are indeed a tedious issue.


This is fantastic.

One "future vision" if I may -- actually tracking, sharing, recommending, etc. nutrition research. I think one of the most painful things for everyone interested in nutrition is actually knowing what the research says about what they need to eat, when, how, etc.

"Future vision squared" would be to personalize nutrition recommendations / advice to each person, but I'm dreaming.


for nutrition research I think http://examine.com is a pretty good resource


Woah, haven't heard of them before. Thank you!


actually, this was what I wanted to mention as well. Examine has all the right talent in nutrition.... openfoodfacts has the technical talent.

you guys should find a way to collaborate ... or even power the next gen Examine


That's us! Thanks for the kind words :)


Hello SoloX5. Open Food Facts contributor here. I absolutely love examine.com. Would any of your data be reusable under some open license or is it a strictly proprietary database?


Honestly - we've been meaning to release an API once we get our new backend out. Of course that's been the hiccup - it's been almost ready for far too long :)

Ping me via www.examine.com/contact/ and lets see if we can make it happen.


I love this idea.

One question, do you have any mechanism for verifying the data is correct? I see that the submitter can upload a picture of the nutrition data that is on the food packaging, but if that food is not packaged in a can, but fresh food, how can the data be verified?

Hope that this takes off.

My family is using lactose free and gluten free products, and accurate information is hard to come by.


Made a "quick" graph of which brands have the most carbohydrates (for food products that aren't just sugar).

Kind of neat, but I've never heard of a lot of the brands. (Most of the data is from France, turns out.)

http://i.imgur.com/i3gOQS3.png


Also sort of interesting to see the date that the data was added: http://i.imgur.com/Te60ErW.png

Day of the week the data was added: http://i.imgur.com/XqebDJM.png

Most Alcoholic brands: http://i.imgur.com/a1u6iNM.png


A lot of those are candy.


Love the concept. Tried adding products with the Android app- it would be good to add more details than just the name and pictures (on the app that is)

Also encountered a bug for a new product ingredient. The unfortunate part is that it lost all the data that I had entered till then.

Looking forward to contributing.


Thanks for creating this. I use the USDA nutrition database in my cookingspace.com web portal. I am interested in all things food (work in a community garden, maintain a 100 year old irrigation ditch for a historic farm, and cooking is a major hobby). Thanks again.


Interesting. Is there an API or download link? I am having trouble finding one if there is.


Yes, it's downloadable here as RDF and CSV, as a JSON API (read and write if you want to contribute): http://world.openfoodfacts.org/data

There are also mobile apps for iOS, Android and Windows Phone to contribute to the base on the go, or check a product.


Is the data available for download in English? I can only find it in French?


The CSV file appears to mix English and French.


I couldn't find anything but this type of information would be great with an API.


http://world.openfoodfacts.org/data and http://en.wiki.openfoodfacts.org/Project:API

contact@openfoodfacts.org if you have any questions


Nice! I want to know how much of each ingredient is in the food. I want the tool to automatically collect the nutritients and vitamins and other components from ingredients and subingredients, and sub-sub-ingredients, etc.

(Sorry for brevity)


I like the idea of a free database and the implementation.

I had used www.codecheck.info before, it's a similar database with a community. It started as a university project, though the community content is now owned by a company.


I don't get why there is a East-Germany option in the left sidebar select.


It's a bug, thanks for spotting it. I'd be very interested to see what kind of food products were available in East Germany though!



Geez. I was looking for a "free food products" database and was disappointed to find a "free, food products db" :/


Open Food Facts is free as in speech as well as free as in Beer (The Open Food Facts database is available under the Open Database License. The individual contents of the database are available under the Database Contents License. Products images are available under the Creative Commons Attribution ShareAlike licence).

But you're right, we still haven't got a Free as in Beer, Beers category :-P


It would be nice if this database can also include halal, kosher, or vegetarian/vegan status for the products.


We have a system of labels (for halal, kosher, vegetarian/vegan) which you can see at: http://en.wiki.openfoodfacts.org/Global_labels_taxonomy We're also looking at religious certification authorities. We need help to improve on both.


Is there a way to use this database to determine if a food product is suitable for vegetarians or vegans?


You have all the labels available at http://world.openfoodfacts.org/labels but you still should of course exercise caution and read the packaging.

http://world.openfoodfacts.org/label/vegan http://world.openfoodfacts.org/label/vegetarian

Power tip: you can actually look for several criterias: eg: http://world.openfoodfacts.org/label/vegetarian/label/organi... or http://world.openfoodfacts.org/label/vegetarian/category/puf...


We are trying to build a taxonomy of ingredients so that we can automatically analyze the ingredients list and find out if it's suitable for vegans, vegetarians, people who cannot eat gluten, lactose etc. There's still a lot of work to do, would you like to help?


MMh do they track the density to enable conversion between spoon and gram and vice versa ?


I wonder if they have imported a bunch of Freebase items, now that its shutting down.


[deleted]


Here is the github https://github.com/openfoodfacts There are also some translation stuff on launchpad if it is of any interests to you


Someone is going to write a Scrappy Project for this site soon..



Is there price information as well?


You could try hooking up the UPC to a pricing API like https://semantics3.com (Disclosure: I am one of the founders)


Price would be quite difficult to track, but I guess an app using Open Food Facts data could do it using crowdsourcing :-)


Apps track gas prices quite easily...


True. But there are only a few different types of gas, and in the US alone, there are 50000 new food products introduced on supermarket shelves every year: http://www.ers.usda.gov/Briefing/FoodMarketingSystem/new_pro... And there are also many more places that sell food than gas (proof is that places that sell gas almost always sell food too). But with enough motivated individuals, anything is possible, price tracking included.


It is definitely doable. You don't need 100% coverage to be useful. A French company could do it (prixing.fr) although they don't currently. They allow you to scan a product barcode in your supermarket and compare it to their database to see if there is a cheaper alternative elsewhere. As baseline for their DB they scrap supermaket's online store and then complete/correct with what people scan with their mobile. Works really well in France because the market is somewhat concentrated an most of them have an online store.

Given that, they could probably track prices over time. I guess they probably do it internally and sale it on B2B basis.


Not "open" but a much better resource, at least for now: http://nutritiondata.self.com/

Maybe these guys can catch up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: