USDA FoodData Central nutrition lookup.
USDA FoodData Central nutrition lookup. Two modes: search (query=cheddar cheese) returns matching foods with fdcId, description, data type, category, and brand; detail (fdcId=328637) returns the full analyzed nutrient profile — energy, protein, fats, carbohydrates, vitamins, minerals — with USDA nutrient numbers, amounts, and units (per 100 g/ml unless serving fields indicate otherwise), plus ingredients for branded foods. Filter search by dataType: Foundation and SR Legacy are lab-analyzed generic foods, Branded is the packaged-food label corpus, Survey (FNDDS) is as-consumed dishes. Authoritative USDA data covering ~400k foods — use real analyzed values instead of model-estimated nutrition facts.
Request
- Base URL: https://2s.io
- URL: https://2s.io/api/nutrition/food
- Auth: API key in header PAYMENT-SIGNATURE
Query parameters
Food name to search, e.g. "cheddar cheese". Provide query or fdcId, not both.
FDC food id — returns the full nutrient profile.
Restrict search to one data type. Foundation/SR Legacy = analyzed generic foods, Branded = packaged labels, Survey (FNDDS) = as-consumed dishes.
Maximum number of results to return.
Page number (1-based) for paginated results.
Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.
Response
Changes
No recorded changes to this operation across all 1 revision of this API.