← Back to all posts

FoodData Central

On this page

Purpose

FoodData Central searches the USDA catalog by keyword, then fetches selected normalized details for one FDC ID. Search returns candidate foods. Detail returns the nutrition, ingredient, portion, or label groups you request.

It does not calculate meals, scale nutrients to a serving, give dietary advice, return nutrient detail during search, or fetch additional search pages.

When to use it

  • Find a canonical FDC ID before a detailed lookup.
  • Compare branded products by brand, GTIN or UPC, and serving data.
  • Retrieve selected nutrients and ingredients for one food.
  • Read available Nutrition Facts label values or household portions.

Required setup

You do not enter a key in this component. The Arkus environment must have a server-side FoodData Central API key.

FoodData Central data is reference data, not individualized dietary or medical advice.

How to use it

In Tool Mode:

  1. Connect the component's tools to Agent Core.
  2. Ask the Agent to search for a food before requesting details.
  3. Let the Agent use a returned fdc_id for the detail lookup.
  4. Limit the requested detail sections to the fields the answer needs.

For example, ask the Agent to find a branded cereal, then retrieve its label nutrients and ingredients.

In Normal mode:

  1. Select Search Foods and enter a food or product query.
  2. Keep Data Source at Any unless a dataset filter matters.
  3. Run the search and take an fdc_id from a candidate.
  4. Switch to Get Food Details, enter the ID, and select only the detail sections you need.

Configuration

SettingWhat it controlsRecommended starting point
ActionSearch or one-food detail lookupSearch first unless you already have an FDC ID
QueryFood or product search textUse a specific phrase
Data SourceAn optional FDC dataset filterKeep Any
Top ResultsSearch page sizeStart below the default of 100 for conversational flows
Search SectionsFields returned for search matchesKeep summary and brand
FDC IDThe numeric food identifier for detailCopy it from Search Foods
Detail SectionsGroups returned for one foodKeep summary and label nutrients

Top Results is clamped to 1 through 1,000. The component returns one page only.

Expected result

Search returns normalized matches with counts and section metadata. Detail returns selected normalized groups and reports the returned and omitted sections.

Detail tries the full format first. On a 404, it retries the abridged format. Abridged results omit portions and label nutrients. If neither format finds the ID, the component returns found: false.

Reference details

Use Data Operations to select or reshape nested result fields. Type Convert can adapt the structured result for another consumer.

← Back to all posts