# WebLens Smart Extraction API

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

AI-powered smart data extraction from a web page URL using a natural language query, returning matched values with confidence scores and context

## Facts

- Endpoint: POST https://api.weblens.dev/extract/smart?utm_source=zero.xyz
- Price: $0.035/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weblens-smart-extraction-api-60596f9b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ociaVWo2RY8T54GmgEG-d

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-smart-extraction-api-60596f9b -d '<json body>'
```

Example prompt: Go to https://example.com/contact and find all email addresses on the page — I need their values, how confident you are in each one, and the surrounding context where they appear.

## When to prefer this

Use this endpoint when you need to extract specific, targeted information from a known URL using a natural language query rather than writing custom parsing logic. It is ideal when the target data type is semi-structured (emails, names, prices, links) and you want AI-interpreted results with confidence scoring. Prefer this over generic scrapers when you want query-guided extraction with contextual explanation rather than raw HTML dumps.

## Known failure modes

- URL is inaccessible, behind a login wall, or returns a non-200 status — extraction returns empty results or an error
- Page is JavaScript-rendered and content not available at fetch time — may return incomplete data
- Query is too ambiguous — low confidence scores or no matches returned
- Rate limiting or payment failure via x402 — request rejected before processing
- Page content changes between cached and live fetch — stale cache may return outdated values

## How this service works

# WebLens - Web Intelligence API, pay per call

Scrape, crawl, map and extract the web. No account, no API key, no monthly
minimum — you pay for the calls you make and nothing else.

## Pricing
Page fetching starts at **$0.002**, whole-site crawling at
**$0.0015/page**, and sitemap discovery at **$0.004**.
Comparable services bill $0.007-0.008 per request, or reach a lower per-page
rate only on a $99/month commitment. WebLens has no commitment to reach.

## Payment Protocol
All paid endpoints use the [x402 protocol](https://x402.org) for HTTP-native
micropayments (USDC on Base).

## Cache Discount
Cached responses are **70% cheaper** than fresh fetches.

## Output

A JSON object containing the queried URL, an array of extracted data items each with a value, surrounding context, and confidence score (0–1), plus a natural-language explanation of what was found, a unique request ID, and an ISO timestamp of when extraction occurred.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL of the webpage to extract from"
  },
  "query": {
   "type": "string",
   "description": "Natural language description of what to extract"
  },
  "format": {
   "type": "string",
   "description": "Output format: json or text (default: json)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/contact",
  "data": [
   {
    "value": "contact@example.com",
    "context": "Contact page footer",
    "confidence": 0.95
   }
  ],
  "query": "find all email addresses",
  "requestId": "req_smart789",
  "explanation": "Found 1 email address",
  "extractedAt": "2026-01-26T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weblens-smart-extraction-api-60596f9b/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)
