Dati

Atklātā pārtikas faktu datu bāze pieejama zem atvērtās datu bāzes licences . <1 /> Atsevišķs datubāzes saturs ir pieejams zem Datubāzes satura licences . <1 /> Produktu attēli ir pieejami zem licences Creative Commons Attribution ShareAlike . Tie var ietvert grafiskos elementus, uz kuriem attiecas autortiesības vai citas tiesības, un dažos gadījumos tos var reproducēt (citēšanas tiesības vai godīgas izmantošanas tiesības).

Lūdzu, izlasiet Lietošanas un atkārtotas lietošanas noteikumi pirms datu atkārtotas izmantošanas.

Mēs esam ļoti ieinteresēti, lai uzzinātu, kādi dati par atklātajiem pārtikas faktiem tiek izmantoti. It is not mandatory, but we would very much appreciate it if you tell us about your re-uses so that we can share them with the Open Food Facts community.

Open Food Facts datu eksporti

Datu bāzu izgāztuves un eksports tiek ģenerēti katru nakti.

Information on the different fields for the MongoDB dump and CSV exports is available at https://world.openfoodfacts.org/data/data-fields.txt

MongoDB izgāstuve

Visu produktu dati ir pieejami MongoDB datu bāzē.

Link
https://static.openfoodfacts.org/data/openfoodfacts-mongodbdump.tar.gz
sha256sum
https://static.openfoodfacts.org/data/sha256sum
md5sum
https://static.openfoodfacts.org/data/md5sum

Delta Export

Daily delta exports are provided for the previous 14 days. The list of currently available delta files can be found at https://static.openfoodfacts.org/data/delta/index.txt. Each line represents a file that is available at https://static.openfoodfacts.org/data/delta/{filename}. The filename contains UNIX timestamp of the first and the last change contained in the JSON file, so that the delta files can be imported (after extraction) with mongoimport in alphabetical order.

Please note that due to the nature of mongoexport, the delta files cannot tell you about deleted products. To remove deleted products from your database, you will need to import the full MongoDB dump.

CSV Data Export

Data for all products, or some of the products, can be downloaded in CSV format (readable with OpenOffice, Excel and many other software) through the advanced search form.

Link
https://static.openfoodfacts.org/data/en.openfoodfacts.org.products.csv

The file encoding is Unicode UTF-8. The character that separates fields is <tab> (tabulation).

RDF Data Export

The database is also available in the RDF format. announcement in French.

Link
https://world.openfoodfacts.org/data/en.openfoodfacts.org.products.rdf

Live JSON API

A JSON API is also available to read the data for a product. This API is in particular used in the Open Food Facts mobile app for iPhone and Android.

We change the API over-time but we are careful to keep backwards compatibility. Please tell us if you use it, so that we can tell you about potential changes.

URL to read data for a product: https://world.openfoodfacts.org/api/v0/product/[barcode].json

Example: https://world.openfoodfacts.org/api/v0/product/737628064502.json

Further documentation is available on the Wiki. (Important note: the page is divided into subpages for READ and WRITE). A better documentation is being developped, with uses cases for displaying a product, and letting your users add the data required to get the Nutri-Score, NOVA groups and additives. You can access it here.

You are very welcome to use the API for production cases, as long as 1 API call = 1 real scan by a user. Any attempt to scrape the database using the API will very likely be blocked, as full daily exports are available on this very page.

Also, sending an HTTP header with your API call is a good way we can get in touch, should any issue arise.

If you are unsure about anything, or have any question (there is no silly question), feel free to ask it on Slack :-)

Android and iPhone mobile app

The code for the Open Food Facts mobile app is available on GitHub (Android and iOS). The app allows users to scan the barcode of products, to view the product information, and to take and send pictures and data for missing products.

The app for iOS is developed in Swift.

The app for Android is developed in Java.

You are welcome to reuse the code (it's open source) and help us improve it, for everyone, on all the planet.

Wrappers and SDKs

We probably have a wrapper for your favorite programming language. If we do, you can use it and improve it. If we don't, you can help create it.

They will let you consume data, as well as let your users contribute new data

Discussing data, API and exports

You can join the Open Food Facts Slack chatroom which is the preferred way to ask questions and discuss the API.

You can also join the mailing list to discuss the API and exports, tell us about your re-uses, and be notified when improvements or changes are made to the API. Send an empty e-mail to api-subscribe@openfoodfacts.org to subscribe.

Kontakti

For any question regarding the data, you can contact us at contact@openfoodfacts.org