# OnchainExpat Nutrition Search API

> OnchainExpat Nutrition Search API is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Search for food items and retrieve nutritional information using a pay-per-request x402 API

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-tools/nutrition/search
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-nutrition-search-api-ebb248f9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-qMrwkCIVtW-H5K85vwCw

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 onchainexpat-nutrition-search-api-ebb248f9 -d '<json body>'
```

Example prompt: Search for the nutritional information for 'grilled salmon' — I need the calories, protein, fat, and carb content.

## When to prefer this

Use this endpoint when you need quick, pay-per-request nutrition lookups without subscribing to a full nutrition API service. Ideal for agents that need occasional food data lookups and want to pay micro-amounts per call using USDC on-chain rather than managing a subscription.

## Known failure modes

- Food item not found in database — returns empty or null results
- Ambiguous query matches multiple foods — returns list or best guess
- Payment failure via x402 — returns 402 Payment Required if USDC payment not fulfilled
- Invalid or missing query parameter — returns 400 Bad Request
- Rate limit or server error — returns 500 or 503

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

Returns structured JSON with nutritional data for the matched food item(s), including macronutrients (calories, protein, fat, carbohydrates) and potentially other dietary metrics like fiber, sugar, and micronutrients.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "description": "Max results (default 10, max 25)"
  },
  "query": {
   "type": "string",
   "description": "Food name. Alias: 'food'. E.g. 'apple', 'chicken breast'"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string"
  },
  "cached": {
   "type": "boolean"
  },
  "results": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-nutrition-search-api-ebb248f9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
