Product ingredients metadata

generic.ingredients describes a product’s ingredients or materials, organized into groups.

Ingredient groups

Each entry in generic.ingredients represents one group. Its ingredientsGroup array contains the ingredients for that group. A named group uses groupName to identify the component, such as the sauce in a meal kit. An unnamed group has groupName: null.

A group may also contain mergedIngredients, a map of language codes to strings assembled from canonical ingredient names in their original order. Names are separated by ;. Amounts are not included. A language is present only when every leaf ingredient has an ID and a canonical name in that language. If no language qualifies, mergedIngredients is omitted.

For example, an identified group may contain:

{
  "groupName": null,
  "ingredientsGroup": [
    {"id": "apples", "canonicalNames": {"de": "Äpfel", "en": "Apples"}},
    {"id": "bananas", "canonicalNames": {"de": "Bananen", "en": "Bananas"}}
  ],
  "mergedIngredients": {"de": "Äpfel; Bananen", "en": "Apples; Bananas"}
}

Ingredient fields

These fields apply to each object in ingredientsGroup and to any nested subIngredients.

Field Description
originalNames Names from the source ingredient list, keyed by language code. May be omitted for inferred ingredients.
id EAN-DB identifier for an identified ingredient.
canonicalNames Names from the ingredient dictionary, keyed by language code. An ingredient has originalNames, canonicalNames, or both.
properties Property groups mapped to arrays of string values. See Ingredient properties for the available groups and values.
amount A Measurement in percent, grams, mg, gramsPer100Grams, or gramsPer100Ml.
isVegan Whether the ingredient is suitable for vegans. Omitted when unknown.
isVegetarian Whether the ingredient is suitable for vegetarians. Omitted when unknown.
subIngredients Array of ingredient objects that make up a compound ingredient.
externalIds Identifiers from external databases. cosIng refers to CosIng and wikidata to Wikidata.

Example

This fragment shows an unnamed group with ingredient properties, an amount, and a compound ingredient that contains two sub-ingredients.

{
  "product": {
    "metadata": {
      "generic": {
        "ingredients": [
          {
            "groupName": null,
            "ingredientsGroup": [
              {
                "originalNames": { "en": "Concentrated Apple Juice" },
                "id": "apples",
                "properties": {
                  "processing": ["concentrated", "juice"]
                },
                "isVegan": true,
                "isVegetarian": true,
                "canonicalNames": {"en": "Apple Juice, Concentrate"}
              },
              {
                "originalNames": { "en": "Sugar" },
                "id": "sugar",
                "amount": {
                  "lessThan": {"value": "1", "unit": "percent"}
                },
                "canonicalNames": {"en": "Sugar"}
              },
              {
                "originalNames": {
                  "en": "Disodium Guanylate And Inosinate"
                },
                "subIngredients": [
                  {
                    "id": "e627",
                    "canonicalNames": {"en": "Disodium Guanylate (E627)"}
                  },
                  {
                    "id": "e631",
                    "canonicalNames": {"en": "Disodium Inosinate (E631)"}
                  }
                ]
              }
            ],
            "mergedIngredients": {
              "en": "Apple Juice, Concentrate; Sugar; Disodium Guanylate (E627); Disodium Inosinate (E631)"
            }
          }
        ]
      }
    }
  }
}

Multiple groups

This product lists the hair mask and the powder bleach in separate named groups.

{
  "product": {
    "metadata": {
      "generic": {
        "ingredients": [
          {
            "groupName": "Hair Mask with Intrabond Hair Repairing Complex",
            "ingredientsGroup": [
              {
                "originalNames": {"en": "Water"},
                "id": "water"
              },
              {
                "originalNames": { "en": "Behentrimonium Chloride" },
                "id": "behentrimonium-chloride"
              }
            ]
          },
          {
            "groupName": "Lightest & Brightest Powder Bleach",
            "ingredientsGroup": [
              {
                "originalNames": {"en": "Potassium Persulfate"},
                "id": "e922"
              },
              {
                "originalNames": {"en": "Sodium Silicate"},
                "id": "e550-i"
              }
            ]
          }
        ]
      }
    }
  }
}