USDA API: Search foods
Searches USDA FoodData Central foods and branded products by food or brand name, ranked by relevance. Calories and serving sizes are null when not supplied.
Unofficial. Not affiliated with or endorsed by USDA.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Query, required
query Food or brand name to search, for example greek yogurt or Cheerios.
greek yogurt
- Food Type optional
food_type Choose any foods, generic foods, or branded products; for example branded.
any (default)
One of
any,generic,branded.- Max Results optional
max_results Maximum number of results to return, for example 20.
20 (default)
Whole number from 1 to 100.
Input as JSON
{ "query": "greek yogurt"}Output
{ "foods": [ { "category": "Popcorn, Peanuts, Seeds & Related Snacks", "brand_owner": "Ocean Spray Cranberries, Inc.", "description": "GREEK YOGURT", "serving_size": "2 Tbsp", "food_page_link": "https://fdc.nal.usda.gov/food-details/2035482/nutrients" , "data_source_type": "Branded", "calories_per_100_g": 467, "food_data_central_id": 2035482 }, { "category": "Yogurt", "brand_owner": "Chobani, Inc.", "description": "GREEK YOGURT", "serving_size": "1 CONTAINER", "food_page_link": "https://fdc.nal.usda.gov/food-details/2038865/nutrients" , "data_source_type": "Branded", "calories_per_100_g": 80, "food_data_central_id": 2038865 }, { "category": "Yogurt", "brand_owner": "TRADER JOE'S", "description": "GREEK YOGURT", "serving_size": "1 CONTAINER", "food_page_link": "https://fdc.nal.usda.gov/food-details/373595/nutrients" , "data_source_type": "Branded", "calories_per_100_g": 132, "food_data_central_id": 373595 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"fdc.nal.usda.gov/search_foods","input":{"query":"greek yogurt"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "fdc.nal.usda.gov/search_foods" , "input": { "query": "greek yogurt" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "fdc.nal.usda.gov/search_foods" , "input": { "query": "greek yogurt" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run fdc.nal.usda.gov/search_foods# with {"query":"greek yogurt"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "query": { "type": "string", "minLength": 1, "description": "Food or brand name to search, for example greek yogurt or Cheerios." }, "food_type": { "enum": [ "any", "generic", "branded" ], "type": "string", "default": "any", "description": "Choose any foods, generic foods, or branded products; for example branded." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Maximum number of results to return, for example 20." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "foods" ], "properties": { "foods": { "type": "array", "items": { "type": "object", "required": [ "description", "brand_owner", "category", "calories_per_100_g", "serving_size", "food_page_link", "food_data_central_id", "data_source_type" ], "properties": { "category": { "type": [ "string", "null" ], "description": "Food category." }, "brand_owner": { "type": [ "string", "null" ], "description": "Brand owner, or null for generic foods." }, "description": { "type": "string", "description": "Food description." }, "serving_size": { "type": [ "string", "null" ], "description": "Serving size shown for the food, if available." }, "food_page_link": { "type": "string", "description": "FoodData Central food details page." }, "data_source_type": { "type": [ "string", "null" ], "description": "USDA data source type." }, "calories_per_100_g": { "type": [ "number", "null" ], "description": "Calories (kcal) per 100 grams, if supplied." }, "food_data_central_id": { "type": "integer", "description": "USDA FoodData Central food ID." } }, "additionalProperties": false }, "description": "Foods in relevance order." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
fdc.nal.usda.gov/search_foods- Returns
- description, brand owner, category, calories per 100 g, serving size, FoodData Central link and ID
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method fdc.nal.usda.gov/search_foods with the inputs above.
Ask your agent
- Find branded cereal options for Cheerios with calorie counts per 100 g and serving sizes
- I need a list of generic foods matching greek yogurt, top 10 results, with their FoodData Central IDs
- Look up branded oat milk products from Oatly and show the brand owner and category
- What are the calories per 100 g for almond butter? Show me up to 25 matches on usda.gov
- Search for any food named sourdough bread and give me links to the FoodData Central entries
See more
All USDA methodsLooks up a food in USDA FoodData Central and returns its nutrients per 100 g and for a chosen amount (grams, ounces, or a listed household portion).
fdc.nal.usda.gov/get_nutrition_factsSearches Open Food Facts packaged foods by name, optionally filtered by diet, country where sold and brand, ordered by popularity (most scanned first).
openfoodfacts.org/search_productsFinds FDA food recall enforcement reports by product, brand, or allergen, newest first. Reports are updated weekly and recall statuses may lag.
open.fda.gov/search_food_recallsSearch ALDI US groceries in site order with prices for the selected store. Prices and availability vary by store; related search results may follow direct matches.
aldi.us/search_productsSearches Trader Joe's public product catalogue by name or keywords, optionally within a main category. Prices are website reference prices and may vary by store.
traderjoes.com/search_productsFinds Food Network recipes for a dish or ingredient, optionally filtered by chef, in site search order.
foodnetwork.com/search_recipesSearches a named Instacart store's guest-visible grocery products for a US ZIP code. Prices are in USD and can differ from in-store prices; stock estimates can change.
instacart.com/search_productsFinds FDA drug enforcement recalls by medicine or company name, newest first, with status, class, reason and quantity. Recent recalls may not yet appear.
open.fda.gov/search_drug_recalls