Open Food Facts API

Packages

May 8th, 2020

open-food-facts-featured.png

Open Food Facts is a free food product database you can use to make better food choices. The database has over 1.3 million products listed at the time of writing, including food information such as ingredients, allergens, nutrition facts, and other miscellaneous information found on product labels.

The developers of Open Food Facts have an API library for Laravel, which provides a convenient wrapper to the Open Food Facts API.

A few examples of how you can use this API include a barcode lookup:

OpenFoodFacts::barcode('20203467');

And finding products that match a search term:

$collection = OpenFoodFacts::find('Coca Cola Zero');

Learn More

You can learn more about this package, get full installation instructions, and view the source code on GitHub at openfoodfacts-laravel.

Open Food Facts also has an API Wiki with more information on API usage.

The Open Food Facts organization has quite a few integrations and SDKs available on GitHub such as an iOS app, android app, and API wrappers.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.