Common Food Phrases JSON Export Documentation
  • 2 Minutes to read
  • Dark
    Light

Common Food Phrases JSON Export Documentation

  • Dark
    Light

Article summary

The sample formatted JSON object for an individual food from the common food phrases JSON file:
Example food object v1 (v1: 2020 and earlier)
Example food object v2 (v2: 2021 and after)

The entire common foods JSON file includes an array of ~30K food phrases. Each food phrase is linked to a unique instance of a food, called the “tags” object. For an explanation of the difference between food tags and food phrases, see here.

Data Attribute Dictionary

Note:

Any attributes which appear in the JSON object but are not listed here, are considered Nutritionix internal-use only, and not intended for use with 3rd party applications.

field nameAPI versionstypedescription
food_name1,2varcharThe food phrase. This will value will be unique within the phrases json file.
photo1,2objectIncludes metadata for hosted photo of the food
full_nutrients1,2arrayIncludes array of objects for each nutritional value of the food. The values of each nutrient relate to the default serving size of the food.
Example:
if the serving_qty=1, serving_unit=”medium fillet”, serving_weight_grams=130, and full_nutrients.208=217.6 (attribute ID for calories is 208)
Then:
We can assume 1 medium filet of fish weighs 130g and has 217.6 calories. Utilize the alt_measures array to get other weights of the food “fish” and you can derived the nutrient calculations accordingly
See attribute definitions for serving_qty,serving_unit,serving_weight_grams
See Nutrient attribute dictionary section for mapping each attr_id to a nutrient name.
tags1,2objectIncludes metadata related to the unique food that relates to the food phrase. See here for more details.
serving_qty1,2floatdefault qty of the food. e.g. 1
serving_unit1,2varchardefault unit of the food. e.g. “medium fillet (6 oz)”
serving_weight_grams1,2floatdefault serving weight (in grams) of the food, e.g. (130)
alt_measures1,2arrayarray of available measures for this food. For more details on parsing the alt_measure data, please see our API docs section.
sub_recipe1,2arraynot required, if present, includes the sub recipe the Nutritionix dietitian team used to create this food in the Nutritionix database
ndb_no1,2intThe USDA ndb number associated with this food. If ndb number is less than 1,000,000, it comes directly from USDA. If ndb number is greater than/equal to 1,000,000, it was created by the Nutritionix dietitian team, and no comparable USDA food existed at the time of creation.
wellness_claims2arrayArray of wellness claims

Difference between food tags and food phrases

The common foods JSON export consists of an array of food phrases. In the Nutritionix back-end system, we organize foods by the unique concept of each food. Every unique food has one unique food tag associated with it in the Nutritionix back-end.

For example:
Food tag: low fat yogurt (ID 9017)
Has the following food phrases link to it:

  • low fat yogurt
  • lowfat yogurt
  • yogurt low fat

There will be three entries (one for each phrase) of this food in the JSON export. Each of these entries will refer to tag ID 9017 in the metadata.

Nutrient Attribute Dictionary

Here is a spreadsheet which maps the nutrient attribute IDs to their name and unit.

For more information, see International Common Foods Datasets (Locales).

Support

Any questions about this document should be directed to Syndigo.com/support and select “Wellness or Nutritionix.com” in the first drop-down. Your request will be sent to the best member of our team to answer your question.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence