Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lookup product category from UPC Code [closed]

Tags:

web-services

Is there a way to get a product's category from its UPC code?

For instance I want to use the upc code to determine if a food item is, frozen food, dairy bread, alcohol, etc...

Is there a web service that will do this?

like image 230
Christian Schlensker Avatar asked Oct 23 '25 14:10

Christian Schlensker


2 Answers

The Wikipedia article doesn't say anything about UPC containing any product category number. The UPC just consists of a global manufacturer number and article number.

As upcdata.info categories are user-generated, not every product is contained in a category or products are categorized differently (e.g. "oregano" could be categorized as "spice", although there is a category "italian spices").

My approach to categorizing products by EAN/UPC:

I had the same problem, but instead trying to get low-quality category data from a web service I just pulled manufacturer information from GEPIR (which is the official registrar for EAN and GLN, also works with UPC numbers).

As I noticed that big companies like Nestlé, Procter&Gamble etc. have separate number ranges for different product (sub-)categories, I just try to identify those ranges and assign the appropriate category.

On the other hand, if I know that a manufacturer only has products of one category (e.g. spices), I can assign all products of that manufacturer to the "spices" category.

Despite of this automatic approach, there's still much work to do in order to get every product categorized intelligently.

Good luck!

like image 175
Leonhardt Wille Avatar answered Oct 25 '25 13:10

Leonhardt Wille


You probably can make a quick mashup using: searchupc.com and upcdata.info and then retrieve product information from google product API.

Also, you can use AWSECommerceService API to retrieve something like this:

        ItemLookupRequest request = new ItemLookupRequest();
    request.getResponseGroup().add("Large");
    request.setIdType("UPC"); // TODO: need to change if it's EAC
    request.getItemId().add(upc);
    request.setSearchIndex("All");
like image 36
Rafael Sanches Avatar answered Oct 25 '25 12:10

Rafael Sanches



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!