{"uid":"cap_CE4NCb7iUMuod3BB1iBlc","slug":"usda-fooddata-central-nutrition-lookup-d0a290cd","name":"USDA FoodData Central Nutrition Lookup","description":"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.","url":"https://2s.io/api/nutrition/food","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"properties":{"page":{"type":"integer","default":1,"minimum":1},"fdcId":{"type":"integer","description":"FDC food id for full nutrient detail (XOR with query)."},"limit":{"type":"integer","default":10,"maximum":50,"minimum":1},"query":{"type":"string","description":"Food name to search (XOR with fdcId)."},"dataType":{"enum":["Foundation","SR Legacy","Survey (FNDDS)","Branded"],"type":"string","description":"Restrict search to one FDC data type."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"page":1,"limit":10,"query":"apple","dataType":"Foundation"}}},"response":{"data":{"ok":true,"meta":{"mode":"search"},"items":[{"fdcId":1750340,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apples, fuji, with skin, raw","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2020-10-30","servingSizeUnit":null},{"fdcId":1750341,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apples, gala, with skin, raw","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2020-10-30","servingSizeUnit":null},{"fdcId":1750343,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apples, honeycrisp, with skin, raw","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2020-10-30","servingSizeUnit":null},{"fdcId":1750342,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apples, granny smith, with skin, raw","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2020-10-30","servingSizeUnit":null},{"fdcId":1750339,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apples, red delicious, with skin, raw","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2020-10-30","servingSizeUnit":null},{"fdcId":2003590,"dataType":"Foundation","brandName":null,"brandOwner":null,"description":"Apple juice, with added vitamin C, from concentrate, shelf stable","servingSize":null,"foodCategory":"Fruits and Fruit Juices","publishedDate":"2021-10-28","servingSizeUnit":null}],"total":6,"source":{"url":"https://fdc.nal.usda.gov/","license":"Public domain (US government work)","provider":"USDA FoodData Central (api.nal.usda.gov)"}},"meta":{"cost":{"usd":0.0012,"tier":0},"caller":"x402","version":null,"endpoint":"nutrition.food","settlement":{"txHash":"0x1694a7ad8431f4205528a087bc0192f1e1524a62f74001a314ec60cb613de4a8","network":"eip155:8453","success":true}}}},"exampleRequest":{"page":1,"limit":10,"query":"apple","dataType":"Foundation"},"tags":["x402"],"displayCostAmount":"0.0012","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0012/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_i2Ovd1n3r1uDDU-yxa9Y9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Search USDA FoodData Central by food name or retrieve full nutrient profile by FDC ID, covering ~400k foods with lab-analyzed nutrition data.","exampleAgentPrompt":"What's the full nutrient breakdown for raw spinach — calories, protein, fats, carbs, vitamins, and minerals — using USDA Foundation data? Search for 'raw spinach' and then pull the detailed nutrient profile from the FDC ID.","exampleUseCases":null,"resultDescription":"In search mode: a ranked list of matching foods each with fdcId, description, data type, category, and brand. In detail mode: a comprehensive nutrient profile including energy, protein, fats, carbohydrates, vitamins, and minerals with USDA nutrient numbers, amounts, and units (per 100g/ml), plus ingredients for branded foods.","failureModes":["No foods found matching the query — returns empty results list","Invalid or non-existent fdcId — returns 404 or error response","Both query and fdcId provided simultaneously — violates XOR constraint","Neither query nor fdcId provided — missing required parameter","dataType filter returns no results for that category","Rate limit or payment failure — returns 402 payment required"],"whenToPreferThis":"Use this endpoint when you need authoritative, lab-analyzed USDA nutrition data rather than model-estimated values. Ideal for dietary tracking apps, nutrition analysis, food labeling verification, or any use case requiring precise nutrient values across ~400k foods including both generic (Foundation/SR Legacy) and branded packaged foods.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:57:20.542Z","isFirstParty":false}