Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get food product data from barcode

Tags:

iphone

I am able to read the barocode but i am confused about how to get the food product value from the barcode value . Do we need to call a webservice or create a database locally ... help me out thanks in advance

like image 734
mrugen munshi Avatar asked Jun 25 '10 11:06

mrugen munshi


5 Answers

In case anyone else is looking for this info in 2021, you can get this data directly from the USDA's Food Data Central API, which is public domain. One of their endpoints has a query param, which supports keywords and, as a little tinkering revealed, UPCs! For instance, here's a query for a snack I had laying around:

https://api.nal.usda.gov/fdc/v1/foods/search?query=850126007120&pageSize=10&api_key=DEMO_KEY

API keys can be had with an email address. Hope this is useful to someone!

like image 171
JohnnyHammersticks Avatar answered Oct 10 '22 04:10

JohnnyHammersticks


I know this was asked a long time ago but I figured I would give an update for anyone looking now... We use an API called upcFood (www.upcfood.com) They offer a simple API that allows lookup of food products directly from the barcode. upcFood includes nutrition data, Products Data, allergy data, ingredients etc. from a single search.

like image 30
David Vaccaro Avatar answered Oct 10 '22 06:10

David Vaccaro


Have a look at OpenFoodFacts. It's a database that does just that, with ingredients, calories, etc. It's based on the barcode.

like image 27
PierreS Avatar answered Oct 10 '22 06:10

PierreS


Product bar-codes contain almost no product related information - they are mere unique identifiers. The system used in Europe - EAN13 - consists of a country code, a manufacturer code, a product code, and a check digit. To translate any of this data into usable information you need a database or web-service.

like image 41
Daniel Brückner Avatar answered Oct 10 '22 04:10

Daniel Brückner


Free database here:

http://www.upcdatabase.com

and here:

http://www.yoopsie.com/

Otherwise just Google for "upc database" and you'll find people offering to sell you one.

I doubt that the databases will include prices since those are for the individual retailers to set.

like image 24
Willis Blackburn Avatar answered Oct 10 '22 04:10

Willis Blackburn