# USDA FoodData Central Nutrition Search

> USDA FoodData Central Nutrition Search is a paid API for AI agents from x402-data-bazaar.vercel.app, paid per call via x402, $0.008/call, status down (last checked 2026-09-13).

Searches USDA FoodData Central for nutrition facts (calories, protein, fat, carbs, fiber, sugar, sodium, cholesterol) for any food query

## Facts

- Endpoint: GET https://x402-data-bazaar.vercel.app/api/nutrition/search
- Price: $0.008/call
- Payment: x402
- Status: down
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-data-bazaar-vercel-app-28fa15c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2uZ0dX72bFXRj5NRd19c3

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 x402-data-bazaar-vercel-app-28fa15c9
```

Example prompt: Look up nutrition facts for salmon from the USDA food database — calories, protein, fat, and carbs — and show me the top 3 results.

## When to prefer this

Use this endpoint when you need structured, government-sourced nutrition data for a specific food item — especially calories, macros, fiber, sugar, sodium, or cholesterol. Prefer this over generic web search when you need machine-readable nutritional values sourced from the USDA. Ideal for diet tracking, meal planning, recipe analysis, or health-focused applications.

## Known failure modes

- Empty or missing query defaults to 'chicken breast' rather than returning an error
- Limit parameter ignored or clamped if out of range
- Food not found in USDA database returns empty foods array
- Invalid limit string may cause unexpected behavior
- Network timeout or Vercel cold-start delay on first request
- Payment failure (x402) returns 402 before nutrition data is served

## How this service works

Search USDA FoodData Central for nutrition data -- calories, protein, fat, carbs, fiber, sugar, sodium, cholesterol per food. Query: ?query=chicken breast&limit=5. If query is omitted, defaults to `chicken breast`.

## Output

Returns a list of matching foods from USDA FoodData Central, each with per-food nutrient values including calories (with unit), and a count of total results matched, plus the echoed query string and a success flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "string",
   "description": "Maximum results to return"
  },
  "query": {
   "type": "string",
   "description": "Food search phrase"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "data": {
  "count": 2,
  "foods": [
   {
    "calories": {
     "unit": "KCAL",
     "value": 144
    },
    "description": "Chicken breast, rotisserie, skin not eaten"
   },
   {
    "calories": {
     "unit": "kJ",
     "value": 1100
    },
    "description": "Chicken breast tenders, breaded, uncooked"
   }
  ],
  "query": "chicken breast"
 },
 "source": "USDA FoodData Central",
 "success": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-data-bazaar-vercel-app-28fa15c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-bazaar.vercel.app](https://www.zero.xyz/host/x402-data-bazaar.vercel.app/llms.txt)
