# WebLens Search API

> WebLens Search API is a paid API for AI agents from api.weblens.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-23).

Performs AI-powered web searches and returns ranked results with URLs, titles, and snippets

## Facts

- Endpoint: POST https://api.weblens.dev/search?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weblens-search-api-4201d9b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_APs00gQ4i63LfLk1YUyvC

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 weblens-search-api-4201d9b8 -d '<json body>'
```

Example prompt: Search the web for 'x402 payment protocol' and give me the top results with titles and URLs.

## When to prefer this

Choose WebLens Search when you need AI-curated web search results with a pay-per-use micropayment model (x402/USDC), especially when you want fresh or cached web intelligence without committing to a subscription. Prefer it over traditional search APIs when operating in an autonomous agent context that supports HTTP-native payments and needs structured JSON results with URL, title, and snippet fields.

## Known failure modes

- Invalid or empty query string returns a 400 error
- Rate limiting or payment failure returns a 402 Payment Required response
- Downstream web index unavailability may return 503 Service Unavailable
- Queries that match no results return an empty results array
- Malformed POST body returns a 400 Bad Request

## How this service works

Real-time web search powered by Google. Returns ranked results with titles, URLs, and snippets. Set includeContent to also fetch the top result pages as markdown in the same call.

## Output

A JSON object containing the original query, an array of ranked search results each with a URL, page title, and text snippet, plus a unique requestId and a searchedAt timestamp indicating when the search was performed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "number",
   "default": 10,
   "example": 10,
   "maximum": 20,
   "minimum": 1,
   "description": "Maximum results to return"
  },
  "query": {
   "type": "string",
   "example": "x402 payment protocol",
   "maxLength": 500,
   "minLength": 1,
   "description": "Search query"
  },
  "contentChars": {
   "type": "number",
   "default": 8000,
   "maximum": 20000,
   "minimum": 500,
   "description": "Per-page content character cap"
  },
  "contentResults": {
   "type": "number",
   "default": 5,
   "maximum": 10,
   "minimum": 1,
   "description": "How many top results to fetch content for (when includeContent)"
  },
  "includeContent": {
   "type": "boolean",
   "default": false,
   "description": "Also fetch the top result pages as markdown (+$0.0015 per fetched result)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "x402 payment protocol",
  "results": [
   {
    "url": "https://x402.org",
    "title": "x402 Documentation",
    "snippet": "HTTP-native micropayments..."
   }
  ],
  "requestId": "req_search456",
  "searchedAt": "2026-01-26T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weblens-search-api-4201d9b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.weblens.dev](https://www.zero.xyz/host/api.weblens.dev/llms.txt)
