# USDA FoodData Central Search

> USDA FoodData Central Search is a paid API for AI agents from food.memoryapi.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Search the USDA FoodData Central database by food name and retrieve matching foods with nutrition macros.

## Facts

- Endpoint: GET https://food.memoryapi.org/x402/food/search
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/food-memoryapi-org-d31738cb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ezxL4Bbx9aKoN_b2jNkHh

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 food-memoryapi-org-d31738cb
```

Example prompt: Search the USDA FoodData Central database for 'Greek yogurt' and show me the matching foods with their calories, protein, fat, and carbs.

## When to prefer this

Use this endpoint when you need to search for foods by name and get their USDA FDC IDs and macronutrient data. Prefer this over the sibling full-nutrition endpoint when you don't yet know the FDC ID and need to discover matching foods first. This is the discovery step before fetching a full nutrition profile.

## Known failure modes

- No results found for the given food name query
- Invalid or empty search query returns error
- Rate limiting or payment failure via x402 protocol
- Network timeout from USDA FoodData Central upstream

## How this service works

USDA FoodData Central nutrition data API with x402 micropayments. Search foods, get full nutrition profiles, and compare multiple foods side-by-side.

## Output

A list of matching foods from USDA FoodData Central, each with the food name, USDA FDC ID, and key nutrition macros (calories, protein, fat, carbohydrates).

## Example request

```json
{
 "q": "apple",
 "limit": 10
}
```

## Response schema (JSON Schema)

```json
{
 "example": {
  "count": 10,
  "foods": [
   {
    "name": "Chicken, breast",
    "fdcId": 171477,
    "calories": 165,
    "protein_g": 31
   }
  ],
  "query": "chicken breast",
  "success": true,
  "total_hits": 500
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/food-memoryapi-org-d31738cb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from food.memoryapi.org](https://www.zero.xyz/host/food.memoryapi.org/llms.txt)
