# WebLens Extract API

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

Extracts structured data fields from a given URL using AI-powered web scraping

## Facts

- Endpoint: POST https://api.weblens.dev/extract?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weblens-extract-api-5d51a05d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2i4tKt_NADDqMaJT5-KbR

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-extract-api-5d51a05d -d '<json body>'
```

Example prompt: Can you scrape https://example.com/product and extract the product name, price, and whether it's in stock as structured data?

## When to prefer this

Choose this endpoint when you need to extract specific structured fields from a known URL into clean JSON, especially for e-commerce product pages, pricing pages, or any web content where you want targeted data points rather than raw HTML. It is preferable over generic HTTP fetch when you need AI-powered field identification and structuring. The caching discount (70% cheaper) makes it cost-effective for repeatedly accessed URLs.

## Known failure modes

- URL is unreachable or returns a non-200 HTTP status — extraction fails with an error response
- Target page uses heavy JavaScript rendering that prevents content access
- Requested fields are not present on the page — returns null or missing keys
- Rate limiting or bot protection on the target site blocks the request
- Malformed or invalid URL input causes a 4xx client error
- Page content has changed structure since last cached response, causing stale data

## 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

Returns a JSON object containing the extracted structured data fields from the target URL, along with a unique request ID and an ISO timestamp of when the extraction occurred. The data object contains the specific fields requested (e.g. name, price, inStock status).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "URL of the webpage to extract from"
  },
  "schema": {
   "type": "object",
   "description": "JSON schema defining the data structure to extract"
  },
  "instructions": {
   "type": "string",
   "description": "Natural language instructions to guide extraction"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/product",
  "data": {
   "name": "Product Name",
   "price": 99.99,
   "inStock": true
  },
  "requestId": "req_extract789",
  "extractedAt": "2026-01-26T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weblens-extract-api-5d51a05d/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)
