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
| Field | Type | Required | What it is |
|---|---|---|---|
barcode | string | Yes | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
brand | string | Always (present in every successful answer) |
found | boolean | Always (present in every successful answer) |
barcode | string | Always (present in every successful answer) |
nutrition | object | Always (present in every successful answer) |
product_name | string | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"slug": "barcode-lookup",
"inputs": {
"barcode": "3017620422003"
},
"max_price_cents": 5
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "barcode-lookup",
inputs: {
"barcode": "3017620422003"
},
max_price_cents: 5,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="barcode-lookup",
inputs={
"barcode": "3017620422003",
},
max_price_cents=5,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/barcode-lookup?barcode=3017620422003' 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.
Related tools
- Address Geocoding €0.02
- Container Tracking €0.05
- Country Lookup €0.02
- Country Tax Rates €0.02
- Country Trade Data €0.20
- Customs Duty Lookup €0.20