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

NameTypeRequiredDescription
querystringyesFree-text — name / brand / ingredient
data_typestringnoFilter to data type(s). Comma-sep. Options: ${DATA_TYPES}
brand_ownerstringnoRestrict to a brand owner
page_sizenumberno1-200 (default 50)
page_numbernumberno1-based page (default 1)
sort_bystringnodataType.keyword | lowercaseDescription.keyword | fdcId | publishedDate (default relevance)
sort_orderstringnoasc | 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

FieldTypeDescription
foodSearchCriteriaobjectSearch criteria used
totalHitsnumberTotal number of matching foods
currentPagenumberCurrent page number
foodsarrayArray 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.

Regenerated from source · build July 6, 2026