Product-Ingredients Schema

Schema definition for the Product-Ingredients object in product data

Product-Ingredients Schema

This is a data schema, not an API endpoint. The Product-Ingredients object describes the shape of data returned inside product records by the Product Opener API.

{
  "type": "object",
  "title": "product_ingredients",
  "description": "Fields about ingredients of a product",
  "properties": {
    "additives_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allergens": {
      "type": "string",
      "description": "comma separated list of allergens"
    },
    "allergens_lc": {
      "type": "string",
      "description": "language in which `allergens` where input"
    },
    "allergens_hierarchy": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allergens_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients": {
      "type": "array",
      "description": "This structure gives the different ingredients and some information about them,\nlike estimate on their quantity.\n",
      "items": {
        "$ref": "#/components/schemas/Ingredient"
      }
    },
    "ingredients_analysis": {
      "type": "object",
      "properties": {
        "en:palm-oil": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "en:vegan-status-unknown": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "en:vegetarian-status-unknown": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ingredients_analysis_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients_from_or_that_may_be_from_palm_oil_n": {
      "type": "integer"
    },
    "ingredients_from_palm_oil_n": {
      "type": "integer"
    },
    "ingredients_from_palm_oil_tags": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "ingredients_hierarchy": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients_n": {
      "type": "integer"
    },
    "ingredients_n_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients_original_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients_percent_analysis": {
      "type": "integer",
      "description": "Indicates the result of ingredients analysis processing\n\n* not present -> we didn't run ingredient percent analysis (e.g. we have no ingredients)\n* 1: we estimated the ingredients percent.\n* -1 : we tried to estimate the ingredients, but the values were impossible. (e.g. if the sum of % is above 100%)\n"
    },
    "ingredients_sweeteners_n": {
      "type": "integer",
      "description": "Number of sweeteners additives in the ingredients. Undefined if ingredients are not specified.\n"
    },
    "ingredients_non_nutritive_sweeteners_n": {
      "type": "integer",
      "description": "Number of non-nutritive sweeteners additives (as specified in the Nutri-Score formula) in the ingredients. Undefined if ingredients are not specified.\n"
    },
    "ingredients_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ingredients_lc": {
      "type": "string",
      "description": "Language that was used to parse the ingredient list. If `ingredients_text` is available\nfor the product main language (`lang`), `ingredients_lc=lang`, otherwise we look at\n`ingredients_text` fields for other languages and set `ingredients_lc` to the first\nnon-empty `ingredient_text`.\n"
    },
    "ingredients_text": {
      "type": "string",
      "description": "Raw list of ingredients. This will get automatically\nparsed and get used to compute the Eco-Score or find allergens, etc..\n\nIt's a copy of ingredients_text in the main language of the product (see `lang` proprety).\n",
      "example": "Farine de blé* 67,4%, sucre de canne*, huile de tournesol oléique*, graines de chia* 5,2%, son de blé*, oranges déshydratées * 0,9%, farine de riz*, poudres à lever (acide citrique, carbonates de sodium), arôme naturel d'orange.\n"
    },
    "ingredients_text_with_allergens": {
      "type": "string",
      "description": "Same text as `ingredients_text` but where allergens have HTML elements around them to identify them\n",
      "example": "Farine de <span class=\"allergen\">blé*</span> 67,4%, sucre de canne*, huile de tournesol oléique*, graines de chia* 5,2%, <span class=\"allergen\">son de blé*</span>, oranges déshydratées * 0,9%, farine de riz*, poudres à lever (acide citrique, carbonates de sodium), arôme naturel d'orange.\n"
    },
    "ingredients_that_may_be_from_palm_oil_n": {
      "type": "integer"
    },
    "ingredients_that_may_be_from_palm_oil_tags": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "ingredients_with_specified_percent_n": {
      "type": "integer"
    },
    "ingredients_with_specified_percent_sum": {
      "type": "integer"
    },
    "ingredients_with_unspecified_percent_n": {
      "type": "integer"
    },
    "ingredients_with_unspecified_percent_sum": {
      "type": "integer"
    },
    "known_ingredients_n": {
      "type": "integer"
    },
    "origins": {
      "type": "string",
      "description": "Origins of ingredients\n"
    },
    "origins_hierarchy": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "origins_lc": {
      "type": "string"
    },
    "origins_tags": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "traces": {
      "type": "string",
      "description": "List of substances that might cause allergies\nthat are present in trace amounts in the product\n(this does not include the ingredients, as they\nare not only present in trace amounts).\nIt is taxonomized with the allergens taxonomy. Refer to the [allergens taxonomy](https://static.openfoodfacts.org/data/taxonomies/allergens.json)\n"
    },
    "traces_hierarchy": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object"
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "traces_lc": {
      "type": "string"
    },
    "traces_tags": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object"
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "unknown_ingredients_n": {
      "type": "integer"
    }
  },
  "patternProperties": {
    "ingredients_text_(?<language_code>\\w\\w)": {
      "type": "string",
      "description": "Raw list of ingredients in language given by 'language_code'.\n\nSee `ingredients_text`\n"
    },
    "ingredients_text_with_allergens_(?<language_code>\\w\\w)": {
      "description": "Like `ingredients_text_with_allergens` for a particular language\n",
      "type": "string"
    }
  }
}