EAN 13 is an international system. Is there an API or database that contains all items that have these barcodes? Like all food, goods you can buy in a regular convenience store. Is there a global open database for this?

(Can't post an answer, so a comment.) I've tried most of the readily accessible suggestions below (after my own futile attempts brought me here), and seeing that nothing even remotely worked, I can now attest that the best way of getting at least some sort of relevant answers (instead of nothing), is merely Googling up the EAN. 100% success rate for my tries. Unstructured, but at least the information is there to process further, which I prefer to the structured DBs that return "no match".
– Sz.Jan 20 '18 at 15:57

The mission: Build a database of every product in the world that is free to everyone. It's licensed under CC0 (Public Domain Dedication) and all the information is available for download. There aren't many products yet, but it's a start for those who want to make this a reality.

They claim to have 2094 items in the database. You won't find much there...
– Gene VincentMar 18 '14 at 10:14

3

I think that Pithikos talk about the metrics used, for instance datakick.org/api/items/000000000000 has "size":"8 oz". I agree it makes sense to keep the original size unit, but providing another field with metric units would make the data easier to reuse, especially for global projects.
– Nicolas RaoulSep 12 '14 at 9:54

In short, no, there is no comprehensive open database of EAN 13 barcodes. I worked on a project that required UPC information and I found out that this data is not only hard to get, but what is there is often incomplete or poorly formed. I subscribed to SimpleUPC's API service to do some testing on matching products to parent companies. Manufacturer names weren't uniform, for example, so identifying all of the Procter & Gamble products wasn't that straightforward. If I recall correctly, I found misspellings of manufacturer names. I'm pretty certain these were upstream issues (UPC providers), not a problem with SimpleUPC's service.

As Megan linked to, the GEPIR registry on the GS1 will allow you to search, but is not bulk downloadable nor do they provide an API. There is an API version of the GS1 US GEPIR database called GS1 US Data Hub (www.gs1us.org/datahub). It also offers an option to match a list of UPCs that you may have to their database.The GS1 is the international association that governs the EAN 13 and UPC standards. They do not provide the EAN 13 information in a machine readable format, and I doubt that have an interest in doing so.

There are companies like SimpleUPC that sell access to a slice of UPC data (groceries, for example) they collect through partnerships with larger companies. Even then, the information isn't likely to be uniform or complete.

Long answer - there are attempts at creating a "global" or should I say "universal" UPC database and there are some vendors with large UPC databases (and even those who provide API access), but none of them are hardly "universal".

This is a problem that I have personally been grappling with. At work I manage a large number of SKUs (in the many millions). Many of them which have UPC information. One of the biggest pain points has been that we have been looking to match those UPC data with a centralized product database and pull out structured metadata for those products.

We have resorted to using a commercial vendor via API (https://semantics3.com/) - to match the ones in which they have an entry for (we get about ~60-70% match rate depending on the category).

The rest we just try to contact the merchant directly or try googling around (I once had an intern who did this for me).

This doesn't look like open data: "Unfortunately I can't make available the full database."
– Patrick Hoefler♦Mar 30 '15 at 17:54

1

Update from 2018 jan.: I couldn't do even 3 manual lookups over the span of several hours, due to an absurd "Excessive use" error! :-o :) Provided that it wasn't just a transient glitch, I don't think one can get much further away from being open, unfortunately.
– Sz.Jan 20 '18 at 15:29

Great but unfortunately UPC database is not open data: "The data or services provided by the site may not be redistributed in any manner" upcdatabase.com/docs/terms.asp GEPIR is not open data either, as far as I understand only members of GS1 can access it. Cheers!
– Nicolas RaoulJun 5 '13 at 5:17

Grocery.com has launched (Sept. 20, 2014) an open data project ("open grocery database project") to list UPC codes, brand, product and other information on products sold in grocery stores. According to their website:

We start with a small installment. Our first file contains a little over 100K grocery products with the following data points: grp_id, upc14, upc12, brand and product_name. We are not including other data points in this file to conserve space and make the handling of the data manageable.

They give some explanation about their method of converting UPC codes. You can download the entire database in an Excel file format, which can easily be converted to CSV file.

It looks you can get product+barcode data commercially from http://www.mynetfair.com. At least http://www.barcoo.com uses their data. However, barcoo also crowd-collects so that may be bidirectional. (I like what they do and hope they will include allergy info with their food data at some time)

The largest and most accurate open reference book of bar codes on the Internet! If you do not believe it, the search engines will help dispel doubts. Slightly less than 3 million bar codes of ean13, ean8, upc-e, upc-a standards with corresponding names, brands and categories.

No one mentioned ItemMaster.com which provides pretty comprehensive product data which includes UPC codes, descriptions, nutrition, attributes, low and high res images and complete planograming information for retailers. Trouble is that they are sponsored by the manufacturers so their selection is limited. As of October 2014 they had 65,000 products. You will have to create a free account to download data.

There are a number of routes that you could take depending on the scope and requirements of your project. I recommend using Amazon's Product Affiliate API, however there are a few other options available as well.

Free with Terms & Conditions
Amazon offers a comprehensive database of product information. This API is available through their affiliate program. The information supplied via this API contains much more information as most sellers are required to populate this information. While this information does not cost money, be sure to read through their terms of service.

Paid
If you want an accurate and comprehensive database of products that can be looked up by UPC or EAN, you can use GS1 US. This organization is responsible for distributing and maintaining UPC and EAN codes for products in the US. While this information is very accurate, this data is NOT free and requires a paid subscription.

Quick
A final solution involves scraping content off product database providers over the web. There are a number of online databases that may provide more information than the options above. Products can be programmatically retrieved by UPC or EAN using the examples below. Again, be careful not to break any terms of service with these approaches as well.

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).