Search USDA Foods
usda_search_foodsSearch USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and a preview of key nutrients (energy, protein, fat, carbs — not guaranteed complete). Use the returned fdcId with usda_get_food for the full nutrient profile, or usda_compare_foods for side-by-side comparisons. When dataType is omitted, defaults to SR Legacy (common whole foods with complete profiles) — or to Branded when brandOwner is set, since only Branded records carry one. Set dataType to ["Branded"] for packaged products, or include a UPC/GTIN code as the query. Pass brandOwner (e.g. "General Mills") to narrow branded results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search terms — food name, ingredient, or UPC/GTIN code for branded products. Examples: "chicken breast raw", "banana", "012345678901". | |
| dataType | No | FDC data sources to search. Omitting this defaults to ["SR Legacy"] (common whole foods, complete nutrient profiles), or to ["Branded"] when brandOwner is set. Include "Branded" for packaged products. Multiple values allowed. | |
| pageSize | No | Number of results per page. Default 10, maximum 50. | |
| brandOwner | No | Filter branded results by brand owner name (e.g. "General Mills", "Kraft"). Only Branded records carry one, so setting this defaults dataType to ["Branded"] unless dataType is given explicitly. | |
| pageNumber | No | Page number (1-based). Use with totalPages to paginate. | |
| foodCategory | No | Filter by USDA food category (e.g. "Poultry Products", "Vegetables and Vegetable Products"). Case-sensitive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| foods | No | Foods matching the search query. | |
| totalHits | No | Total number of foods matching the query across all pages. | |
| totalCount | No | Total foods matching the query across all pages. | |
| totalPages | No | Total number of pages available. | |
| currentPage | No | Current page number (1-based). |