Household and standard measures for one food, either way round (API key, rate-limited)
GET /foods/convert · API key required
Give a household measure (tsp, tbsp, dsp, h dsp, cup, us cup, scoop 16, or a food-specific label such as chipande, piece, slice) and get the standard weight; give a standard measure (g, kg, oz, lb, ml, l, fl oz) and get the household equivalents. The reply always has `standard`, `household` (the food's own servings as fractional counts, plus spoon and cup equivalents when the food has a density), the nutrients for that amount, and `assumptions`. A volume becomes grams using the food's own serving in that unit, else its density from a cup or spoon serving, else 1 g/ml (flagged). `cup` is the 250 ml metric household cup; `us cup` is 240 ml. Same food matching and gram conversion as POST /recipes/calculate.
Parameters
q(query) - Food name. Give this or `id`.id(query) - Food id. Give this or `q`. Also available as GET /foods/{id}/convert.amount(query) - Quantity, default 1. Accepts 2, 0.5, 1/2, 1 1/2.unit(query) - Unit, default g. See GET /measures for every unit, or use a food-specific label (chipande, piece, slice).
Responses
200400404422- The unit could not be resolved for this food.429