# x402 Demo API - Search

> x402 Demo API - Search is a paid API for AI agents from x402-demo-api-kaya.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Executes a paid web search query via the x402 micropayment protocol on Base mainnet, returning titles, URLs, and snippets for matching results

## Facts

- Endpoint: POST https://x402-demo-api-kaya.vercel.app/api/search
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-demo-api-search-02c3985f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pLJ9w-fAloQj7gQ1qw-bB

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 x402-demo-api-search-02c3985f -d '<json body>'
```

Example prompt: Search for 'best open source LLMs in 2025' using the x402 demo search API and show me the top results with their titles and URLs.

## When to prefer this

Choose this endpoint when you need to demonstrate or test the x402 micropayment protocol with a real paid API call on Base mainnet, or when you want to retrieve web search results (titles, URLs, snippets) via a pay-per-use USDC-based model at $0.01 per query. Best suited for x402-aware agents that can handle 402 Payment Required flows automatically.

## Known failure modes

- Payment not included or insufficient USDC balance — API returns 402 Payment Required
- Missing required 'query' field in request body — returns 400 Bad Request
- Query string is empty or malformed — may return empty results array
- x402 facilitator or Base mainnet unavailable — payment processing fails
- Vercel deployment downtime — returns 503 or connection error

## How this service works

Paid API demo using x402 protocol on Base mainnet.

## Output

Returns a JSON object containing the original query string and an array of search results, each with a title, URL, and snippet summarizing the matched content.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "Search query"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query",
  "results"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "Original query"
  },
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "title",
     "url",
     "snippet"
    ],
    "properties": {
     "url": {
      "type": "string",
      "format": "uri"
     },
     "title": {
      "type": "string"
     },
     "snippet": {
      "type": "string"
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-demo-api-search-02c3985f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-demo-api-kaya.vercel.app](https://www.zero.xyz/host/x402-demo-api-kaya.vercel.app/llms.txt)
