Skip to content
Python package for Open Food Facts
Branch: master
Clone or download
Latest commit 90cc8c1 Nov 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add pull request template for Github Mar 29, 2018
docs Open pet food facts code May 13, 2018
.gitignore Add gitignore file Sep 14, 2016
LICENSE Add packaging files (requirements, readme, ...) Sep 14, 2016 Update Nov 5, 2019 Update May 21, 2016
requirements.txt Update requirements.txt Nov 24, 2018
requirements_test.txt Add packaging files (requirements, readme, ...) Sep 14, 2016 Fix wrong naming and url in and README Sep 15, 2016

Open Food Facts client for your Python applications and scripts

Open Food Facts

What is Open Food Facts?

A food products database

Open Food Facts is a database of food products with ingredients, allergens, nutrition facts and all the tidbits of information we can find on product labels.

Made by everyone

Open Food Facts is a non-profit association of volunteers. 1800+ contributors like you have added 700 000+ products from 150 countries using our Android, iPhone or Windows Phone app or their camera to scan barcodes and upload pictures of products and their labels.

For everyone

Data about food is of public interest and has to be open. The complete database is published as open data and can be reused by anyone and for any use. Check-out the cool reuses or make your own!


Project Status Average time to resolve an issue Percentage of issues still open


Any help is welcome, as long as you don't break the continuous integration. Fork the repository and open a Pull Request directly on the master branch. A maintainer will review and integrate your changes.



Copyright and License

Copyright 2016-2019 Open Food Facts


sudo pip install git+


git clone
cd openfoodfacts-python
sudo python install


Example Usage

Query a Facet

brands = openfoodfacts.facets.get_brands()

Basic Search

search_result =

Add a new product.

status_code = openfoodfacts.products.add_new_product({
  'code': barcode,
  'user_id'  : myUsername,
  'password'  : myPassword,
  'product_name' : myProduct,
  'stores'  : store,
  'brands': brand,
  'packaging': packaging

To see all possible capabilities, check out the usage guide.

You can’t perform that action at this time.