# Nutrition Lookup (USDA FoodData Central)

> Nutrition Lookup (USDA FoodData Central) is a paid API for AI agents from ZeroClick x402 Service Registry at nutrition.withzero.ai, paid per call via MPP, $0.001/call, status unknown (last checked 2026-10-10, last successful call 2026-05-04).

Look up detailed nutrition facts for any food by name using the USDA FoodData Central database, returning calories, macros, fiber, sodium, and cholesterol.

## Facts

- Endpoint: POST https://nutrition.withzero.ai/run?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Last successful call: 2026-05-04
- Success rate: 100% of calls made through Zero
- Activations on Zero: 2
- Provider: ZeroClick x402 Service Registry
- Website: https://withzero.ai
- Tags: data, nutrition, food, diet, calories, health, usda
- Canonical page: https://www.zero.xyz/c/zeroclick-x402-service-registry-nutrition-lookup-71bbceb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pxIpmzNESAuqO1iKz_ivd

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 zeroclick-x402-service-registry-nutrition-lookup-71bbceb9 -d '<json body>'
```

Example prompt: Look up the nutrition facts for grilled salmon using USDA Foundation data — I want to see the calories, protein, fat, and carbs — return up to 5 results.

## When to prefer this

Use this endpoint when you need authoritative, structured nutrition data backed by USDA FoodData Central — especially when accuracy of macros and micronutrients matters (e.g. diet tracking, meal planning, calorie counting). Prefer over scraped or estimated nutrition sources. Use the dataType filter to narrow to Foundation or SR Legacy for unbranded, research-grade data, or Branded for packaged food specifics.

## Known failure modes

- No results found for obscure or misspelled food names
- Branded foods may lack fiber or micronutrient data
- Generic query returns irrelevant branded variants if dataType not filtered
- Limit exceeded (max 10) returns validation error
- Nutrient values may vary significantly across USDA data types for the same food

## How this service works

Look up nutrition facts for foods via USDA FoodData Central (free API). Input: food name with optional limit and data type filter. Output: foods with detailed nutrition data including calories, protein, fat, carbs, fiber, sugars, sodium, and cholesterol.

## Output

Returns a list of matching foods (up to the requested limit) each with USDA FDC ID, food name, optional brand name, serving size and unit, and a full nutrient breakdown including calories (kcal), protein (g), total fat (g), saturated fat (g), carbohydrates (g), fiber (g), sugars (g), sodium (mg), and cholesterol (mg).

## Example request

```json
{
 "limit": 5,
 "query": "chicken breast",
 "dataType": "Foundation"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "default": 3,
   "maximum": 10,
   "minimum": 1,
   "description": "Maximum results to return (default: 3)"
  },
  "query": {
   "type": "string",
   "maxLength": 200,
   "minLength": 1,
   "description": "Food name to search for (e.g. \"chicken breast\", \"banana\")"
  },
  "dataType": {
   "enum": [
    "Foundation",
    "SR Legacy",
    "Branded",
    "Survey"
   ],
   "type": "string",
   "description": "Filter by USDA data type (default: all types)"
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query",
  "resultCount",
  "results"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "The food query that was searched"
  },
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "fdcId",
     "name",
     "brandName",
     "servingSize",
     "servingSizeUnit",
     "nutrients"
    ],
    "properties": {
     "name": {
      "type": "string",
      "description": "Food description"
     },
     "fdcId": {
      "type": "number",
      "description": "USDA FoodData Central ID"
     },
     "brandName": {
      "type": "string",
      "nullable": true,
      "description": "Brand name (null for generic/unbranded foods)"
     },
     "nutrients": {
      "type": "object",
      "required": [
       "calories",
       "protein",
       "fat",
       "saturatedFat",
       "carbs",
       "fiber",
       "sugars",
       "sodium",
       "cholesterol"
      ],
      "properties": {
       "fat": {
        "type": "object",
        "required": [
         "value",
         "unit"
        ],
        "properties": {
         "unit": {
          "type": "string",
          "description": "Unit of measurement"
         },
         "value": {
          "type": "number",
          "description": "Nutrient amount"
         }
        },
        "description": "Total fat (g)",
        "additionalProperties": false
       },
       "carbs": {
        "type": "object",
        "required": [
         "value",
         "unit"
        ],
        "properties": {
         "unit": {
          "type": "string",
          "description": "Unit of measurement"
         },
         "value": {
          "type": "number",
          "description": "Nutrient amount"
         }
        },
        "description": "Carbohydrates (g)",
        "additionalProperties": false
       },
       "fiber": {
        "type": "object",
        "required": [
         "value",
         "unit"
        ],
        "properties": {
         "unit": {
          "type": "string",
          "description": "Unit of measurement"
         },
         "value": {
          "type": "number",
          "description": "Nutrient amount"
         }
        },
        "description": "Dietary fiber (g)",
        "additionalProperties": false
       },
       "sodium": {
        "type": "object",
        "required": [
         "value",
         "unit"
        ],
        "properties": {
         "unit": {
          "type": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zeroclick-x402-service-registry-nutrition-lookup-71bbceb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nutrition.withzero.ai](https://www.zero.xyz/host/nutrition.withzero.ai/llms.txt)
