Product by barcode (GTIN / EAN / UPC)

GET https://api.api.sh/barcode/v1/lookup
1 credit / call public data try it in the playground →

A product by its barcode: EAN-13, EAN-8, UPC-A, UPC-E or GTIN-14 (the check digit is verified; UPC-E is expanded). Looked up in the open product databases (food, cosmetics, pet food and other products; open data under the ODbL, source and license say where a record comes from). Returns name, generic name, brands, quantity and net quantity, serving size, categories, labels, origins, manufacturing places, countries and stores, packaging, packager codes, ingredients, allergens, traces, additives, vegan / vegetarian / palm-oil-free flags, nutrition facts per 100 g and per serving (energy, fat, saturated fat, carbohydrates, sugars, fiber, protein, salt, sodium and, when the label lists them, vitamins A, B1-B12, C, D, E and K, minerals such as calcium, iron, magnesium, zinc, phosphorus, potassium, copper, selenium and iodine, mono- and polyunsaturated fat, omega-3 and omega-6, starch, polyols, lactose, caffeine and taurine, all in grams), ingredients_detail (the parsed ingredient list: id, text, stated and estimated percent, vegan / vegetarian / palm-oil flags, E-number and additive class, origins and sub-ingredients), Nutri-Score, NOVA group, Eco-Score, food groups, product images (front, ingredients, nutrition, packaging), languages, completeness, scan count and created / updated dates. raw=true adds the full record. Answers 404 when no database knows the barcode.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
gtinrequired string Barcode digits (8, 12, 13 or 14). Example: 3017624010701
source all | food | beauty | petfood | products Which database to ask. Default: all
raw boolean Also return the full record. Default: false

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/barcode/v1/lookup?gtin=3017624010701" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.