Repository avatar
Other Tools
v1.4.0
active

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, USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913): 0xe4c8739bCC488bD98978CE976511735e0499d432
  • Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v): 89XqpaJDKajhYFs4Vmex853yxoEU7HqwnMAPtTDpgZgG
  • PayAI Solana Fee Payer: CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww (auto-refreshed & cached from /supported)

Endpoints

Free Discovery (HTTP 200)

MethodPathPurpose
GET/JSON & HTML API directory, pricing table, wallet info, and client snippets
GET/healthLive service health + PayAI Facilitator /supported connectivity check
GET/.well-known/x402Standard machine-readable x402 Bazaar / x402scan.com discovery manifest
GET/favicon.icoBinary 16x16 32-bit RGBA ICO (image/x-icon; vector SVG remains at /icon.svg)
GET/openapi.jsonOpenAPI 3.1.0 schema with x-payment-info metadata, contact info, and JSON schemas (22/22 paths)
GET/llms.txtStandard llmstxt.org concise plain-text AI-agent catalog with pricing, schemas, and curl examples
GET/mcpStreamable HTTP MCP server info, 17-tool catalog summary, and ready-to-paste claude_desktop_config snippet
POST/mcpNative 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)

MethodPathPriceAtomic USDCCapabilities
POST/api/v1/csv-clean$0.0110000Strips 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.0110000SSRF-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.0055000Deterministic 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.0033000Fast 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.0055000Repairs 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.0033000SSRF-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.0022000Parallel 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.0022000Keyless 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.0022000Keyless 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.003300060s-cached DeFiLlama yield pool rankings filtered by chain, symbol, stablecoin flag, and minimum TVL, sorted by APY descending
POST/api/v1/prompt-guard$0.0022000Deterministic 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.0055000SSRF-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.0022000Keyless 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.0022000Keyless 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.0055000Parses 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.0033000Parallel 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.0033000Parallel 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 402 responses with Base64-encoded PAYMENT-REQUIRED header and matching JSON body (x402Version: 2, accepts[].amount, CAIP-2 networks eip155:8453 and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, EIP-3009 USDC extra: { name: "USD Coin", version: "2" }, Solana extra: { feePayer }, and extensions.bazaar discovery metadata).
  • Accepts both PAYMENT-SIGNATURE (v2) and X-PAYMENT (v1/v2) headers, verifies with POST https://facilitator.payai.network/verify, runs the handler, and only calls POST https://facilitator.payai.network/settle when the handler returns 2xx (never charging callers on invalid inputs or blocked/unreachable URLs).
  • Returns Base64 settlement receipts in both PAYMENT-RESPONSE and X-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

  1. Deploy the worker to your public HTTPS domain (e.g., https://x402-data-worker.<subdomain>.workers.dev).
  2. Verify GET /health shows "status": "ok", GET /llms.txt lists all 17 paid endpoints, and GET /.well-known/x402 lists all 17 paid resource URLs.
  3. Submit your base origin or each paid endpoint URL on https://www.x402scan.com (and/or complete a single real $0.005–$0.01 test payment through PayAI Facilitator so PayAI Bazaar automatically indexes the extensions.bazaar metadata!).

No installation packages available.