
x402-data-worker
io.github.devbox-zero-ops/x402-data-worker
17 pay-per-call x402 USDC tools (Base/Solana): web/CSV/JSON, crypto OHLCV/DeFi, wallets, YT, DNS
Documentation
x402 Data & Web Extraction API (x402-data-worker)
Zero-KYC, zero-dependency, 24/7 x402 pay-per-call API + native Streamable HTTP MCP Server (v1.4.0, 17 paid USDC routes + free GET /llms.txt & GET/POST /mcp, 22 OpenAPI paths) for deterministic CSV/JSON cleaning, SSRF-safe HTML table/metadata/SEO/security site audits, prompt-injection & leaked-secret scanning, HTML-to-Markdown conversion, RSS/Atom-to-JSON normalization, multi-venue crypto spot/OHLCV/L2 orderbook analytics, DeFiLlama yield rankings, multi-chain EVM & Solana wallet balances, YouTube transcripts, DNS/SPF/DMARC domain intel, and GitHub repo analytics. Settled directly in Base USDC (eip155:8453) and Solana USDC (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) via https://facilitator.payai.network.
Live Production Origin: https://x402-data-worker.onrender.com · Indexed on x402scan.com & 402directory.com.
Compatible with Cloudflare Workers, Vercel Edge Functions, and Node.js 20+ (npm start).
Self-Custody Settlement Configuration
- Facilitator:
https://facilitator.payai.network - Base Mainnet (
eip155:8453, USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913):0xe4c8739bCC488bD98978CE976511735e0499d432 - Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v):89XqpaJDKajhYFs4Vmex853yxoEU7HqwnMAPtTDpgZgG - PayAI Solana Fee Payer:
CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww(auto-refreshed & cached from/supported)
Endpoints
Free Discovery (HTTP 200)
| Method | Path | Purpose |
|---|---|---|
GET | / | JSON & HTML API directory, pricing table, wallet info, and client snippets |
GET | /health | Live service health + PayAI Facilitator /supported connectivity check |
GET | /.well-known/x402 | Standard machine-readable x402 Bazaar / x402scan.com discovery manifest |
GET | /favicon.ico | Binary 16x16 32-bit RGBA ICO (image/x-icon; vector SVG remains at /icon.svg) |
GET | /openapi.json | OpenAPI 3.1.0 schema with x-payment-info metadata, contact info, and JSON schemas (22/22 paths) |
GET | /llms.txt | Standard llmstxt.org concise plain-text AI-agent catalog with pricing, schemas, and curl examples |
GET | /mcp | Streamable HTTP MCP server info, 17-tool catalog summary, and ready-to-paste claude_desktop_config snippet |
POST | /mcp | Native Streamable HTTP MCP JSON-RPC 2.0 server (initialize, ping, tools/list free; tools/call settles via x402 USDC) |
Paid Pay-Per-Call (HTTP 402 when unpaid)
| Method | Path | Price | Atomic USDC | Capabilities |
|---|---|---|---|---|
POST | /api/v1/csv-clean | $0.01 | 10000 | Strips BOM, detects delimiter, repairs broken quotes, trims whitespace, normalizes dates (YYYY-MM-DD) & currency ($1,234.50 -> 1234.5), deduplicates rows, infers column schema |
GET | /api/v1/page-tables?url=... | $0.01 | 10000 | SSRF-safe public URL fetch, boilerplate-stripped LLM Markdown, all HTML <table> elements (with colspan/rowspan) as row objects, headings, canonical URL, meta description, JSON-LD, outbound links, and prompt_injection_check |
POST | /api/v1/html-to-markdown | $0.005 | 5000 | Deterministic HTML (or public URL) to structured Markdown + extracted emails, prices, dates, JSON-LD, headings, links, tables, and prompt_injection_check |
GET | /api/v1/url-meta?url=... | $0.003 | 3000 | Fast SSRF-safe URL unfurler: title, description, canonical, favicon, OpenGraph (og:*), Twitter Cards, RSS/Atom feed discovery, JSON-LD, and headings preview |
POST | /api/v1/json-normalize | $0.005 | 5000 | Repairs Markdown-fenced JSON, comments, trailing commas, and JSONL/NDJSON; flattens nested objects, coerces numbers/USD, deduplicates rows, infers schema, and emits CSV |
GET | /api/v1/rss-json?url=...&limit=25 | $0.003 | 3000 | SSRF-safe RSS 2.0, Atom 1.0, and JSON Feed parser with CDATA unwrap, ISO-8601 date normalization, and clean plain-text summaries |
GET | /api/v1/crypto-primary?symbol=BTC | $0.002 | 2000 | Parallel multi-venue spot price consensus across Coinbase Exchange, Kraken, and Binance Vision with median/mean USD, cross-venue spread (bps), bid/ask spread, and 24h volume |
GET | /api/v1/crypto-ohlcv?symbol=BTC&interval=1h&limit=24 | $0.002 | 2000 | Keyless OHLCV klines from Binance Vision (Coinbase Exchange fallback) plus deterministic sma_7, sma_20, rsi_14, atr_14, period return %, realized volatility %, high/low range, and trend |
GET | /api/v1/crypto-orderbook?symbol=BTC&depth=20&order_usd=10000 | $0.002 | 2000 | Keyless L2 order book from Binance Vision (Coinbase Exchange fallback) with spread (bps), USD depth, imbalance ratio, and exact buy/sell market-order slippage simulation |
GET | /api/v1/defi-yields?chain=Base&symbol=USDC&stablecoin_only=true&limit=20 | $0.003 | 3000 | 60s-cached DeFiLlama yield pool rankings filtered by chain, symbol, stablecoin flag, and minimum TVL, sorted by APY descending |
POST | /api/v1/prompt-guard | $0.002 | 2000 | Deterministic prompt-injection, role/delimiter hijack, invisible Unicode (\u200B/U+E0000), covert exfiltration, and leaked secret scanner with risk score and sanitized_text |
GET | /api/v1/site-audit?url=... | $0.005 | 5000 | SSRF-safe website SEO score (0-100), HTTP security headers score (HSTS, CSP, XFO, XCTO, Referrer-Policy), 15-tech stack fingerprinter, and built-in prompt_injection_check |
GET | /api/v1/evm-wallet?address=0x...&chain=base | $0.002 | 2000 | Keyless multi-chain EVM RPC wallet inspection (Base, Ethereum, Arbitrum, Optimism, Polygon): native ETH/POL balance, tx_count, contract bytecode check, and canonical USDC/USDT balances |
GET | /api/v1/solana-wallet?address=... | $0.002 | 2000 | Keyless Solana mainnet RPC wallet inspection: SOL balance, account owner/executable status, canonical USDC & USDT balances, non-zero SPL token count, and top 15 SPL holdings |
GET | /api/v1/youtube-transcript?url=...&lang=en | $0.005 | 5000 | Parses YouTube URLs/IDs, extracts balanced-JSON video metadata and best-match caption XML (<text> / <p>) into clean transcript text, timestamped segments, word count, and available languages |
GET | /api/v1/domain-intel?domain=cloudflare.com | $0.003 | 3000 | Parallel Cloudflare DoH queries (A/AAAA/MX/NS/TXT/_dmarc), SPF & DMARC parsing, DNS/email/hosting provider detection, and deterministic A–F email security grade with issues |
GET | /api/v1/github-repo?repo=coinbase/x402 | $0.003 | 3000 | Parallel GitHub public API queries for stars, forks, open issues, language breakdown %, latest release, license, topics, days since push, and deterministic 0-100 activity health score |
MCP Client Setup (mcpServers)
All 17 paid endpoints are natively exposed over MCP Streamable HTTP (protocolVersion: "2025-03-26", backwards-compatible with "2024-11-05") at https://x402-data-worker.onrender.com/mcp with zero runtime dependencies. Discovery (GET /mcp, initialize, notifications/initialized, ping, tools/list) is 100% free; paid tools/call executions support both @x402/mcp (params._meta["x402/payment"]) and standard HTTP headers (PAYMENT-SIGNATURE / X-PAYMENT).
Add to Claude Desktop, Cursor, Antigravity, or Codex (mcpServers):
{
"mcpServers": {
"x402-data-worker": {
"type": "http",
"url": "https://x402-data-worker.onrender.com/mcp"
}
}
}
Inspect all 17 tools for free via curl:
curl -s -X POST "https://x402-data-worker.onrender.com/mcp" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Protocol Details (Verified Live Against facilitator.payai.network)
- Emits canonical x402 v2
HTTP 402responses with Base64-encodedPAYMENT-REQUIREDheader and matching JSON body (x402Version: 2,accepts[].amount, CAIP-2 networkseip155:8453andsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, EIP-3009 USDCextra: { name: "USD Coin", version: "2" }, Solanaextra: { feePayer }, andextensions.bazaardiscovery metadata). - Accepts both
PAYMENT-SIGNATURE(v2) andX-PAYMENT(v1/v2) headers, verifies withPOST https://facilitator.payai.network/verify, runs the handler, and only callsPOST https://facilitator.payai.network/settlewhen the handler returns2xx(never charging callers on invalid inputs or blocked/unreachable URLs). - Returns Base64 settlement receipts in both
PAYMENT-RESPONSEandX-PAYMENT-RESPONSE.
Testing & Dry-Run
npm test
npx wrangler deploy --dry-run
Deployment
Cloudflare Workers (Zero-Cost Free Tier)
npx wrangler login
npx wrangler deploy
Vercel Edge
npx vercel --prod
Node.js Local / VPS Server
PORT=8787 npm start
Registering on x402scan / PayAI Bazaar
- Deploy the worker to your public HTTPS domain (e.g.,
https://x402-data-worker.<subdomain>.workers.dev). - Verify
GET /healthshows"status": "ok",GET /llms.txtlists all 17 paid endpoints, andGET /.well-known/x402lists all 17 paid resource URLs. - Submit your base origin or each paid endpoint URL on
https://www.x402scan.com(and/or complete a single real$0.005–$0.01test payment through PayAI Facilitator so PayAI Bazaar automatically indexes theextensions.bazaarmetadata!).
No installation packages available.