0% found this document useful (0 votes)
230 views12 pages

API Field Descriptions Dec2019 PDF

FoodData Central provides downloadable data and an API with field descriptions: - The documentation describes files, fields, abbreviations, naming conventions, and sample queries. Fields include IDs, dates, food names, categories, and nutrient amounts. - Foods come from various sources like direct agricultural acquisition or branded food labels. Acquisitions can be combined into samples. - Nutrients are calculated using food-specific conversion factors for protein, fat, and carbohydrates. - Categories group similar foods and attributes provide additional information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views12 pages

API Field Descriptions Dec2019 PDF

FoodData Central provides downloadable data and an API with field descriptions: - The documentation describes files, fields, abbreviations, naming conventions, and sample queries. Fields include IDs, dates, food names, categories, and nutrient amounts. - Foods come from various sources like direct agricultural acquisition or branded food labels. Acquisitions can be combined into samples. - Nutrients are calculated using food-specific conversion factors for protein, fat, and carbohydrates. - Categories group similar foods and attributes provide additional information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

FoodData Central Download & API Field Descriptions

Download & API Field Descriptions Download & API Field Descriptions (contains 1 line for each file and field)
Abbreviations List of abbreviations used in the Field Descriptions tab (for example in the synonyms column)
Conventions Naming conventions used for naming files and fields (and their rationale)
MS Access queries List of sample MS Access queries provided in downloadable MS Access database
FNDDS crosswalk Documentation on what FDC fields the FNDDS data were imported into
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
GLOBAL column definitions These fields appear in multiple files, and their definition is typically the same 
unless noted below
fdc_id Unique permanent identifier of a food in the food table
id Unique permanent identifier of other kinds of data (e.g. nutrients, lab methods, 
etc.) in their related table

agricultural_acquisition Non‐processed foods obtained directly from the location where they are  food (is a type of food)


produced
fdc_id ID of the food in the food table FDC Source ID
acquisition_date The date this food was obtained
market_class The name of the specific kind of this food (eg. "Pinto" for pinto beans)
treatment Any special condition relevant to the production of this food ‐ typically "drought" 
or "control"
state The state in which this food was produced

acquisition_sample Acquisitions may be blended with other acquisitions to create a sample food,  N/A Download only


and an acquisition can be used to created more than one sample food. This file 
stores which acquisitions and sample foods are related to each other.

fdc_id_of_sample_food ID of the sample food that uses the acquisitioned food
fdc_id_of_acquisition_food ID of the acquisitioned food used in the sample food

branded_food Foods whose nutrient values are typically obtained from food label data  food (is a type of food)


provided by food brand owners.
fdc_id ID of the food in the food table
brand_owner Brand owner for the food
gtin_upc GTIN or UPC code identifying the food GTIN/UPC gtinUpc
ingredients The list of ingredients (as it appears on the product label)
serving_size The amount of the serving size when expressed as gram or ml
serving_size_unit The unit used to express the serving size (gram or ml)
household_serving_fulltext amount and unit of serving size when expressed in household units
branded_food_category The category of the branded food, assigned by GDSN or Label Insight
data_source The source of the data for this food. GDSN (for GS1) or LI (for Label Insight).
modified_date This date reflects when the product data was last modified by the data provider, 
i.e., the manufacturer
available_date This is the date when the product record was available for inclusion in the 
database.

