List the US nutrient vocabulary
List the US nutrient vocabulary, with each nutrient's bmid, unit and id.
Use this to find the bmid, nutrient_id and unit to send for a
custom ingredient's nutrient, instead of guessing an id from the
nutrient's name.
This is the list a custom ingredient's nutrition write checks: a nutrient
must use a bmid listed here, stated in that row's unit. Each row's
nutrient_id is the USDA nutrient id, and is null where USDA defines
none.
By default only the nutrients on the Nutrition Facts label are listed,
each with its label_name. Match a label nutrient by label_name. USDA
lists near-duplicates (such as 'Sugars, Total' beside 'Total Sugars'),
and only the label row reaches a recipe's label. A row with label_bmid
set is an alternate coding that a write refuses: send the value under
its label_bmid instead. For a nutrient that is
not on the label (an amino acid, a fatty acid), pass scope=all with q
to find it by name. Nutrients USDA has archived are never listed, and a
write that uses one is refused.
Cache-Control: 5 minutes, then revalidated.
Related endpoints:
- setCustomIngredientNutrition: write a custom ingredient's nutrients
- listUsFdaDailyValueReferences: the Daily Values of label nutrients
scope?VocabularyScope'label' (the default) lists the nutrients the Nutrition Facts label reads. 'all' lists every nutrient a custom ingredient may hold, including ones that never reach the label.
"label""label""all"q?|Keep only nutrients whose USDA name or label name contains this text, ignoring case.
Successful Response
application/json- response
Complete response for the list nutrient vocabulary endpoint.
data*Nutrient vocabulary data
meta*Request metadata (version, ID, timestamp)
curl -X GET 'https://api.bettermenu.live/us/nutrition/nutrients/vocabulary'{ "data": { "market": "US", "nutrients": [ { "bmid": "n_cf0wwfrw2sf4y", "name": "Protein", "unit": "g", "nutrient_id": 1003, "label_name": "Total Sugars", "label_bmid": null, "group": "macronutrient", "usda_rank": 600 } ], "total_count": 0 }, "meta": { "version": "string", "request_id": "string", "timestamp": "2019-08-24T14:15:22Z" }}