# WebLens > Scrape, crawl, map and extract the web. Pay per call, no account, no monthly minimum. WebLens gets pages for AI agents: a single URL as markdown, a whole site crawled, a site's URL list from its sitemap, or structured JSON pulled out of any page. Paid endpoints settle over the x402 protocol (USDC on Base or Solana) — no accounts, no API keys. ## What It Costs | Job | Endpoint | Price | |-----|----------|-------| | One page as markdown | POST /fetch/basic | $0.002 | | Whole site, crawled | POST /crawl | $0.0015/page | | A site's URLs (sitemap) | POST /map | $0.004 | | Many pages at once | POST /batch/fetch | $0.0015/URL | | JavaScript-rendered page | POST /fetch/pro | $0.006 | | Structured JSON from a page | POST /extract | $0.03 | | Who owns a domain + its stack | POST /domain | $0.005 | | What a site is built on | POST /tech | $0.005 | | Is this package safe to use | POST /package | $0.003 | | What HN said about a topic | POST /discussions | $0.004 | | Is this project legit (off-chain) | POST /intel/project | $0.05 | Comparable search/scrape APIs bill $0.007-0.008 per request, or reach a lower per-page rate only on a ~$99/month plan. WebLens has no plan to commit to, and cached responses are another 70% off. ## Why Choose WebLens? - **Zero friction**: No accounts, API keys, or subscriptions - just pay per request - **Cheapest per page**: fetching and crawling run on Cloudflare's edge, and the price reflects it - **AI-optimized**: Designed for autonomous agents with structured outputs - **Instant settlement**: Payments settle on-chain in seconds (Base or Solana) - **No fees**: x402 protocol has 0 platform fees - **Discoverable**: Indexed in the PayAI facilitator discovery catalog; standard x402 discovery at /.well-known/x402 and OpenAPI at /openapi.json ## Try It Now (Zero-Friction Reader) Fetch any webpage as markdown with a single GET request — no auth, no payment, no setup: GET https://api.weblens.dev/r/https://example.com GET https://api.weblens.dev/s/your+search+query Add ?format=text for plain output. Rate limited to 10/hour. Reader: content truncated to 2000 chars. Search: max 3 results. Upgrade to paid endpoints for full content and more results. ## Preview Before You Pay (Free) Don't guess whether an endpoint is worth its price — ask: POST /preview {"endpoint": "/answer"} Free (rate limited to 10/hour), and it returns the live price for that endpoint, a one-line summary, and a recorded `sample` showing the exact response shape you would get. LIVE vs RECORDED — the rule: - Endpoints whose marginal cost is a plain fetch (/fetch/basic, /contents, /map) can also run a REAL truncated preview: pass a `url` and you get back a `live` block with the first 500 characters of the actual result. `livePreviewAvailable` is true for exactly these. - Every other endpoint is backed by a metered upstream (SerpAPI, Anthropic). Running those free would burn upstream credits, so they never run live — you get the recorded sample instead, which still shows every field name and type. Unknown or unsold endpoint → 404. ## ERC-8004 (Trustless Agents) — Off-Chain Surfaces WebLens hosts the OFF-CHAIN half of ERC-8004, which is what a service operator can run without deploying a contract. WebLens is NOT registered on-chain, holds no agent id, and writes nothing to any registry. #### GET /.well-known/agent-registration.json The ERC-8004 registration document (type `…eip-8004#registration-v1`): name, description, image, services, active, x402Support, payment info, and the feedback endpoints. `registrations` is empty because there is no on-chain registration; `supportedTrust` is ["feedback"]. (Free) #### GET /receipts/{requestId} The receipt for a paid call — your payment evidence. Every paid response returns `X-Receipt-Id` and `X-Receipt-Url` headers pointing at it. Kept 30 days. (Free) - Returns: `{"type": "weblens-call-receipt-v1", "requestId", "endpoint", "method", "status", "outcome", "price?", "currency", "paymentMethod", "network", "payTo", "servedAt", "mac?", "keyId?", "alg?"}` - `mac` is a symmetric HMAC tag (same construction as proof-of-context): only a key holder can verify it. It is NOT a third-party-verifiable signature — do not treat it as one. #### POST /feedback Host a feedback document YOU author, and get back the pair `giveFeedback()` wants. WebLens stores it verbatim and never edits or authors it; you post giveFeedback() yourself. (Free, rate limited) - Body must include: `agentRegistry`, `agentId`, `clientAddress`, `createdAt`, `value`, `valueDecimals` (optional: `tag1`, `tag2`, `endpoint`, `proofOfPayment`, …) - Returns 201: `{"feedbackURI", "feedbackHash", "storedAt", "hashAlgorithm": "keccak256", "note", "requestId"}` - Missing a required field → 400 naming exactly which ones. - Limits: body ≤ 256KB (413 past that), nesting ≤ 32 levels. Unknown fields are kept — they are part of what gets hashed. #### GET /feedback/{id} Serves the stored document byte-for-byte, so keccak-256 of the response equals the `feedbackHash` you were given. This URL is the `feedbackURI`. (Free) ## Quick Start for AI Agents 0. Free evaluation: POST /preview {"endpoint": "/answer"} — see the price and response shape first 1. Try the free reader: GET /r/https://example.com (no wallet needed!) 2. For full access, call any paid endpoint (e.g., POST /fetch/basic with {"url": "https://example.com"}) 3. Receive 402 Payment Required — read the PAYMENT-REQUIRED response header (base64-encoded JSON) for amount, asset, payTo and accepts 4. Sign USDC payment using your wallet (Base network) 5. Retry with the Payment-Signature header containing the signed payload 6. Receive data; settlement receipt is in the PAYMENT-RESPONSE response header ## Discovery Endpoints - GET /r/{url} - Zero-friction reader (free, no auth needed) - GET /s/{query} - Zero-friction search (free, no auth needed) - POST /preview - Price + real response sample for any paid endpoint, before you pay (free) - GET /discovery - Full service catalog with all endpoints, pricing, and capabilities - GET /.well-known/x402 - Standard x402 discovery for Bazaar indexing - GET /.well-known/agent-registration.json - ERC-8004 registration document (off-chain) - GET /receipts/{requestId} - Receipt for a paid call (free) - POST /feedback, GET /feedback/{id} - Host/serve an ERC-8004 feedback document (free) - GET /mcp/info - MCP server information for AI agent integration ## API Base URL - Production: https://api.weblens.dev - Documentation: https://api.weblens.dev/docs - OpenAPI Spec: https://api.weblens.dev/openapi.json - Discovery: https://api.weblens.dev/discovery ## Payment Protocol All paid endpoints use [x402 v2](https://x402.org) micropayments: 1. Make a request to any endpoint 2. Receive `402 Payment Required` — payment details are in the `PAYMENT-REQUIRED` response header (base64-encoded JSON; body is empty) 3. Sign a USDC payment with your wallet (Base network) 4. Retry the request with the `Payment-Signature` header containing the signed payload 5. Receive the response with a `PAYMENT-RESPONSE` header (settlement proof) Supported networks: Base (mainnet), Base Sepolia (testnet) Token: USDC ## Endpoints ### Core Endpoints #### POST /fetch/basic Fetch and convert any webpage to clean markdown. Fast, no JavaScript rendering. - Price: $0.002 - Body: `{"url": "string", "timeout?": number, "cache?": boolean}` - Returns: `{"url", "title", "content", "metadata", "fetchedAt", "requestId"}` #### POST /fetch/pro Fetch webpage with full JavaScript rendering. Use for SPAs and dynamic content. - Price: $0.006 - Body: `{"url": "string", "waitFor?": "string", "timeout?": number}` - Returns: `{"url", "title", "content", "metadata", "tier", "fetchedAt", "requestId"}` #### POST /screenshot Capture a screenshot of any webpage. Returns base64 PNG. - Price: $0.008 - Body: `{"url": "string", "viewport?": {"width": number, "height": number}, "fullPage?": boolean, "selector?": "string"}` - Returns: `{"url", "image", "dimensions", "capturedAt", "requestId"}` #### POST /batch/fetch Fetch multiple URLs in parallel. Efficient for bulk operations. - Price: $0.0015 per URL (2-20 URLs) - Body: `{"urls": ["string"], "tier?": "basic"|"pro", "timeout?": number}` - Returns: `{"results": [...], "summary", "totalPrice", "requestId"}` #### POST /fetch/resilient Resilient fetch with automatic fallback: plain fetch first, then headless Chromium (JS rendering) when that fails. Best-effort retrieval in one call. - Price: $0.008 - Body: `{"url": "string", "timeout?": number}` - Returns: `{"url", "content", "provider": {"id", "name"}, "tier", "fetchedAt", "requestId"}` #### POST /contents Cheap bulk page text: fetch 1-20 URLs and get clean markdown, truncated to a per-page cap. - Price: $0.0015 per URL (1-20 URLs) - Body: `{"urls": ["string"], "maxChars?": number, "timeout?": number}` - Returns: `{"results": [{"url", "status", "title", "content", "truncated", "error?"}], "summary": {"total", "successful", "failed"}, "fetchedAt", "requestId"}` #### POST /map Discover a site's URLs without fetching page content: robots.txt Sitemap: directives, then sitemap.xml and nested sitemap indexes, falling back to homepage link extraction. - Price: $0.004 - Body: `{"url": "string", "limit?": number (1-5000, default 1000), "include?": ["string"], "exclude?": ["string"], "timeout?": number}` - Returns: `{"url", "urls": ["string"], "total", "source": "sitemap"|"links"|"none", "sitemapsChecked", "mappedAt", "requestId"}` #### POST /domain Everything about a domain in one call — registration, DNS, and what they imply. Replaces an RDAP lookup, five DNS queries, and the interpretation on top. Competitors sell this by the month (WhoisXML from $30/mo, BuiltWith's API from $495/mo); this is per call, no account. - Price: $0.005 - Body: `{"domain": "stripe.com"}` (a full URL works too — it is reduced to its hostname) - Returns: `{"domain", "registration": {"found","registrar","registeredAt","expiresAt","updatedAt","status","nameservers"}, "dns": {"A","AAAA","MX","NS","TXT"}, "email": {"provider","hasSpf","hasDmarc","dmarcPolicy"}, "hosting": {"dnsProvider"}, "stack": ["string"], "signals": ["string"], "ageDays", "expiresInDays", "inspectedAt", "requestId"}` - `stack` names the SaaS vendors the domain's own TXT verification tokens reveal (Google Workspace, Microsoft 365, Salesforce, Atlassian, DocuSign, Okta, …). - `signals` are the risk flags worth acting on: `newly-registered` (<90 days), `expiring-soon`, `expired`, `no-registrar-lock`, `no-spf`, `no-dmarc`, `dmarc-monitor-only`, `no-mx`. - Try it free first: `POST /preview {"endpoint": "/domain", "domain": "stripe.com"}` runs a real lookup and returns the counts. #### POST /intel/project Off-chain due diligence on a project's web presence — the half an on-chain rug checker cannot see. Built for agents doing token/project diligence: on-chain tools read the contract, this reads the web. - Price: $0.05 - Body: `{"domain": "example.org", "tokenAddress?": "0x…", "chain?": "base"}` - Returns: `{"project", "domain", "site", "content", "crossCheck?", "signals", "risk": {"score","grade","summary"}, "disclaimer", "auditedAt", "requestId"}` - The signal nothing on-chain can give you: pass `tokenAddress` and it checks whether that address actually appears on the project's own site. If it does not, but OTHER addresses do, you get `contract-mismatch` — a strong impersonation/clone signal. - Other signals: `very-new-domain` (<30d), `newly-registered-domain` (<90d), `site-unreachable`, `no-team-page`, `no-whitepaper`, `no-docs`, `no-socials`, `no-github`, `templated-site`, `domain-expires-soon`, `no-registrar-lock`. - **Reads nothing on-chain.** No contract code, liquidity, ownership or holder data. Pair it with a contract checker — neither half is sufficient alone. - Try it free: `POST /preview {"endpoint": "/intel/project", "domain": "example.org"}` returns the grade. #### POST /tech What a site is built and run on, from one fetch — framework, CMS, ecommerce platform, CDN, analytics, payments, support widgets, web server. The other half of what BuiltWith gates behind $295/mo; `/domain` covers the DNS-derived half. - Price: $0.005 - Body: `{"url": "https://example.com"}` - Returns: `{"url", "finalUrl", "status", "server", "poweredBy", "generator", "technologies": [{"name","category","evidence"}], "categories": {...}, "detectedAt", "requestId"}` - Every detection carries its `evidence` — the header line or HTML marker that matched — so you can judge the heuristic instead of trusting it. - Try it free: `POST /preview {"endpoint": "/tech", "url": "https://example.com"}` #### POST /package Should you depend on this package? npm or PyPI, one call. - Price: $0.003 - Body: `{"name": "express", "registry?": "npm"|"pypi"}` - Returns: `{"name","registry","found","version","license","repository","deprecated","deprecationReason","downloads":{"lastWeek","lastMonth"},"maintenance":{"lastPublishedAt","daysSinceRelease","maintainers","scores"},"dependencies","signals","checkedAt","requestId"}` - `signals`: `deprecated`, `no-recent-release` (>2 years), `no-license`, `single-maintainer`, `no-public-repository`. - PyPI returns metadata and maintenance but NOT download counts — the only free source rate-limits anonymous callers, so the field is absent rather than unreliable. #### POST /discussions What Hacker News said about a topic, with the aggregates that turn a hit list into an answer. - Price: $0.004 - Body: `{"query": "cloudflare workers", "limit?": 1-50 (default 10), "sort?": "relevance"|"recent"}` - Returns: `{"query","source","sort","stories":[{"title","url","points","comments","author","postedAt","discussionUrl"}],"summary":{"totalMatches","returned","pointsReturned","commentsReturned","topDomains","firstSeen","lastSeen"},"discussedAt","requestId"}` - `pointsReturned`/`commentsReturned` sum the returned stories only; `totalMatches` is HN's full count. #### POST /crawl Bounded same-host BFS crawl returning clean markdown for every page in ONE synchronous call — no async job, no polling. robots.txt honoured by default (403 FORBIDDEN if it disallows the start URL). - Price: $0.0015 per requested page (1-25) — billed on the page budget you request (`limit`), not on pages actually returned - Body: `{"url": "string", "limit?": number (1-25, default 10), "maxDepth?": number (0-3, default 2), "include?": ["string"], "exclude?": ["string"], "respectRobots?": boolean (default true), "maxChars?": number (500-50000, default 8000), "timeout?": number}` - Returns: `{"url", "pages": [{"url", "depth", "status", "title?", "content?", "truncated?", "error?"}], "summary": {"crawled", "successful", "failed", "discovered", "limit", "maxDepth", "robotsRespected"}, "crawledAt", "requestId"}` ### Search & Research #### POST /search Real-time web search. Returns titles, URLs, and snippets. Set includeContent to also fetch the top result pages as markdown in the same call. - Price: $0.015 base + contentResults x $0.0015 when includeContent is set - Body: `{"query": "string", "limit?": number, "includeContent?": boolean, "contentResults?": number (1-10, default 5), "contentChars?": number (500-20000, default 8000)}` - Returns: `{"query", "results": [{"title", "url", "snippet", "content?", "contentTruncated?"}], "searchedAt", "requestId"}` #### POST /search/news Real-time news search via Google News with source, date, and thumbnail. - Price: $0.015 - Body: `{"query": "string", "limit?": number}` - Returns: `{"query", "results": [{"position", "title", "url", "source", "date", "isoDate", "thumbnail"}], "searchedAt", "requestId"}` #### POST /search/images Google Images search with direct image URLs, dimensions, and source pages. - Price: $0.015 - Body: `{"query": "string", "limit?": number}` - Returns: `{"query", "results": [{"position", "title", "imageUrl", "thumbnail", "sourcePage", "source", "width", "height"}], "searchedAt", "requestId"}` #### POST /search/places Local business search via Google Local: ratings, reviews, phone, website, coordinates. - Price: $0.045 - Body: `{"query": "string", "location?": "string", "limit?": number}` - Returns: `{"query", "results": [{"position", "name", "address", "rating", "reviews", "priceLevel", "category", "phone", "website", "placeId", "coordinates"}], "searchedAt", "requestId"}` #### POST /search/shopping Google Shopping product search with prices, sellers, and ratings. - Price: $0.015 - Body: `{"query": "string", "limit?": number}` - Returns: `{"query", "results": [{"position", "title", "url", "price", "extractedPrice", "source", "rating", "reviews", "thumbnail"}], "searchedAt", "requestId"}` #### POST /search/scholar Google Scholar academic search with publication info and citation counts. - Price: $0.015 - Body: `{"query": "string", "limit?": number}` - Returns: `{"query", "results": [{"position", "title", "url", "snippet", "publicationInfo", "citedBy"}], "searchedAt", "requestId"}` #### POST /search/autocomplete Google Autocomplete suggestions for a partial query — keyword research and intent discovery. - Price: $0.015 - Body: `{"query": "string", "limit?": number}` - Returns: `{"query", "suggestions": ["string"], "searchedAt", "requestId"}` #### POST /search/trends Google Trends interest-over-time timeline for a query. - Price: $0.015 - Body: `{"query": "string"}` - Returns: `{"query", "timeline": [{"date", "timestamp", "values": [{"query", "value"}]}], "searchedAt", "requestId"}` #### POST /answer Grounded answer with inline [n] citations: searches the web, fetches sources, and answers strictly from them. - Price: $0.05 - Body: `{"query": "string", "sources?": number (1-5, default 3)}` - Returns: `{"query", "answer", "citations": [{"index", "url", "title"}], "confidence?", "answeredAt", "requestId"}` #### POST /research One-stop research: searches web, fetches top results, generates AI summary with key findings. - Price: $0.08 - Body: `{"query": "string", "resultCount?": number, "includeRawContent?": boolean}` - Returns: `{"query", "sources", "summary", "keyFindings", "researchedAt", "requestId"}` #### POST /research/deep Multi-step cited research in ONE synchronous call: plans sub-questions, runs a web search per sub-question, fetches and dedupes sources across them, then synthesizes an answer with inline [n] citations, key findings, and gaps. - Price: $0.20 standard (3 sub-questions, 8 sources) / $0.35 deep (5 sub-questions, 12 sources) - Body: `{"query": "string (1-500 chars)", "depth?": "standard"|"deep" (default standard)}` - Returns: `{"query", "depth", "subQuestions": ["string"], "answer", "keyFindings": ["string"], "citations": [{"index", "url", "title", "subQuestion"}], "gaps": ["string"], "sourcesFetched", "researchedAt", "requestId"}` - **SLOW — set a generous HTTP timeout.** A standard run takes roughly 30-60 seconds (measured ~35s); deep takes longer. 120s client timeout recommended. Do not retry on client timeout — you would pay twice. - vs /research ($0.08): /research runs ONE search and returns a prose summary; /research/deep decomposes the question into sub-questions, searches each, and cites every claim inline with [n] markers you can resolve via the citations array. ### Social Data #### POST /social/youtube/transcript Full transcript of any YouTube video with timestamps. Accepts a video ID or any YouTube URL (watch, shorts, youtu.be). - Price: $0.03 - Body: `{"videoId": "string (ID or URL)", "lang?": "string"}` - Returns: `{"videoId", "language?", "segments": [{"startMs", "startTime", "text"}], "fullText", "fetchedAt", "requestId"}` ### Data Extraction #### POST /extract Extract structured data from webpages using JSON schema. - Price: $0.03 - Body: `{"url": "string", "schema": object, "instructions?": "string"}` - Returns: `{"url", "data", "extractedAt", "requestId"}` #### POST /extract/smart AI-powered data extraction using natural language. Just describe what you want. - Price: $0.035 - Body: `{"url": "string", "query": "string", "format?": "json"|"text"}` - Returns: `{"url", "query", "data", "explanation", "extractedAt", "requestId"}` #### POST /pdf Extract text and metadata from PDF documents. - Price: $0.004 - Body: `{"url": "string", "pages?": [number]}` - Returns: `{"url", "metadata", "pages", "fullText", "extractedAt", "requestId"}` #### POST /compare Compare 2-3 webpages with AI-generated analysis of similarities and differences. - Price: $0.05 - Body: `{"urls": ["string"], "focus?": "string"}` - Returns: `{"sources", "comparison": {"summary", "similarities", "differences"}, "comparedAt", "requestId"}` ### Monitoring #### POST /monitor/create Create a URL monitor for change detection. - Price: $0.01 - Body: `{"url": "string", "webhookUrl": "string", "checkInterval?": number, "notifyOn?": "any"|"content"|"status"}` - Returns: `{"monitorId", "url", "webhookUrl", "checkInterval", "nextCheckAt", "createdAt", "requestId"}` #### GET /monitor/{id} Get monitor status and history. (Free) - Returns: `{"monitorId", "url", "webhookUrl", "checkInterval", "status", "lastCheck", "nextCheckAt", "requestId"}` #### DELETE /monitor/{id} Delete a monitor. (Free) - Returns: `{"monitorId", "deleted", "requestId"}` ### Intelligence (AI-powered, premium) These endpoints chain multiple tools and AI synthesis. They're the highest-value services on the platform. #### POST /intel/company Comprehensive company deep dive: tech stack, funding, team, competitors, recent news. Chains search + batch fetch + Claude. - Price: $1.00 - Body: `{"target": "string"}` (company name or domain) - Returns: `{"name", "domain", "funding", "summary", "requestId"}` #### POST /intel/market Market research report: executive summary, market size, growth, key trends, key players, recommendations. - Price: $5.00 - Body: `{"topic": "string", "depth?": "quick"|"standard"|"comprehensive", "focus?": "string"}` - Returns: `{"topic", "executiveSummary", "marketSize", "growthRate", "keyTrends", "keyPlayers", "recommendations", "requestId"}` #### POST /intel/competitive Competitive analysis: feature matrix, pricing comparison, SWOT, positioning. - Price: $8.00 - Body: `{"company": "string", "maxCompetitors?": number, "focus?": "string"}` - Returns: `{"company", "competitors", "featureMatrix", "pricing", "swot", "positioning", "requestId"}` #### POST /intel/site-audit Full site audit: SEO, performance, security, accessibility scoring with actionable recommendations. - Price: $0.75 - Body: `{"url": "string"}` - Returns: `{"url", "scores": {"seo", "performance", "security", "accessibility"}, "issues", "recommendations", "requestId"}` ### Memory (Key-Value Storage) #### POST /memory/set Store a value in persistent key-value storage. - Price: $0.001 - Body: `{"key": "string", "value": any, "ttl?": number}` - Returns: `{"key", "stored", "expiresAt", "requestId"}` #### GET /memory/get?key={key} Retrieve a stored value by key. Requires wallet auth. - Returns: `{"key", "value", "storedAt", "expiresAt", "requestId"}` #### GET /memory/list List all stored keys for the authenticated wallet. - Returns: `{"keys": ["string"], "count", "requestId"}` #### DELETE /memory/delete?key={key} Delete a stored value. Requires wallet auth. - Returns: `{"key", "deleted", "requestId"}` ### System #### GET / API information and documentation links. (Free) #### GET /health Health check endpoint. (Free) - Returns: `{"status", "version", "timestamp"}` #### GET /docs Interactive API documentation (Scalar UI). (Free) #### GET /openapi.json OpenAPI 3.0 specification. (Free) #### POST /mcp Model Context Protocol endpoint for AI agents. Supports JSON-RPC with tools/list and tools/call methods. - Free (tool calls are paid per-endpoint) #### GET /mcp/info MCP server information including available tools and pricing. (Free) ## MCP Integration For AI agents using Model Context Protocol: ### Remote HTTP (no install) ```json { "mcpServers": { "weblens": { "url": "https://api.weblens.dev/mcp" } } } ``` ### Local with auto-payment ```json { "mcpServers": { "weblens": { "command": "npx", "args": ["-y", "@weblens/mcp"], "env": { "PRIVATE_KEY": "0xYourPrivateKeyHere" } } } } ``` ## Available MCP Tools - `preview_endpoint` - Price + real response sample for any paid endpoint, before paying — free - `fetch_webpage` - Fetch webpage as markdown (basic) — $0.002 - `fetch_webpage_pro` - Fetch with JS rendering — $0.006 - `fetch_resilient` - Resilient fetch with provider fallback — $0.008 - `screenshot` - Capture webpage screenshot — $0.008 - `search_web` - Real-time web search (optional page content) — $0.015 - `search_news` - Google News search — $0.015 - `search_images` - Google Images search — $0.015 - `search_places` - Local business search (Google Local) — $0.045 - `search_shopping` - Google Shopping product search — $0.015 - `search_scholar` - Google Scholar academic search — $0.015 - `search_autocomplete` - Query autocomplete suggestions — $0.015 - `search_trends` - Google Trends interest over time — $0.015 - `youtube_transcript` - YouTube video transcript with timestamps — $0.03 - `get_contents` - Bulk page contents (1-20 URLs) — $0.0015/URL - `answer_question` - Grounded answer with citations — $0.05 - `extract_data` - Extract structured data with JSON schema — $0.03 - `smart_extract` - AI-powered natural-language extraction — $0.035 - `research` - Search + fetch + AI summary — $0.08 - `deep_research` - Multi-step cited research (sub-questions + inline [n] citations; 30-60s) — $0.20 standard / $0.35 deep - `batch_fetch` - Fetch multiple URLs in parallel — $0.0015/URL - `map_site` - Discover a site's URLs via sitemap/robots/links — $0.004 - `crawl_site` - Bounded same-host crawl to markdown (1-25 pages) — $0.0015/requested page - `extract_pdf` - Extract text from PDFs — $0.004 - `compare_urls` - Compare 2-3 webpages — $0.05 - `monitor_create` - Create URL change monitor — $0.01 - `memory_set` - Persistent key-value storage — $0.001 - `intel_company` - Company deep dive (AI-powered) — $1.00 - `intel_market` - Market research report — $5.00 - `intel_competitive` - Competitive analysis — $8.00 - `intel_site_audit` - SEO/performance/security audit — $0.75 ### Agent Credits (Prepaid) Bypass per-request x402 signatures by pre-funding an account. #### POST /credits/buy Purchase credits with x402. Pay $2-$1000; deposit bonuses: 20% at $10+, 30% at $50+, 40% at $100+. - Body: `{"amount": 10}` (USD, number, 2-1000) #### GET /credits/balance Check current credit balance. - Header: `X-CREDIT-WALLET`: Your wallet address - Header: `X-CREDIT-SIGNATURE`: Signature of "WebLens Auth..." message #### GET /dashboard Human-friendly UI to manage credits and view history. ## Response Headers All responses include: - `X-Request-Id` - Unique request identifier - `X-Processing-Time` - Processing time in milliseconds - `PAYMENT-RESPONSE` - Settlement proof (on a successful paid response) - `X-Receipt-Id` / `X-Receipt-Url` - Receipt for a paid call, fetchable at GET /receipts/{requestId} for 30 days ## Error Handling Errors return JSON with: ```json { "error": "Error type", "code": "ERROR_CODE", "message": "Human-readable message", "requestId": "uuid" } ``` ## Cache Discount Cached responses are 70% cheaper than fresh fetches. Use `cache: true` in fetch requests. ## Links - Website: https://api.weblens.dev - Documentation: https://api.weblens.dev/docs - x402 Protocol: https://x402.org