# USDA FoodData Central Food Search

> USDA FoodData Central Food Search is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Search foods by name against USDA FoodData Central and return ranked matches with nutrition macros per 100g

## Facts

- Endpoint: GET https://payai.agentstools.dev/nutrition/search
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/usda-fooddata-central-food-search-91be4eb5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ry0Sqh9xTipTXzhmBwIbK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability usda-fooddata-central-food-search-91be4eb5
```

Example prompt: Search the USDA FoodData Central database for 'chicken breast' and return up to 5 ranked matches with their macros per 100g — limit it to Foundation foods only.

## When to prefer this

Choose this endpoint when you need authoritative USDA nutritional data for a food by name, especially when you need fdc_ids for further lookups, want macros per 100g across multiple food types (Foundation, SR Legacy, Branded, Survey), or need to resolve branded food GTINs. Prefer this over generic nutrition APIs when regulatory-grade or public-domain data provenance matters.

## Known failure modes

- Empty or whitespace query returns no results or validation error
- Unrecognized dataType enum value causes filter to fail or be ignored
- limit out of range (below 1 or above 25) triggers schema validation error
- Very generic query terms may return poorly ranked or irrelevant results
- USDA FoodData Central upstream unavailability causes service errors
- No matching foods found returns empty results array

## How this service works

Search foods by name in USDA FoodData Central (public domain). Returns ranked matches with fdc_id, description, brand, GTIN and key macros per 100g.

## Output

A ranked list of food matches (up to 25), each with fdc_id, description, brand name, GTIN/barcode, and key macronutrients (calories, protein, fat, carbohydrates) per 100g, sourced from USDA FoodData Central.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Food name to search for"
      },
      "limit": {
       "type": "integer",
       "maximum": 25,
       "minimum": 1,
       "description": "Max ranked matches (default 10)"
      },
      "dataType": {
       "enum": [
        "Foundation",
        "SR Legacy",
        "Branded",
        "Survey (FNDDS)",
        "Experimental"
       ],
       "type": "string",
       "description": "Optional USDA data-type filter"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/usda-fooddata-central-food-search-91be4eb5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
