How to Use USDA food search in Devin
Returns matching FoodData Central foods and their record identifiers. Use it to find a food by description or product identifier, then inspect the selected record for its full nutrient details.
Prompts to try with USDA food search in Devin
Copy an example into Devin, or ask in your own words.
Use USDA food search to find Foundation Foods matching cheddar cheese and populate the project's food picker with the returned descriptions and identifiers.
Use USDA food search to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from USDA food search and tell me what changed since last week.
Check USDA food search and summarize what you find in three bullet points.
Pull the newest data from USDA food search and give me the result as a table.
How to set up USDA food search in Devin
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add a custom MCP
Open Customize › MCPs. Click + and choose New MCP. Fill in:
- Sign in to Spiral and approve
In Customize › MCPs, open Spiral and choose Connect. Spiral opens: sign in, pick the organization and click Authorize. No API key.
- Check it
On Spiral's configuration page, click Test tools. Devin lists Spiral's tools.
Use the Spiral skill
- Send Devin this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run USDA food search
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "fdc-nal-usda-gov/foods/search_foods", "input": { "page": 1 } }'
Then paste one of the prompts above: Devin finds USDA food search on Spiral, shows the price and runs it.
USDA food search providers and prices
Spiral runs USDA food search through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask Devin for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Page | 1 to 100000 | 1 | 1-based page of 50 results. |
| Sort by | description or publishedDate | description | Sort column: food description (default) or publication date. |
| Sort direction | asc or desc | asc | sort_direction |
| Include nutrients | on or off | Include each result's per-100 g nutrient values (the portal returns them with every result; a Branded page can be large). | |
| Require all words | on or off | Match only foods containing every word of the query (the portal's default); false matches any word. |
Every API field of USDA FoodData Central (fdc.nal.usda.gov) · Search foods is on its tool page: open its card above.
What can you do with USDA food search in Devin?
Build a food comparison feature with USDA records, nutrient definitions, categories, and nutrient rankings. A coding agent can turn those responses into labeled tables and searchable views in your project.
Cafeteria ingredient substitution research
Find candidate foods by sodium content, match their descriptions, and inspect complete records. Use nutrient definitions and food categories to organize a comparison of substitutes within the same type of food.
Plant protein ingredient comparison
Discover foods ranked by reported protein, locate lentil, bean, tofu, and grain records, and compare their nutrient details. Resolve nutrient units and category labels before preparing a purchasing research table.
Fortified staple food research
Build a reference comparison of enriched and unenriched flour or rice. Resolve the iron definition, discover candidate foods by iron content, verify descriptions, and organize detailed records by USDA category.
Food comparison teaching tool
Build a classroom explorer with food search, category navigation, nutrient definitions, nutrient rankings, and individual food records. Let students investigate how the chosen food and nutrient change a comparison.
Recipe ingredient reference sheet
Match oats, milk, nuts, and other recipe ingredients to USDA foods, then collect their nutrient values and available portions in a source-linked reference sheet.
Packaged product comparison
Find specific packaged foods by name or GTIN and inspect their nutrient and label data. Prepare a comparison for a food buyer using the selected USDA records.
More on USDA food search and Devin
Overview
USDA food search in other agents
Questions about USDA food search in Devin
Can Devin use USDA food search?
Yes. Add Spiral to Devin as an MCP server, and Devin can find and run USDA food search like any built-in tool.
How much does USDA food search cost in Devin?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Devin plan is separate.
Do I need an Alexandria account to use USDA food search in Devin?
No. Spiral runs USDA food search on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up USDA food search in Devin?
About two minutes: add a custom MCP, then sign in to Spiral and approve, then check it.
Does Devin wait while USDA food search runs?
USDA food search runs in the background. Devin starts the run, checks on it and gives you the json when it's ready.
How often does USDA update FoodData Central?
Branded Foods data updates monthly through the API. SR Legacy is a fixed historical reference whose final release was April 2018.
What does Foundation Foods cover?
Foundation Foods covers commodity and minimally processed food samples. Its metadata helps explain variation between analyzed samples.
Does USDA use one category system for every food?
No. Each FoodData Central data type uses a categorization system developed for its own purpose, so category labels should be interpreted within that data type.
Can I find a packaged food by its barcode?
FoodData Central supports searching by GTIN as well as food name. It also supports NDB numbers and FNDDS food codes for the relevant data types.
What information can I inspect behind a nutrient value?
A food record can include data points, minimum, maximum, median, derivation details, and portions. Which details are available depends on the selected record.
Start using USDA food search in Devin
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Devin:
set up https://spiral.ai/SKILL.md


