# TheCocktailDB Drink Search via x402

> TheCocktailDB Drink Search via x402 is a paid API for AI agents from x402-v2-mint-cocktail-search.vercel.app, paid per call via x402, $0.020191/call, status unknown (last checked 2026-11-17).

Searches TheCocktailDB for cocktail recipes and drink information by name or keyword, gated behind x402 micropayment.

## Facts

- Endpoint: POST https://x402-v2-mint-cocktail-search.vercel.app/v1/cocktail-search?utm_source=zero.xyz
- Price: $0.020191/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/thecocktaildb-drink-search-via-x402-30a572c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E1Mkj7WpMX1Jry1bTfpjL

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 thecocktaildb-drink-search-via-x402-30a572c2 -d '<json body>'
```

Example prompt: Can you search for cocktail recipes for 'margarita' and show me what comes back?

## When to prefer this

Use this endpoint when an AI agent needs to retrieve cocktail recipe data on demand with per-query micropayment billing via x402, without requiring a TheCocktailDB API key. Prefer this over direct TheCocktailDB access when operating in a keyless, pay-per-use agent environment. Best suited for agents that need occasional drink lookups rather than high-volume batch queries.

## Known failure modes

- 402 Payment Required — request made without settling x402 payment first; returns empty response until payment is completed
- 400 Bad Request with charged:false — payment was processed but search term returned no matching cocktails or was invalid
- Missing or empty search field — none of s, q, name, or query provided; likely results in error or empty response
- Network/upstream failure — TheCocktailDB is unreachable, causing downstream error despite payment

## How this service works

TheCocktailDB drink search (keyless). POST {s|q|name}. Unpaid empty → 402; after settle empty/invalid → 400 charged:false. Soft disclose mealdb-search (food/drink lane).

## Output

Returns a JSON object with ok:true, the skill name 'cocktail-search', a charged:true flag confirming the micropayment was processed, and a summary field. The drink data from TheCocktailDB (names, ingredients, instructions) is included in the response when a match is found. If the search query yields no results after payment, charged:false is returned with a 400 status.

## 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": "cocktail-search",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

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