Product-Misc Schema
Schema definition for the Product-Misc object in product data
Product-Misc Schema
This is a data schema, not an API endpoint. The Product-Misc object describes the shape of
data returned inside product records by the Product Opener API.
{
"type": "object",
"title": "product_misc",
"description": "Miscellaneous but important fields of a product\n",
"properties": {
"additives_n": {
"type": "integer",
"description": "Number of food additives.\n"
},
"checked": {
"type": "string"
},
"complete": {
"type": "integer"
},
"completeness": {
"type": "number"
},
"ecoscore_grade": {
"type": "string",
"description": "See also: `ecoscore_tags`\n"
},
"ecoscore_score": {
"type": "integer",
"description": "See also: `ecoscore_tags`\n"
},
"food_groups": {
"type": "string"
},
"food_groups_tags": {
"type": "array",
"items": {
"type": "string"
}
},
"nutrient_levels": {
"description": "Traffic light indicators on main nutrients levels\n",
"type": "object",
"properties": {
"fat": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
},
"salt": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
},
"saturated-fat": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
},
"sugars": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
}
}
},
"packaging_text": {
"type": "string",
"description": "Recycling instructions as raw text, e.g. Plastic\nbottle to recycle, Plastic cap to recycle.\nThis will get automatically parsed and\nwill be used to compute the Eco-Score.\nYou can either request it (if it exists) or\nsend it in a specific language.\n",
"example": "packaging_text_en"
},
"packagings": {
"type": "array",
"title": "Packagings (READ)",
"description": "The packagings object is an array of individual packaging component objects.\n\nThe Packaging data document explains how packaging data is structured in Open Food Facts: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-packaging-data/\n\nThe shape, material and recycling properties of each packaging component are linked to entries in the packaging_shapes, packaging_materials and packaging_recycling taxonomies:\n\nhttps://world.openfoodfacts.org/data/taxonomies/packaging_shapes.json\nhttps://world.openfoodfacts.org/data/taxonomies/packaging_materials.json\nhttps://world.openfoodfacts.org/data/taxonomies/packaging_recycling.json\n\nIf the tags_lc field is set, the properties will include a lc_name field with the translation in the requested language.",
"examples": [
[
{
"number_of_units": 6,
"shape": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"material": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"recycling": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"quantity_per_unit": "25 cl",
"quantity_per_unit_value": 25,
"quantity_per_unit_unit": "cl",
"weight_specified": 30,
"weight_measured": 32,
"weight_estimated": 26,
"weight": 30,
"weight_source_id": "specified"
}
]
],
"items": {
"description": "Each packaging component has different properties to specify how many there are, its shape, material etc.\n\nThe shape, material and recycling properties are mapped to one entry in the packaging_shapes, packaging_materials and packaging_recycling taxonomies, and the value of the property is the canonical name of the taxonomy entry (e.g. en:bottle).\n\nThey may contain values that could not yet get matched to their respective taxonomy, in which case they will contain a free text value prefixed with the language code of this text value (e.g. \"fr:Bouteille sphérique\" might have been entered by a French user to indicate it is a spherical bottle).",
"title": "Packaging component (READ)",
"type": "object",
"examples": [
{
"number_of_units": 6,
"shape": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"material": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"recycling": {
"id": "en:bottle",
"lc_name": "bouteille"
},
"quantity_per_unit": "25 cl",
"quantity_per_unit_value": 25,
"quantity_per_unit_unit": "cl",
"weight_specified": 30,
"weight_measured": 32,
"weight_estimated": 26,
"weight": 30,
"weight_source_id": "specified"
}
],
"properties": {
"number_of_units": {
"type": "integer",
"description": "umber of units of this packaging component contained in the product (e.g. 6 for a pack of 6 bottles)"
},
"shape": {
"title": "Packaging component shape",
"x-stoplight": {
"id": "xrj8agza3dwgf"
},
"type": "object",
"description": "The shape property is canonicalized using the packaging_shapes taxonomy. Taxonomized values are available using the partial taxonomy API, the autosuggest API or the full packaging_shapes taxonomy JSON export.",
"examples": [
{
"id": "en:bottle",
"lc_name": "bouteille"
}
],
"properties": {
"id": {
"type": "string",
"description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
},
"lc_name": {
"type": "string",
"description": "Name of the entry in the language requested in the tags_lc field of the request. This field is returned only of tags_lc is specified. If the translation is not available, or if the entry does not exist in the taxonomy, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
}
}
},
"material": {
"title": "Packaging component material",
"type": "object",
"description": "The material property is canonicalized using the packaging_materials taxonomy. Taxonomized values are available using the partial taxonomy API, the autosuggest API or the full packaging_material taxonomy JSON export.",
"examples": [
{
"id": "en:bottle",
"lc_name": "bouteille"
}
],
"properties": {
"id": {
"type": "string",
"description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
},
"lc_name": {
"type": "string",
"description": "Name of the entry in the language requested in the tags_lc field of the request. This field is returned only of tags_lc is specified. If the translation is not available, or if the entry does not exist in the taxonomy, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
}
}
},
"recycling": {
"title": "Packaging component recycling instruction",
"x-stoplight": {
"id": "376tk8e2cmyh2"
},
"type": "object",
"description": "The recycling property is canonicalized using the packaging_recycling taxonomy. Taxonomized values are available using the partial taxonomy API, the autosuggest API or the full packaging_recycling taxonomy JSON export.",
"examples": [
{
"id": "en:bottle",
"lc_name": "bouteille"
}
],
"properties": {
"id": {
"type": "string",
"description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
},
"lc_name": {
"type": "string",
"description": "Name of the entry in the language requested in the tags_lc field of the request. This field is returned only of tags_lc is specified. If the translation is not available, or if the entry does not exist in the taxonomy, the value will be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
}
}
},
"quantity_per_unit": {
"type": "string",
"description": "Quantity (weight or volume) of food product contained in the packaging component. (e.g. 75cl for a wine bottle)"
},
"quantity_per_unit_value": {
"type": "number",
"description": "Value parsed from the quantity field."
},
"quantity_per_unit_unit": {
"type": "string",
"description": "Unit parsed and normalized from the quantity field."
},
"weight_specified": {
"type": "number",
"description": "Weight (as specified by the manufacturer) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component)."
},
"weight_measured": {
"type": "number",
"description": "Weight (as measured by one or more users) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component)."
},
"weight_estimated": {
"type": "number",
"description": "Weight (as estimated from similar products) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component)."
},
"weight": {
"type": "number",
"description": "Weight of one unit of the empty packaging component."
},
"weight_source_id": {
"type": "string",
"description": "Indicates which field was used to populate the \"weight\" field. Either \"specified\", \"measured\", or \"estimated\""
}
}
},
"readOnly": true
},
"packagings_complete": {
"title": "packagings_complete",
"type": "integer",
"minimum": 0,
"maximum": 1,
"description": "Indicate if the packagings array contains all the packaging parts of the product. This field can be set by users when they enter or verify packaging data. Possible values are 0 or 1."
},
"pnns_groups_1": {
"description": "Category of food according to [French Nutrition and Health Program](https://fr.wikipedia.org/wiki/Programme_national_nutrition_sant%C3%A9)\n",
"type": "string"
},
"pnns_groups_1_tags": {
"type": "array",
"items": {
"type": "string"
}
},
"pnns_groups_2": {
"description": "Sub Category of food according to [French Nutrition and Health Program](https://fr.wikipedia.org/wiki/Programme_national_nutrition_sant%C3%A9)\n",
"type": "string"
},
"pnns_groups_2_tags": {
"type": "array",
"items": {
"type": "string"
}
},
"popularity_key": {
"description": "An imprecise measurement of popularity based on Scan statistics. A higher value means higher popularity.\n",
"type": "integer"
},
"popularity_tags": {
"description": "Indicators for the popularity of a product, like the amount of scans in a specific year.\n`popularity_tags` values from previous years are kept, if there is no popularity_tags at all, then it was never popular.\nThis field must be used with care. In countries where Open Food Facts is not widely used, \na product may obtain the value \"top-90-percent-scans-2021\" with a single scan.\n",
"type": "array",
"items": {
"type": "string"
},
"example": [
"bottom-25-percent-scans-2020",
"top-85-percent-scans-2021",
"top-90-percent-scans-2022",
"top-country-it-scans-2019",
"top-100000-mg-scans-2024"
]
},
"scans_n": {
"type": "integer",
"description": "Number of scans performed with the official Open Food Facts mobile application, the last year \nfor which the product was scanned (current year excluded). This value is computed once a year by scanbot.pl.\nIt is possible that a product has never been scanned at all: `scans_n` is not given in this case.\nSee also `unique_scans_n` field.\n"
},
"unique_scans_n": {
"type": "integer",
"description": "Number of unique scans performed with the official Open Food Facts mobile application, the last year \nfor which the product was scanned (current year excluded).\nUnique scans means it is based on different IPs.\nThis value is computed once a year by scanbot.pl.\nSee also `scans_n` field.\n"
},
"serving_quantity": {
"type": "string",
"description": "Normalized version of serving_size.\nNote that this is NOT the number of servings by product.\n<small>(in perl, see `normalize_serving_size`)</small>\n"
},
"serving_quantity_unit": {
"type": "string",
"description": "The unit (either g or ml) for the correponding serving_quantity.\n",
"example": "g"
},
"serving_size": {
"type": "string",
"description": "Serving size text (generally in g or ml).\nWe expect a quantity + unit but the user is free to input any string.\n"
}
},
"patternProperties": {
"food_groups_(?<language_code>\\w\\w)": {
"type": "string",
"description": "see `food_groups`"
},
"packaging_text_(?<language_code>\\w\\w)": {
"type": "string",
"description": "Packaging text in language designated by `language_code`\n"
}
}
}