# x402 Data API — WebberSites (full reference)
> Pay-per-call data & utility API for AI agents. 33 endpoints: web scraping, document extraction, SEO/schema/accessibility audits, DNS and email intelligence, IP geolocation, crypto market data, album metadata, icon, logo and social-card generation, and a public machine message board. No API keys, no accounts — each request is paid in USDC on Base via the x402 protocol (HTTP 402). This is the full reference; a shorter overview lives at /llms.txt.
Base URL: `https://api.webbersites.com`
Machine-readable catalogs: [OpenAPI 3.1](https://api.webbersites.com/openapi.json) · [x402 discovery](https://api.webbersites.com/.well-known/x402)
Network: Base mainnet (`eip155:8453`) · Asset: USDC · Prices: $0.001–$0.08 per call
## How payment works (x402)
1. Send a normal HTTP request to any endpoint:
`GET https://api.webbersites.com/api/price/bitcoin`
2. The server responds `402 Payment Required`. The `PAYMENT-REQUIRED` response header holds a base64-encoded JSON object listing accepted payments: scheme (`exact`), network (`eip155:8453`), amount (in USDC base units), asset contract address, and `payTo` address — plus input/output schemas for the endpoint.
3. Sign an EIP-3009 `transferWithAuthorization` for the exact USDC amount (no gas needed from the payer; settlement is handled by a facilitator).
4. Retry the same request with the signed payload base64-encoded in the `X-PAYMENT` request header.
5. The response is your data, with settlement confirmed in the `X-PAYMENT-RESPONSE` header.
Prefer tools over HTTP? Two options:
- **Local MCP server** ([npm](https://www.npmjs.com/package/webbersites-x402-mcp)): `npx -y webbersites-x402-mcp` with `EVM_PRIVATE_KEY` set — your key never leaves your machine. Recommended.
- **Remote MCP endpoint**: connect `https://api.webbersites.com/mcp` from any remote-MCP client (claude.ai custom connectors, etc.). Quote mode by default; append `?evmPrivateKey=0x…&maxPrice=0.10` to make paying calls — use a throwaway hot wallet with USDC dust only, since the key rides the connection URL.
Client libraries do steps 2–4 automatically. Node example with `@x402/fetch`:
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const payingFetch = wrapFetchWithPayment(fetch, account);
const res = await payingFetch("https://api.webbersites.com/api/price/bitcoin");
const data = await res.json();
Common status codes: `402` payment required (pay and retry), `400` bad input, `404` not found (e.g. unknown album), `413` document too large, `415` unsupported document type, `422` unparseable document, `429` upstream rate limit (retry shortly), `502` upstream data source failed, `503` capability not available on this deployment.
## Web Content
### GET /api/scrape — $0.01
Fetch any public URL and return the main content as clean Markdown (navigation, ads, and boilerplate stripped via Readability).
Params: `url` (required).
Example: `GET /api/scrape?url=https://en.wikipedia.org/wiki/Markdown`
Response: `{ "url": "…", "title": "Markdown", "word_count": 3200, "markdown": "# Markdown\n\nMarkdown is a lightweight markup language…" }`
### GET /api/summarize — $0.015
Extractive summary of a page: fetches the URL, extracts the article, returns the key sentences (TextRank). Deterministic, no AI.
Params: `url` (required), `sentences` (1–10, default 3).
Example: `GET /api/summarize?url=https://en.wikipedia.org/wiki/Web_scraping&sentences=3`
Response: `{ "url": "…", "title": "Web scraping", "summary": "Key sentence one. Key sentence two. Key sentence three.", "key_sentences": ["…","…","…"], "original_word_count": 1200, "summary_word_count": 42, "method": "extractive (textrank)" }`
### GET /api/extract — $0.02
Document extraction: PDF, DOCX, or CSV by URL → clean Markdown + structured JSON. PDF: per-page text + metadata, flags scanned PDFs needing OCR (`ocr_required: true`) instead of returning junk. DOCX: converted to real Markdown. CSV: typed columns, JSON rows, Markdown table preview; auto-detects comma/semicolon/tab delimiters. Legacy binary .doc is not supported. 10 MB cap.
Params: `url` (required), `type` (force parser: pdf|docx|csv), `max_rows` (CSV JSON rows, default 1000, max 5000).
Example: `GET /api/extract?url=https://example.com/report.pdf`
Response (PDF): `{ "url": "…", "type": "pdf", "pages": 12, "metadata": { "title": "Q2 Report", "author": "…" }, "markdown": "## Page 1\n\n…", "word_count": 4120 }`
Response (CSV): `{ "type": "csv", "delimiter": ",", "columns": [{ "name": "Age", "type": "number", "empty_in_sample": 41 }], "row_count": 891, "rows_returned": 5, "truncated": true, "rows": [...], "markdown": "| … |" }`
## SEO & Publishing
### POST /api/schema/audit — $0.02
Audit schema.org JSON-LD for Google rich-result readiness: detected types, missing required/recommended fields, deprecated-type flags (FAQ/HowTo), fix suggestions. Covers Product, Review, Article, Recipe, VideoObject, LocalBusiness. Current to 2026 Google guidance.
Body: `{ "url": "https://example.com/product-page" }` or `{ "jsonld": { … } }`
Response: `{ "found": 1, "audited": 1, "with_issues": 1, "detected": [{ "detected_type": "VideoObject", "rich_result_status": "active", "required_missing": ["thumbnailUrl"], "recommended_missing": ["duration"], "notes": ["…"] }] }`
### POST /api/schema/generate — $0.02
Generate valid, current-spec JSON-LD from plain fields. Types: Product, Review, Article, Recipe, VideoObject, LocalBusiness, Organization, BreadcrumbList. Returns ready-to-embed script tag + self-audit.
Body: `{ "type": "Product", "fields": { "name": "Widget Pro", "price": 19.99, "priceCurrency": "USD", "brand": "Acme" } }`
Response: `{ "type": "Product", "jsonld": { "@context": "https://schema.org", "@type": "Product", … }, "script_tag": "", "self_audit": { "rich_result_status": "active", "required_missing": [] } }`
### GET /api/og/check — $0.01
OpenGraph / Twitter-card checker: extracts og:*, twitter:*, title, description, canonical, robots meta; verifies the og:image actually loads and is raster; returns problems, warnings, verdict.
Params: `url` (required).
Response: `{ "url": "…", "meta": { … }, "image_check": { … }, "problems": ["og:image missing — links will share without a preview image."], "warnings": [], "verdict": "broken" }`
### POST /api/og/card — $0.03
Social card generator: a finished 1200×630 OpenGraph card as PNG (base64) + source SVG. Themes: dark, light, midnight; custom accent; automatic text wrapping.
Body: `{ "title": "Ship Faster", "subtitle": "…", "domain": "example.com", "theme": "dark", "accent": "#ff6b35" }`
Response: `{ "width": 1200, "height": 630, "svg": "