Changes

Jump to navigation Jump to search
Line 1: Line 1:  +
[[Category:API]]
 
== Data fields in the API ==
 
== Data fields in the API ==
 
This file describes the fields from the CSV and json export of the products in the Open Food Facts database.
 
This file describes the fields from the CSV and json export of the products in the Open Food Facts database.
   −
See http://world.openfoodfacts.org/data for more information.
+
See https://world.openfoodfacts.org/data for more information.
    
The file encoding is Unicode UTF-8.  
 
The file encoding is Unicode UTF-8.  
Line 14: Line 15:  
"code":"32562641919" }</nowiki>
 
"code":"32562641919" }</nowiki>
   −
== Generalities ==
+
== Generalities ==
    
* fields that end with _t are dates in the UNIX timestamp format (number of seconds since Jan 1st 1970)
 
* fields that end with _t are dates in the UNIX timestamp format (number of seconds since Jan 1st 1970)
Line 23: Line 24:     
== List of fields ==
 
== List of fields ==
 
+
See also [[Nutrients_handling_in_Open_Food_Facts|this page]].
 
=== general information ===
 
=== general information ===
   Line 81: Line 82:  
* ingredients_that_may_be_from_palm_oil
 
* ingredients_that_may_be_from_palm_oil
 
* ingredients_that_may_be_from_palm_oil_tags
 
* ingredients_that_may_be_from_palm_oil_tags
* nutrition_grade_fr : nutrition grade ('a' to 'e'). see http://fr.openfoodfacts.org/score-nutritionnel-experimental-france
+
* nutrition_grade_fr : nutrition grade ('a' to 'e'). see https://fr.openfoodfacts.org/score-nutritionnel-experimental-france
 
* main_category
 
* main_category
 
* main_category_fr
 
* main_category_fr
Line 91: Line 92:     
The fields can have the following structure:
 
The fields can have the following structure:
 +
* key_value (string)  - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
 +
* key_unit (string) - the units used in the other fields (eg in json: "carbohydrates_unit":"g"). Possible values are "kg", "g", "mg, "µg", "l", "ml", "%" or "";
 +
key_value and key_unit are what is entered by the user, or passed to the write api, with the "key" and "key_unit" fields.
 
* key (string) - the value for the nutrition fact key (eg in json: "fiber":"0.5");
 
* key (string) - the value for the nutrition fact key (eg in json: "fiber":"0.5");
 +
Then "key" is a conversion in the default unit of the field (kJ or g)
 
* key_serving (string) -  the value of a serving for type key (eg: in json "carbohydrates_serving":"5.82"). The size of the servig is found in the serving field;
 
* key_serving (string) -  the value of a serving for type key (eg: in json "carbohydrates_serving":"5.82"). The size of the servig is found in the serving field;
* key_value (string)  - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
   
* key_100g (string) - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
 
* key_100g (string) - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
* key_unit (string) - the units used in the other fields (eg in json: "carbohydrates_unit":"g"). Possible values are "kg", "g", "mg, "µg", "l", "ml", "%" or "";
+
And "key_serving" "Key_100g" are values for the serving size or 100g. One of them is equal to "key", the other is converted.
 
* key_label (string) - a more user friendly text explaining the  
 
* key_label (string) - a more user friendly text explaining the  
  
1

edit

Navigation menu