Free barcode lookup APIs, and which products they know

For food and drink, Open Food Facts is free and needs no key: world.openfoodfacts.org/api/v2/product/{barcode}.json returns name, brand, ingredients, allergens and nutrition, limited to 15 product reads a minute per IP. For general products, UPCitemdb's trial endpoint allows 100 requests a day without a key, and paid plans start at $99 a month. Our Barcode Product API reads Open Food Facts, checks the barcode first and charges $0.002 only when the product is found.

Try it free Barcode Product API — food name, ingredients, Nutri-Score, $0.002 · $0.002 / call

Which database knows your product

Limits are from the Open Food Facts API docs and UPCitemdb's developer page in December 2026. No free database knows every product; a barcode on a phone case and a barcode on a yoghurt live in different places.

SourceCoversFree use
Open Food FactsFood and drink, volunteer-entered, worldwideFree, no key; 15 product reads a minute per IP
UPCitemdbGeneral retail productsTrial: 100 requests a day, no key
Commercial barcode databasesBroad retail coveragePaid plans
Barcode Product (iamai.markets)Open Food Facts data5 tries a day on the listing page, then $0.002

Open Food Facts in Python

Open Food Facts asks every app to send a custom User-Agent with its name and a contact address. The data is under the ODbL and images under CC BY-SA, so credit Open Food Facts.

import requests

code = "3017624010701"
r = requests.get(f"https://world.openfoodfacts.org/api/v2/product/{code}.json",
                 params={"fields": "product_name,brands,allergens_tags,nutriscore_grade,nutriments"},
                 headers={"User-Agent": "MyPantryApp/1.0 (you@example.com)"}, timeout=10)
d = r.json()
if d.get("status") == 1:
    p = d["product"]
    print(p.get("product_name"), p.get("brands"), p.get("nutriscore_grade"))
else:
    print("not in Open Food Facts")

Validate the barcode first

EAN-8, UPC-A (12 digits), EAN-13 and GTIN-14 all end in a check digit: from the right, ignoring the check digit, multiply alternately by 3 and 1, add up, and the check digit makes the total a multiple of 10. A scan error or typo fails this test, and you avoid a pointless lookup.

The pay-per-call version

Our API validates the check digit, looks the code up in Open Food Facts and returns name, brand, quantity, categories, labels, ingredients, allergens, Nutri-Score, NOVA group, nutrition per 100 g (energy, fat, saturated fat, carbohydrates, sugars, fibre, protein, salt), countries, image and page link. An invalid or unknown barcode is refused and not charged, which matters when a third of your scans are non-food items.

curl -i -X POST https://iamai.markets/api/x402/services/yo2Qn6jbqWoG \
  -H "Content-Type: application/json" \
  -d '{"barcode": "3017624010701"}'

# $0.002 per found product via x402 (USDC on Base)

The product

Questions

Is there a free UPC lookup API without a key?

Yes: UPCitemdb's trial endpoint allows 100 requests a day, and Open Food Facts needs no key for food.

Why isn't my product found?

The databases are incomplete, especially for small brands, regional products and anything that isn't food in Open Food Facts.

Can I trust allergen data from Open Food Facts?

It's typed in by volunteers from packaging. Use it as a guide and tell users to check the label.

Related

Updated 2026-12-02