# TheMealDB Recipe Search via x402

> TheMealDB Recipe Search via x402 is a paid API for AI agents from x402-v2-mint-mealdb-search.vercel.app, paid per call via x402, $0.020174/call, status unknown (last checked 2026-11-18).

Searches TheMealDB database for meal/recipe information by name or keyword, gated behind x402 micropayment.

## Facts

- Endpoint: POST https://x402-v2-mint-mealdb-search.vercel.app/v1/mealdb-search?utm_source=zero.xyz
- Price: $0.020174/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/themealdb-recipe-search-via-x402-d0f9bafb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7wwiB9rtP2JzRpLHsJM9C

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 themealdb-recipe-search-via-x402-d0f9bafb -d '<json body>'
```

Example prompt: Can you search TheMealDB for recipes with 'chicken tikka' and show me what comes up?

## When to prefer this

Use this endpoint when you need to search for meal or food recipes by name or keyword and are operating in an x402 micropayment environment. Prefer this over manual web scraping of TheMealDB or alternatives when you need structured recipe data with predictable per-call pricing. Do NOT use this for cocktail or drink recipes — that use case is explicitly not supported.

## Known failure modes

- 402 Payment Required: request not yet paid via x402 protocol, empty response body
- 400 Bad Request with charged:false: payment settled but query was empty or invalid
- No results found: valid query but no matching meals in TheMealDB database
- Request with cocktail search terms may return empty (cocktail-search not supported on this endpoint)
- Network timeout or Vercel cold-start latency

## How this service works

TheMealDB recipe/meal search (keyless). POST {s|q|name}. Unpaid empty → 402; after settle empty/invalid → 400 charged:false. New meal/recipe lane; cocktail-search soft swap only (do not mint cocktail).

## Output

Returns a JSON object with ok:true, skill 'mealdb-search', charged:true/false, and a summary field. On success, includes meal/recipe data from TheMealDB such as meal names, ingredients, and cooking instructions. Returns 402 if payment is not settled; returns 400 with charged:false if query is empty or invalid after payment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "q": {
   "type": "string",
   "maxLength": 128
  },
  "s": {
   "type": "string",
   "maxLength": 128
  },
  "name": {
   "type": "string",
   "maxLength": 128
  },
  "query": {
   "type": "string",
   "maxLength": 128
  },
  "request_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "mealdb-search",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/themealdb-recipe-search-via-x402-d0f9bafb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-mealdb-search.vercel.app](https://www.zero.xyz/host/x402-v2-mint-mealdb-search.vercel.app/llms.txt)
