ShelfBase

Lookup by EAN

Fetch a single food or sports nutrition product record by its EAN (European Article Number, also known as a barcode). Returns the canonical, normalized version with nutrition data and the markets where the product is known.

GET/v1/products/:ean

Path parameters

FieldTypeDescription
eanstring8, 12, 13, or 14-digit barcode. Leading zeros preserved. We do not validate check digits — pass exactly what is printed on the package.

Query parameters

FieldTypeDescription
countrystringOptional ISO 3166-1 alpha-2 primary-market filter, for example NL, BE, DE, or GB. Returns 404 when the product primary market does not match.

Request

curl "https://shelfbase.app/api/v1/products/8718907400435?country=NL" \
  -H "Authorization: Bearer sb_live_..."

Response

Returns 200 OK with a JSON object. 404 if no product matches, if the primary market does not match, or if usable nutrition data is not yet available.

JSON preview

Endpoint: /api/v1/products/8718907400435?country=NL

{
  "ean": "8718907400435",
  "name": "Optimum Nutrition Gold Standard 100% Whey, Vanilla Ice Cream, 2.27kg",
  "brand": "Optimum Nutrition",
  "weight": "2270 g",
  "country": "NL",
  "countries": [
    "NL"
  ],
  "nutrition_basis": "PER_100G",
  "nutrition": {
    "energy_kj": 1570,
    "energy_kcal": 375,
    "fat_g": 3.8,
    "saturated_fat_g": 2,
    "unsaturated_fat_g": null,
    "carbs_g": 7.5,
    "sugar_g": 3.5,
    "fiber_g": 1,
    "protein_g": 79.2,
    "salt_g": 0.5,
    "extras": null
  },
  "nutrition_per_100": {
    "energy_kj": 1570,
    "energy_kcal": 375,
    "fat_g": 3.8,
    "saturated_fat_g": 2,
    "unsaturated_fat_g": null,
    "carbs_g": 7.5,
    "sugar_g": 3.5,
    "fiber_g": 1,
    "protein_g": 79.2,
    "salt_g": 0.5,
    "extras": null
  },
  "nutrition_per_serving": null,
  "ingredients": {
    "raw": "Whey protein concentrate, whey protein isolate, emulsifier: soy lecithin, flavouring, sweetener: sucralose.",
    "parsed": [
      "whey protein concentrate",
      "whey protein isolate",
      "soy lecithin",
      "flavouring",
      "sucralose"
    ]
  },
  "allergens": [
    "MILK",
    "SOY"
  ],
  "allergens_status": {
    "advisory_only": true,
    "notice": "Allergen data is informational only. Consumers must verify allergen information on the product packaging.",
    "last_verified_at": "2026-04-22T08:31:11Z",
    "confidence": 0.94
  },
  "is_multipack": false,
  "updated_at": "2026-05-10T03:12:44Z"
}

Sample data: Netherlands. The shape matches the public API; values are representative.

Top-level fields

FieldTypeDescription
eanstringEchoes the EAN you requested.
namestringDisplay name. Falls back to canonical name, then raw name from the source.
brandstring | nullNormalized brand name. Null for unbranded or unknown.
weightstring | nullNet weight with unit suffix (g, ml, kg, l).
countrystring | nullPrimary market for the returned match.
countriesstring[]Countries where this product is known, as ISO 3166-1 alpha-2 codes.
nutrition_basisstring | nullBasis for nutrition values, for example PER_100G, PER_100ML, or PER_SERVING.
nutritionobjectPrimary nutrition values for the stated basis.
nutrition_per_100object | nullNutrition per 100g or 100ml. Null when the source only provides reliable serving nutrition.
nutrition_per_servingobject | nullNutrition per serving when the source provides reliable serving data.
is_multipackbooleanWhether the record represents a multipack product.
ingredientsobject | nullRaw label text and a parsed structured list when available.
allergensstring[]Enum values: MILK, GLUTEN, NUTS, EGGS, SOY, FISH, SHELLFISH, SESAME, PEANUTS, CELERY, MUSTARD, LUPIN, MOLLUSCS, SULPHITES.
allergens_statusobjectProvenance metadata for allergen data — confidence, last verification timestamp, and the advisory disclaimer.
updated_atISO 8601When we last updated the canonical record.

Errors

  • 401 — missing or invalid key. See Authentication.
  • 400 — invalid country format.
  • 404 — no product matches that EAN or primary-market filter, or the product does not yet have usable nutrition data.
  • 429 — quota exceeded. See Rate limits.