Download & API Field Descriptions, Page 1 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
food Any substance consumed by humans for nutrition, taste and/or aroma
fdc_id Unique permanent identifier of the food FDC Source ID (used for 
foodClass For internal use only
data_type         Type of food data (see Files tab for possible values).
description Description of the food
food_category_id Id of the food category the food belongs to foodGroup
publication_date Date when the food was published to FoodData Central Published, Published Date, FDC 
Published
scientific_name The scientific name for the food
food_key A string of characters used to identify both the current and all historical records 
for a specific food.

food_attribute The value for a generic property of a food More Information (tab),  food‐>foodAttributes


id
fdc_id ID of the food this food attribute pertains to N/A
seq_num The order the attribute will be displayed on the released food. sequenceNumber
food_attribute_type_id ID of the type of food attribute to which this value is associated for a specific food foodAttributeType

name Name of food attribute Changes (on Update Log)


value The actual value of the attribute

food_attribute_type The list of supported attributes associated with a food food‐>foodAttributes‐


id
name Name of the attribute associated with the food ‐ should be displayable to users
description Description of the attribute

food_calorie_conversion_factor The multiplication factors to be used when calculating energy from  food‐>nutrientConversionFactors


macronutrients for a specific food
food_nutrient_conversion_factor_id ID of the related row in the nutrient_conversion_factor table id
protein_value The multiplication factor for protein
fat_value The multiplication factor for fat
carbohydrate_value The multiplication factor for carbohydrates

food_category Foods of defined similarity  food‐>foodCategory


id
code Food group code
description Description of the food group

food_component A constituent part of a food (e.g. bone is a component of meat) food‐>foodComponents


id
fdc_id ID of the food this food component pertains to N/A
name The kind  of component, e.g. bone
pct_weight The weight of the component as a percentage of the total weight of the food  Weight (%) percentWeight
is_refuse Whether the component is refuse, i.e. not edible Refuse
gram_weight The weight of the component in grams Weight (g)
data_points The number of observations on which the measure is based n
min_year_acquired Minimum purchase year of all acquisitions used to derive the component value Year Acquired

Download & API Field Descriptions, Page 2 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
food_fat_conversion_factor Factor to calculate total lipid fat (204) food‐>nutrientConversionFactors
food_nutrient_conversion_factor_id Id of the related row in the nutrient_conversion_factor table id
fat_nlea_value The multiplication factor to convert from fat NLEA (298) to total fat (204)

food_nutrient A nutrient value for a food food‐>foodNutrients


id
fdc_id ID of the food this food nutrient pertains to N/A
nutrient_id ID of the nutrient to which the food nutrient pertains nutrient
amount Amount of the nutrient per 100g of food. Specified in unit defined in the nutrient  Average Amount
table.
data_points Number of observations on which the value is based n
derivation_id ID of the food nutrient derivation technique used to derive the value foodNutrientDerivation
standard_error Standard error
min The minimum amount
max The maximum amount
median The median amount
footnote Comments on any unusual aspects of the food nutrient. Examples might include 
why a nutrient value is different than typically expected.
min_year_acquired Minimum purchase year of all acquisitions used to derive the nutrient value Year Acquired, Initial Year 
Acquired
nutrient_analysis_details Details of the analysis of the nutrient (API only) food‐>foodNutrients‐
>nutrientAnalysisDetails

food_nutrient_conversion_factor Top level type for all types of nutrient conversion factors. A separate row is  N/A ‐ abstract class


stored for each of these 3 types of conversion factor.
id
fdc_id ID of the food that this food nutrient conversion factor pertains to N/A

food_nutrient_derivation Procedure indicating how a food nutrient value was obtained food‐>foodNutrients‐


id
code Code used for the derivation (e.g. A means analytical)
description Description of the derivation Deriv. By
source_id ID of the nutrient source associated with the derivation foodNutrientSource

food_nutrient_source An information source from which we can obtain food nutrient values food‐>foodNutrients‐


>foodNutrientDerviation‐
id
code Code used for the source (e.g. 4 means calculated or imputed)
description Description of the source

Download & API Field Descriptions, Page 3 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
food_portion Discrete amount of food Measures (for foundation or  food‐>foodPortions
legacy foods), Portions (for 
id 
fdc_id ID of the food this food portion pertains to N/A
seq_num The order the measure will be displayed on the released food. sequenceNumber
amount The number of measure units that comprise the measure (e.g. if measure is 3 tsp, 
the amount is 3). Not defined for survey (FNDDS) foods (amount is instead 
embedded in portion description).
measure_unit_id The unit used for the measure (e.g. if measure is 3 tsp, the unit is tsp). For food  Unit measureUnit
types that do not use measure SR legacy foods and survey (FNDDS) foods), a value 
of '9999' is assigned to this field.
portion_description Foundation foods: Comments that provide more specificity on the measure. For  Measure Description
example, for a pizza measure the dissemination text might be 1 slice is 1/8th of a 
14 inch pizza"."   Survey (FNDDS) foods: The household description of the portion.  

modifier Foundation foods: Qualifier of the measure (e.g. related to food shape or form)  
(e.g. melted, crushed, diced). Survey (FNDDS) foods: The portion code. SR legacy 
foods: description of measures, including the unit of measure and the measure 
modifier (e.g. waffle round (4" dia)). 
gram_weight The weight of the measure in grams Weight (g)
data_points The number of observations on which the measure is based n
footnote Comments on any unusual aspects of the measure. These are released to the 
public. Examples might include caveats on the usage of a measure, or reasons why 
a measure gram weight is an unexpected value.
min_year_acquired Minimum purchase year of all acquisitions used to derive the measure value Year Acquired

food_protein_conversion_factor food‐>nutrientConversionFactors
food_nutrient_conversion_factor_id Id of the related row in the nutrient_conversion_factor table id
value The multiplication factor used to calculate protein from nitrogen

food_update_log_entry Historical record of an update of food data food‐>foodUpdateLog


fdc_id ID of the food in the food table
description Description of the food
publication_date Date when the food was published to FoodData Central Published, Published Date

foundation_food Foods whose nutrient and food component values are derived primarily by  food (is a type of food)


chemical analysis. Foundation data also include extensive underlying metadata, 
such as the number of samples, the location and dates on which samples were 
obtained, analytical approaches used, and if appropriate, cultivar, genotype, and 
production practices.
fdc_id ID of the food in the food table
NDB_number Unique number assigned for the food, different from fdc_id, assigned in SR ndbNumber
footnote Comments on any unusual aspects. These are released to the public. Examples 
might include unusual aspects of the food overall.

Download & API Field Descriptions, Page 4 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
input_food A food that is an ingredient (for survey (FNDDS) foods) or a source food (for  Sources (for foundation foods),  food‐>inputFoods
foundation foods or their source foods) to another food. Ingredients (for survey foods)
id
fdc_id fdc_id of the food that contains the input food N/A
fdc_id_of_input_food fdc_id of the food that is the input food inputFood
seq_num The order in which to display the input food sequenceNumber
amount The amount of the input food included within this food given in terms of unit
sr_code The SR (aka NDB) code of the SR food that is the ingredient food (used for Survey 
(FNDDS) foods only)
sr_description The description of the SR food that is the ingredient food (used for Survey 
(FNDDS) foods only)
unit The unit of measure for the amount of the input food that is included within this  Measure
food (used for Survey (FNDDS) foods only)
portion_code Code that identifies the portion description used to measure the amount of the 
ingredient (used for Survey (FNDDS) foods only)
portion_description The description of the portion  used to measure the amount of the ingredient  Portion
(used for Survey (FNDDS) foods only)
gram_weight The weight in grams of the input food Weight (g)
retention_code A numeric code identifying processing on the input food that may have impacted  retentionFactor
food nutrient content (used for Survey (FNDDS) foods only)
survey_flag 2 = SR description does not match SR code, other values = internal processing  Flag
codes for FSRG use only 

lab_method A chemical procedure used to measure the amount of one or more nutrients in a  For reference only


food
id
description Description of the lab method
technique General chemical analysis approach used by the lab method

lab_method_code A short, sometimes lab‐specific, sequence of characters used to identify a lab  For reference only


method
id
lab_method_id ID of the lab method the code refers to
code Value of the method code

lab_method_nutrient A nutrient whose amount can be measured by a lab method For reference only


id
lab_method_id ID of the lab method the nutrient is measured by
nutrient_id ID of the nutrient that can be measured by the lab method

Download & API Field Descriptions, Page 5 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
market_acquisition A food obtained for chemical analysis. food (is a type of food)
fdc_id ID of the food in the food table FDC Source ID
brand_description Brand name description of the food
expiration_date Date the food will expire
label_weight The weight of the  food per the product label
location The region in which the food was purchased, e.g. CA1
acquisition_date Date the food was purchased
sales_type The type of establishment in which the food was acquired (e.g. Retail Store, 
restaurant, farm, etc.)
sample_lot_nbr The lot number of the food Sample Lot Number sampleLotNumber
sell_by_date Date the food should be sold by
store_city The city where the food was acquired
store_name The name of the store the food is purchased from
store_state The state where the food was acquired
upc_code UPC code for the food. Only applicable for retail products.

measure_unit units for measuring quantities of foods food‐>foodMeasures‐>measureUnit


id
name name of the unit
abbreviation abbreviated name of the unit

nutrient The chemical constituent of a food (e.g. calcium, vitamin E) officially recognized  food‐>foodNutrients‐>nutrient


as essential to human health
id
name Name of the nutrient
unit_name The standard unit of measure for the nutrient (per 100g of food) Unit
nutrient_nbr A unique code identifying a nutrient or food constituent number

nutrient_analysis_details Info for the nutrient source info shown on the nutrient source popdown window.  food‐>foodNutrients‐


API only. >nutrientAnalysisDetails
sub_sample_id FDC ID d of the analyzed food
amount Amount of the nutrient
lab_method_description Lab method used to analyze the nutrient
lab_method_technique The overall technique used by the lab method
lab_method_link Link to more info about the lab method
nutrient_acquisition_details FDC ID, purchase date, and purchase state

nutrient_incoming_name A nutrient name used to identify a nutrient in incoming nutrient data
id
name The name used for the incoming nutrient (e.g. if nutrient is Protein, name might 
be Prot)
nutrient_id The id of the nutrient (in the nutrient file) related to the incoming name. Optional 
(see is_ignored for more info).

retention_factor definitions are available from:  food‐>inputFoods‐>retentionFactor


www.ars.usda.gov/SP2UserFiles/Place/12354500/Data/retn/retn06.pdf.

Download & API Field Descriptions, Page 6 of 7
Download & API Field Descriptions
Table / File Field Definition of data element  Synonyms (used on user  API Location
interface only) 
sample_food A food that is acquired as a representative sample of the food supply. It may be  food (is a type of food)
created from a single acquired food, or from a composite of multiple acquired 
foods.
fdc_id ID of the food in the food table N/A

sr_legacy_food Foods from the April 2018 release of the USDA National Nutrient Database for  food (is a type of food)


Standard Reference. Nutrient and food component values are derived from 
chemical analysis and calculation. 
fdc_id ID of the food in the food table
NDB_number Unique number assigned for final food, starts from the minimum number of  ndbNumber
100,000

sub_sample_food A portion of a sample food used for the purpose of specific chemical analysis. N/A ‐ download only

fdc_id ID of the food in the food table
fdc_id_of_sample_food ID of the sample food from which the sub sample originated

sub_sample_result The result of chemical analysis of a lab on a particular sub sample for a particular  food‐>foodNutrients (is a type of food 


nutrient nutrient)
food_nutrient_id Unique ID for row, same as the food_nutrient ID id
adjusted_amount Amount after adjusting for unit
lab_method_id ID of the lab method used to measure the nutrient
nutrient_name The name of the nutrient as supplied by the lab

survey_fndds_food Foods whose consumption is measured by the What We Eat In America dietary  food (is a type of food)


survey component of the National Health and Nutrition Examination Survey 
(NHANES). Survey nutrient values are usually calculated from Branded and SR 
Legacy data.
fdc_id ID of the food in the food table
food_code A unique ID identifying the food within FNDDS
wweia_category_code Unique Identification code for WWEIA food category to which this food is assigned Food Category wweiaFoodCategory

start_date Start date indicates time period corresponding to WWEIA data 
end_date End date indicates time period corresponding to WWEIA data 

wweia_food_category Food categories for fndds food‐>wweiaFoodCategory


wweia_food_category_code Unique identification code
wweia_food_category_description Description for a WWEIA Category

Download & API Field Descriptions, Page 7 of 7
Abbreviation Meaning

Abbreviations used in data element names
id unique identification number
max minimum
min minimum

Abbreviations used for API fields
Field is not included as it is a 
N/A reference to a parent element

Abbreviations
Query Name What it retrieves
q_fndds_<FnddsTableName> FNDDS data in the format origininally used to distribute FNDDS 2013‐2014
q_foundation_agricultural_acquisition_sources  Source agricultural acquisitions of foundation foods
q_foundation_agricultural_acquisition_nutrients  Source agricultural acquisition nutrients of foundation foods
q_foundation_market_acquisition_sources  Source market acquisitions of foundation foods
q_foundation_market_acquisition_nutrients  Source market acquisition nutrients of foundation foods
q_foundation_market_acquisition_portions Source market acquisition portions of foundation foods
q_foundation_market_acquisition_components Source market acquisition components of foundation foods

MS Access queries
FNDDS ‐> FDC Crosswalk Data was imported from FNDDS 2013‐14 MS Access database to FDC Access database and CSV files
Main goal is to document where imported survey (FNDDS) data is stored in FDC
FNDDS Table Name FNDDS Column Name FDC Table Name* FDC Column Name* FDC Location on Website Migration Notes
AddFoodDesc Food code food_attribute fdc_id Food Details -> FDC ID Used to link to survey_fndds_food . food_code
AddFoodDesc Seq num food_attribute seq_num Attributes -> Seq num
AddFoodDesc Start date survey_fndds_food start_date Food Details -> Start date
AddFoodDesc End date survey_fndds_food end_date Food Details -> End date
AddFoodDesc Additional food description food_attribute value Attributes -> Additional Description
FNDDSNutVal Food code food_nutrient fdc_id Food Details -> FDC ID Used to link to survey_fndds_food . food_code
FNDDSNutVal Nutrient code food_nutrient nutrient_id Based on nutrient.nutrient_nbr = 'Nutrient code'
FNDDSNutVal Start date survey_fndds_food start_date
FNDDSNutVal End date survey_fndds_food end_date Food Details -> End date
FNDDSNutVal Nutrient value food_nutrient amount Nutrients - > Amount
FNDDSRecCount Full File Name
FNDDSRecCount no_of_records
FNDDSSRLinks Food code input_food fdc_id Food Details -> FDC ID Used to link to survey_fndds_food . food_code
FNDDSSRLinks Start date survey_fndds_food start_date Food Details -> Start date
FNDDSSRLinks End date survey_fndds_food end_date Food Details -> End date
FNDDSSRLinks Seq num input_food seq_num Ingredients -> Seq Num
FNDDSSRLinks SR code input_food sr_code Ingredients -> Code
FNDDSSRLinks SR description input_food sr_description Ingredients -> Description
FNDDSSRLinks Amount input_food amount Ingredients -> Amount
FNDDSSRLinks Measure input_food unit Ingredients -> Measure
FNDDSSRLinks Portion code input_food portion_code Portions -> Portion Code
FoodPortionDesc Portion description input_food portion_description Portions -> Portion Description
FNDDSSRLinks Retention code input_food retention_code Ingredients -> Retention Code
FNDDSSRLinks Flag input_food survey_flag Ingredients -> Flag
FNDDSSRLinks Weight input_food gram_weight Ingredients -> Weight(g)
FoodPortionDesc Portion code food_portion modifier
FoodPortionDesc Start date survey_fndds_food start_date Food Details -> Start date
FoodPortionDesc End date survey_fndds_food end_date Food Details -> End date
FoodPortionDesc Portion description food_portion portion_description Ingredients -> Portion
FoodSubcodeLinks Food code survey_fndds_food food_code Food Details -> Food Code
FoodSubcodeLinks Subcode Used to link to FoodWeights (We only import subcodes into food_portion
that have a subcode code of 0 ("default gram weights")) so this field is
not needed.
FoodSubcodeLinks Start date survey_fndds_food start_date Food Details -> Start date
FoodSubcodeLinks End date survey_fndds_food end_date Food Details -> End date
FoodWeights Food code food_portion fdc_id Food Details -> FDC ID Used to link to survey_fndds_food . food_code
FoodWeights Subcode See FoodSubcodeLinks . Subcode explanation
FoodWeights Seq num food_portion seq_num Portions -> Seq num
FoodWeights Portion code food_portion modifier Portions -> Portion code
FoodWeights Start date survey_fndds_food start_date Food Details -> Start date
FoodWeights End date survey_fndds_food end_date Food Details -> End date
FoodWeights Portion weight food_portion gram_weight Portions -> Weight (g)
MainFoodDesc Food code survey_fndds_food food_code Food Details -> Food Code
MainFoodDesc Start date survey_fndds_food start_date Food Details -> Start date

FNDDS crosswalk, Page 1 of 2
FNDDS Table Name FNDDS Column Name FDC Table Name* FDC Column Name* FDC Location on Website Migration Notes
MainFoodDesc End date survey_fndds_food end_date Food Details -> End date
MainFoodDesc Main food description food description Food Details -> Description
MoistNFatAdjust Food code food_attribute fdc_id Food Details -> FDC ID Used to link to survey_fndds_food . food_code
MoistNFatAdjust Start date survey_fndds_food start_date Food Details -> Start date
MoistNFatAdjust End date survey_fndds_food end_date Food Details -> End date

MoistNFatAdjust Moisture change food_attribute value Attributes -> Adjustments Example, "Moisture change: -20.0%"

MoistNFatAdjust Fat change food_attribute value Attributes -> Adjustments Example, "Fat change: 5.3%, Fat code: 4615 (Shortening, vegetable,
household, composite)"
MoistNFatAdjust Type of fat food_attribute value Attributes -> Adjustments See above
NutDesc Nutrient code nutrient nutrient_nbr
NutDesc Nutrient description nutrient name
NutDesc Tagname
NutDesc Unit nutrient unit_name
NutDesc Decimals
SRNutVal SR code input_food sr_code Based on NDB_number
SRNutVal Nutrient code These data were not migrated to FDC. Nutrient values for SR codes
used as the basis for FNDDS 13-14 nutrient values can be found at
https://www.ars.usda.gov/northeast-area/beltsville-md-bhnrc/beltsville-
human-nutrition-research-center/food-surveys-research-
group/docs/fndds-download-databases/
SRNutVal Start date survey_fndds_food start_date Food Details -> Start date
SRNutVal End date survey_fndds_food end_date Food Details -> End date
SRNutVal Nutrient value These data were not migrated to FDC. Nutrient values for SR codes
used as the basis for FNDDS 13-14 nutrient values can be found at
https://www.ars.usda.gov/northeast-area/beltsville-md-bhnrc/beltsville-
human-nutrition-research-center/food-surveys-research-
group/docs/fndds-download-databases/
SRNutVal Nutrient value change flag These data were not migrated to FDC. Nutrient values for SR codes
used as the basis for FNDDS 13-14 nutrient values can be found at
https://www.ars.usda.gov/northeast-area/beltsville-md-bhnrc/beltsville-
human-nutrition-research-center/food-surveys-research-
group/docs/fndds-download-databases/
SubcodeDesc Subcode Did not import subCode descriptions other than for subcode=0
SubcodeDesc Start date survey_fndds_food start_date Food Details -> Start date
SubcodeDesc End date survey_fndds_food end_date Food Details -> End date
SubcodeDesc Subcode description
category_list category_number wweia_food_category wweia_category_code
category_list category_description wweia_food_category wweia_category_description Food Details -> Food Category
FNDDS_foodcat food_code survey_fndds_food food_code Food Details -> Food Code
FNDDS_foodcat category_number survey_fndds_food wweia_category_code

FNDDS crosswalk, Page 2 of 2

You might also like