# x402 Web Search API

> x402 Web Search API is a paid API for AI agents from call402.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-19).

Performs a live web search query and returns ranked results with titles, URLs, highlights, and publication dates, paid per-call via USDC on Base mainnet.

## Facts

- Endpoint: POST https://call402.com/api/web-search?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-web-search-api-5149473a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4LjxYI2oBW9RJ_xX_KYbz

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-web-search-api-5149473a -d '<json body>'
```

Example prompt: Search the web for the latest Base ecosystem news and give me the top 5 results, including titles and key highlights from each page.

## When to prefer this

Choose this endpoint when an AI agent needs live, up-to-date web search results and can pay per-call in USDC via the x402 protocol on Base mainnet. It is ideal for agents that need real-time information retrieval without a monthly subscription, or for workflows that require pay-as-you-go access. The Exa backend provides semantic relevance scoring and highlight extraction, making it preferable over raw search APIs when context snippets and publication dates matter.

## Known failure modes

- Payment not included — returns HTTP 402 with payment requirements; agent must pay via x402 client and retry with PAYMENT-SIGNATURE header
- Query string missing — returns 400 bad request
- num_results out of range (must be 1-10) — returns 400 validation error
- No results found for obscure or malformed query — returns empty results array
- Upstream Exa provider timeout or outage — returns 502 or 503 error
- Insufficient USDC balance for payment — transaction fails before request is processed

## How this service works

USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.

## Output

A JSON object containing a meta block (source attribution, request ID, result count) and an array of result objects, each with a URL, relevance score, title, array of highlight passages extracted from the page, and a published date.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "description": "Natural-language search query"
  },
  "num_results": {
   "type": "integer",
   "description": "Results to return, 1-10 (default 5)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "meta": {
   "source": "exa",
   "request_id": null,
   "results_count": 1
  },
  "query": "latest Base ecosystem news",
  "results": [
   {
    "url": "https://example.com",
    "score": 0.9,
    "title": "Example result",
    "highlights": [
     "Key passage from the page."
    ],
    "published_date": "2026-10-01"
   }
  ]
 }
}
```

## More

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