search_foods
Pack: usda-fdc · Endpoint: https://gateway.pipeworx.io/usda-fdc/mcp
Search USDA Food Data Central for food items by name, brand, or ingredient. Supports filtering by data type (Branded, Foundation, SR Legacy, Survey FNDDS, Experimental) and brand owner. Returns FDC id, description, data type, and publication date per result.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Free-text — name / brand / ingredient |
data_type | string | no | Filter to data type(s). Comma-sep. Options: ${DATA_TYPES} |
brand_owner | string | no | Restrict to a brand owner |
page_size | number | no | 1-200 (default 50) |
page_number | number | no | 1-based page (default 1) |
sort_by | string | no | dataType.keyword | lowercaseDescription.keyword | fdcId | publishedDate (default relevance) |
sort_order | string | no | asc | desc |
Example call
Arguments
{
"query": "organic whole milk"
}
curl
curl -X POST https://gateway.pipeworx.io/usda-fdc/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_foods","arguments":{"query":"organic whole milk"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_foods', {
"query": "organic whole milk"
});
More examples
{
"query": "chicken breast",
"brand_owner": "Perdue",
"page_size": 25,
"sort_by": "publishedDate",
"sort_order": "desc"
}
Response shape
| Field | Type | Description |
|---|---|---|
foodSearchCriteria | object | Search criteria used |
totalHits | number | Total number of matching foods |
currentPage | number | Current page number |
foods | array | Array of food items matching search |
Full JSON Schema
{
"type": "object",
"description": "Search results from USDA FDC food items",
"properties": {
"foodSearchCriteria": {
"type": "object",
"description": "Search criteria used"
},
"totalHits": {
"type": "number",
"description": "Total number of matching foods"
},
"currentPage": {
"type": "number",
"description": "Current page number"
},
"foods": {
"type": "array",
"description": "Array of food items matching search",
"items": {
"type": "object",
"properties": {
"fdcId": {
"type": "number",
"description": "FDC food identifier"
},
"description": {
"type": "string",
"description": "Food description"
},
"dataType": {
"type": "string",
"description": "Type of food data (Branded, Foundation, etc.)"
},
"publishedDate": {
"type": "string",
"description": "Date food was published"
}
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"usda-fdc": {
"url": "https://gateway.pipeworx.io/usda-fdc/mcp"
}
}
}
See Getting Started for client-specific install steps.