Barcode Lookup

Look up a product by UPC or EAN barcode. Returns the product name, brand and available nutrition details and images.

Pay by wallet (x402) barcode-lookup

Example

Input
{
  "barcode": "3017620422003"
}
Answer
{
  "brand": "nutella",
  "found": true,
  "source": "open_food_facts",
  "barcode": "3017620422003",
  "quantity": "400 g",
  "allergens": "en:milk,en:nuts,en:soybeans",
  "countries": "Belgium, France, Germany, India, Italy, Luxembourg, Morocco, Netherlands, Philippines, Poland, Romania, Spain, Switzerland, Turkey, United Kingdom, en:united-states",
  "image_url": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.820.400.jpg",
  "nutrition": {
    "fat_g": 30.9,
    "salt_g": 0.107,
    "carbs_g": 57.5,
    "sugar_g": 56.3,
    "protein_g": 6.3,
    "energy_kcal": 3860
  },
  "categories": "Other",
  "nova_group": 4,
  "ingredients": "Sucre, huile de palme, NOISETTES 13%, cacao maigre 7,4%, LAIT écrémé en poudre 6,6%, LACTOSERUM en poudre, émulsifiants: lécithines [SOJA), vanilline. Sans gluten.",
  "product_name": "Nutella",
  "ecoscore_grade": "unknown",
  "nutriscore_grade": "e"
}

Inputs

FieldTypeRequiredWhat it is
barcodestringYes—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
brandstringAlways (present in every successful answer)
foundbooleanAlways (present in every successful answer)
barcodestringAlways (present in every successful answer)
nutritionobjectAlways (present in every successful answer)
product_namestringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "barcode-lookup",
    "inputs": {
      "barcode": "3017620422003"
    },
    "max_price_cents": 5
  }'

Limitations

  • Coverage is strongest for food and drink

    Product database via Open Food Facts — coverage strongest for food/beverage products, weaker for electronics and general merchandise

    What to do instead: Check the barcode with the manufacturer or retailer if no product is found.