UPCitemdb API: Get product by barcode
Identifies a product by its 12- or 13-digit barcode and returns its details, recorded price range and store offers from UPCitemdb.
Unofficial. Not affiliated with or endorsed by UPCitemdb.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Barcode, required
barcode The 12- or 13-digit number printed under the barcode, with optional spaces or dashes; for example 012000161155.
012000161155
Input as JSON
{ "barcode": "012000161155"}Output
{ "ean": "0012000161155", "upc": "012000161155", "size": null, "brand": "LIFEWTR", "model": "012000161155", "colour": "Clear", "offers": [ { "price_usd": 3.59, "offer_link": "https://www.upcitemdb.com/norob.php?id=x2x253t213537454t2&tid=1&seq=1792748049&plt=4ef5f0f7c66d297903ab587779e8aeb9" , "store_name": "Walgreens", "last_updated_date": "2026-10-18" }, { "price_usd": 1.48, "offer_link": "https://www.upcitemdb.com/norob.php?id=v2r253t2x213b444u2&tid=1&seq=1792748049&plt=ad8b18f1424e2e71aa72834a8eb4c73c" , "store_name": "Frys Electronics", "last_updated_date": "2018-06-21" }, { "price_usd": 1.49, "offer_link": "https://www.upcitemdb.com/norob.php?id=x2s263w2y2339464q2&tid=1&seq=1792748049&plt=09846e02f6386b57fbef0eaa5d247948" , "store_name": "Target", "last_updated_date": "2020-09-21" } ], "weight": "1.00lb", "category": "Food, Beverages & Tobacco > Beverages > Water", "page_link": "https://www.upcitemdb.com/upc/012000161155" , "description": "LIFEWTR Premium Purified Bottled Water pH Balanced with Electrolytes For Taste", "image_links": [ "https://i5.walmartimages.com/asr/b29c7d39-72ae-464d-8bb3-1a89fbda40d6.102cd8b37ec485c62739a1f933389b1b.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff" , "https://target.scene7.com/is/image/Target/GUEST_46ff2a61-1d87-4887-8a8c-d284dc77bdb1?wid=1000&hei=1000" , "https://pics.walgreens.com/prodimg/595160/450.jpg" ], "product_name": "LIFEWTR Premium Purified Bottled Water pH Balanced with Electrolytes For Taste", "lowest_price_usd": 1.48, "highest_price_usd": 96}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"upcitemdb.com/get_product_by_barcode","input":{"barcode":"012000161155"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "upcitemdb.com/get_product_by_barcode" , "input": { "barcode": "012000161155" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "upcitemdb.com/get_product_by_barcode" , "input": { "barcode": "012000161155" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run upcitemdb.com/get_product_by_barcode# with {"barcode":"012000161155"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "barcode" ], "properties": { "barcode": { "type": "string", "description": "The 12- or 13-digit number printed under the barcode, with optional spaces or dashes; for example 012000161155." } }}Output schema
{ "type": "object", "required": [ "product_name", "brand", "model", "description", "category", "upc", "ean", "colour", "size", "weight", "image_links", "lowest_price_usd", "highest_price_usd", "offers", "page_link" ], "properties": { "ean": { "type": [ "string", "null" ] }, "upc": { "type": [ "string", "null" ] }, "size": { "type": [ "string", "null" ] }, "brand": { "type": [ "string", "null" ] }, "model": { "type": [ "string", "null" ] }, "colour": { "type": [ "string", "null" ] }, "offers": { "type": "array", "items": { "type": "object", "required": [ "store_name", "price_usd", "last_updated_date", "offer_link" ], "properties": { "price_usd": { "type": [ "number", "null" ] }, "offer_link": { "type": [ "string", "null" ] }, "store_name": { "type": "string" }, "last_updated_date": { "type": [ "string", "null" ], "format": "date" } }, "additionalProperties": false } }, "weight": { "type": [ "string", "null" ] }, "category": { "type": [ "string", "null" ] }, "page_link": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "image_links": { "type": "array", "items": { "type": "string" } }, "product_name": { "type": [ "string", "null" ] }, "lowest_price_usd": { "type": [ "number", "null" ] }, "highest_price_usd": { "type": [ "number", "null" ] } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
upcitemdb.com/get_product_by_barcode- Returns
- product name, brand, model, UPC/EAN, category, images, lowest and highest price, store offers
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method upcitemdb.com/get_product_by_barcode with the inputs above.
Ask your agent
- What product is barcode 012000161155 and what's its typical price range?
- Look up the item with UPC 036000291452 and show me the store offers.
- Can you identify the product behind the EAN 5012345678900 and tell me its brand and category?
- I found a 13-digit code 4006381333931 on a box; what is this product and where can I buy it cheapest?
- Check upcitemdb for barcode 0 49000 00276 4 and give me the product images and lowest and highest recorded prices.
See more
Looks up a packaged food by barcode or by product name and brand, returning ingredients, allergens, Nutri-Score, NOVA processing level and nutrition from Open Food Facts.
openfoodfacts.org/get_productLooks up one Ulta Beauty product by name or product link and returns its details, prices, sizes or shades, ingredients, directions, ratings and images. Prices and availability may change.
ulta.com/get_productGets details, price and availability for a Walmart product by name or product link, using Walmart's default location.
walmart.com/get_productGets a B&H Photo product's details by name, product link, or B&H number. A name uses the best matching search result; details and prices reflect the public page.
bhphotovideo.com/get_productSearches IKEA products in a chosen country and returns current prices, details, photos and reviews in IKEA's result order.
ikea.com/search_productsGets a Zara item's price, colours, sizes with availability, materials and images by item name or Zara item link in a chosen country. A name returns the closest match from Zara's search.
zara.com/get_productFinds a Lowe's product by name, item number or product link and returns its details, price, specifications, images and availability at the nearest store for a ZIP code (or the site's default store).
lowes.com/get_productSearches a named Instacart store's guest-visible grocery products for a US ZIP code. Prices are in USD and can differ from in-store prices; stock estimates can change.
instacart.com/search_products