Skip to content

Instantly share code, notes, and snippets.

@magdiel01
Created February 10, 2020 19:02
Show Gist options
  • Save magdiel01/3c82068d71a745788c04f49aa23d5244 to your computer and use it in GitHub Desktop.
Save magdiel01/3c82068d71a745788c04f49aa23d5244 to your computer and use it in GitHub Desktop.
USDA FoodData Central API - Sample JSON Response
{
"foodClass": "Branded",
"description": "MOCHI ICE CREAM BONBONS",
"foodNutrients": [
{
"type": "FoodNutrient",
"id": 3383047,
"nutrient": {
"id": 1079,
"number": "291",
"name": "Fiber, total dietary",
"rank": 1200,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 75,
"code": "LCCD",
"description": "Calculated from a daily value percentage per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 0
},
{
"type": "FoodNutrient",
"id": 3383048,
"nutrient": {
"id": 1087,
"number": "301",
"name": "Calcium, Ca",
"rank": 5300,
"unitName": "mg"
},
"foodNutrientDerivation": {
"id": 75,
"code": "LCCD",
"description": "Calculated from a daily value percentage per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 50
},
{
"type": "FoodNutrient",
"id": 3383049,
"nutrient": {
"id": 1089,
"number": "303",
"name": "Iron, Fe",
"rank": 5400,
"unitName": "mg"
},
"foodNutrientDerivation": {
"id": 75,
"code": "LCCD",
"description": "Calculated from a daily value percentage per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 0
},
{
"type": "FoodNutrient",
"id": 3383050,
"nutrient": {
"id": 1104,
"number": "318",
"name": "Vitamin A, IU",
"rank": 7500,
"unitName": "IU"
},
"foodNutrientDerivation": {
"id": 75,
"code": "LCCD",
"description": "Calculated from a daily value percentage per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 0
},
{
"type": "FoodNutrient",
"id": 3383051,
"nutrient": {
"id": 1162,
"number": "401",
"name": "Vitamin C, total ascorbic acid",
"rank": 6300,
"unitName": "mg"
},
"foodNutrientDerivation": {
"id": 75,
"code": "LCCD",
"description": "Calculated from a daily value percentage per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 3
},
{
"type": "FoodNutrient",
"id": 4942983,
"nutrient": {
"id": 1003,
"number": "203",
"name": "Protein",
"rank": 600,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 2.5
},
{
"type": "FoodNutrient",
"id": 4942984,
"nutrient": {
"id": 1004,
"number": "204",
"name": "Total lipid (fat)",
"rank": 800,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 6.25
},
{
"type": "FoodNutrient",
"id": 4942985,
"nutrient": {
"id": 1005,
"number": "205",
"name": "Carbohydrate, by difference",
"rank": 1110,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 35
},
{
"type": "FoodNutrient",
"id": 4942986,
"nutrient": {
"id": 1008,
"number": "208",
"name": "Energy",
"rank": 300,
"unitName": "kcal"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 200
},
{
"type": "FoodNutrient",
"id": 4942987,
"nutrient": {
"id": 2000,
"number": "269",
"name": "Sugars, total including NLEA",
"rank": 1510,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 30
},
{
"type": "FoodNutrient",
"id": 4942988,
"nutrient": {
"id": 1093,
"number": "307",
"name": "Sodium, Na",
"rank": 5800,
"unitName": "mg"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 75
},
{
"type": "FoodNutrient",
"id": 4942989,
"nutrient": {
"id": 1253,
"number": "601",
"name": "Cholesterol",
"rank": 15700,
"unitName": "mg"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 25
},
{
"type": "FoodNutrient",
"id": 4942990,
"nutrient": {
"id": 1257,
"number": "605",
"name": "Fatty acids, total trans",
"rank": 15400,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 0
},
{
"type": "FoodNutrient",
"id": 4942991,
"nutrient": {
"id": 1258,
"number": "606",
"name": "Fatty acids, total saturated",
"rank": 9700,
"unitName": "g"
},
"foodNutrientDerivation": {
"id": 70,
"code": "LCCS",
"description": "Calculated from value per serving size measure",
"foodNutrientSource": {
"id": 9,
"code": "12",
"description": "Manufacturer's analytical; partial documentation"
}
},
"amount": 3.75
}
],
"foodComponents": [],
"foodAttributes": [],
"tableAliasName": "branded_food",
"brandOwner": "G. T. Japan, Inc.",
"gtinUpc": "019022128593",
"dataSource": "LI",
"ingredients": "ICE CREAM INGREDIENTS: MILK, CREAM, SUGAR, STRAWBERRIES (STRAWBERRIES, SUGAR), CORN SYRUP SOLIDS, SKIM MILK, WHEY, NATURAL FLAVOR, GUAR GUM, MONO & DIGLYCERIDES, BEET JUICE AND BEET POWDER (FOR COLOR), CELLULOSE GUM, LOCUST BEAN GUM, CARRAGEENAN. COATING INGREDIENTS: SUGAR, WATER, RICE FLOUR, TREHALOSE, EGG WHITES, BEET JUICE AND BEET POWDER (FOR COLOR), DUSTED WITH CORN & POTATO STARCH",
"modifiedDate": "11/15/2017",
"availableDate": "11/15/2017",
"servingSize": 40,
"servingSizeUnit": "g",
"householdServingFullText": "1 PIECE",
"labelNutrients": {
"fat": {
"value": 2.5
},
"saturatedFat": {
"value": 1.5
},
"transFat": {
"value": 0
},
"cholesterol": {
"value": 10
},
"sodium": {
"value": 30
},
"carbohydrates": {
"value": 14
},
"fiber": {
"value": 0
},
"sugars": {
"value": 12
},
"protein": {
"value": 1
},
"calcium": {
"value": 20
},
"iron": {
"value": 0
},
"calories": {
"value": 80
}
},
"brandedFoodCategory": "Ice Cream & Frozen Yogurt",
"fdcId": 356425,
"dataType": "Branded",
"publicationDate": "4/1/2019",
"foodPortions": [],
"changes": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment