I'm having trouble getting matches for barcodes. What can I do?

I'm having trouble getting matches for barcodes. What can I do?

A large majority of the barcodes in our database are either GTIN-12 (UPC-A) or GTIN-13 (EAN/UCC-13). However, there are times when all we have for a food item is the GTIN-8 (EAN/UCC-8) or UPC-E barcode.

If you are having trouble finding matches for your barcode we suggest trying the following:
     - Convert from GTIN-12 (UPC-A) to GTIN-13 (EAN/UCC-13) by adding a leading "0" to the barcode, then try again.
     - Add 5 leading zeroes to a valid GTIN-8 (EAN/UCC-8) and try again.
     - Remove all zeroes from the barcode and try again.

We also recommend that you calculate the check-digit of a barcode. Doing this is especially helpful if you are using a mobile barcode scanner. Mobile devices sometimes incorrectly scan a product's barcode. This typically happens when there isn't enough light, or if the barcode is obscured.

By calculating the check-digit of a barcode you can make sure that you are only calling our API with valid barcodes. If an incorrect/invalid barcode is sent to Chomp, it will appear that the product does not exist in the database.

Another recommendation is to build logic into your app that asks your users to scan the product one more time, or manually enter the barcode number as a backup.

Here is a simple JS script that you can use to calculate the check-digit of a barcode.

Alternatively, you can use our Food Search to look up foods that are in our database. You can use the barcodes you find here to look up foods in our barcode endpoint. It is entirely possible that we have the food you're trying to find but just have a differently formatted barcode for it, or have the same food but in a different package size.

You can also try the Name Search endpoint to perform broader searches for foods if you still can't get any barcode matches.

If those tricks don't work then the food item you are trying to find may not be in our database yet. The good news is that we keep track of barcode calls that didn't return any data. We make an effort to find these products and add them to our database.



Types of EAN/UPC barcodes

EAN-13
     - Symbol ID: JE0
     - Capacity: 13 numeric
     - Omnidirectional
     - Does not support attributes
UPC-A
     - Symbol ID: JE0
     - Capacity: 12 numeric
     - Omnidirectional
     - Does not support attributes
EAN-8
     - Symbol ID: JE4
     - Capacity: 8 numeric
     - Omnidirectional
     - Supports GTIN-8
     - Does not support attributes
UPC-E
     - Symbol ID: JE0
     - Capacity: 12 numeric, zeroes suppressed
     - Omnidirectional
     - Supports GTIN-12
     - Does not support attributes


For more information please consider reading the the article "Are UPC-A and EAN-13 (barcodes) the same?" on NationwideBarcode.com.

    • Related Articles

    • Why am I getting a 500 error?

      An API request will return a 500 error if there was an unexpected error. Please review the parameters that you are using to make your API request and try again. Refer to our API Documentation for more information or open a support ticket if you are ...
    • Why am I getting a 400 error?

      You will receive a 400 error if you make an API request with invalid parameters. A good example is if you were to fill in a parameter with a string where an integer is expected. Refer to our API Documentation for more information or open a support ...
    • Why am I getting a 404 error?

      An API request will return a 404 error if we weren't able to find the food item you requested. This typically means that your search parameters are not associated with any items in our database. Refer to our API Documentation for more information or ...
    • Why am I getting a 401 error?

      You will receive a 401 error when you have exceeded the maximum number of requests per minute as allowed by your subscription. Please consider upgrading your subscription to receive more requests per minute. Our Premium subscription does not put a ...
    • I'm having trouble signing in to the Client Center. What do I do?

      To sign in to the Client Center you must provide the email address you used when creating your subscription along with your API key, which was sent to your email inbox. Please double check to make sure you are entering this information correctly. ...