
x402-cluster
io.github.ianshelp/x402-cluster
Static & headless web scraping, HTML-to-JSON extraction & compliance checks ($0.01-$0.05/call).
Documentation
CheapScrape
Serverless Headless-Browser Scraping & Flat JSON Schema Extraction for AI Agents.
Powered by the x402 engine on Cloudflare Workers + Browser Run.
Zero local Docker bloat. Zero Chromium RAM leaks. $0.05 per run. Zero subscriptions.
- Live MCP Endpoint (Streamable HTTP):
https://x402-cluster.ian-944.workers.dev/v1/mcp.json - Direct API Execution:
https://x402-cluster.ian-944.workers.dev/v1/execute - Self-Serve Prepaid Keys ($10 for 1,000 calls): x402-site-6gt.pages.dev
- Official MCP Registry ID:
io.github.ianshelp/x402-cluster
⚡ Try It in 2 Seconds (Zero Auth, Zero Signup)
Run this right in your terminal. Test any public URL against any JSON schema for free:
curl -X POST https://x402-cluster.ian-944.workers.dev/v1/execute \
-H "Content-Type: application/json" \
-d '{
"tool": "preview_extract",
"url": "https://news.ycombinator.com",
"target_schema": { "top_story": "string", "points": "number" }
}'
Response (~1.5s):
{
"top_story": "<populated: string (48 chars)>",
"points": "<populated: number>",
"preview_token": "prev_7f8a9b2c..."
}
- Verifies that your target page was successfully rendered and extracted.
- Returns missing/blocked fields as
nulland populates types + character lengths. - Returns a 300-second
preview_token. When passed on your paid call, it returns the pinned snapshot immediately (~20ms latency) with zero snapshot drift and zero re-rendering compute.
🚀 Quick Setup for AI Agents
1. Claude Desktop / Cursor / Windsurf (claude_desktop_config.json)
{
"mcpServers": {
"cheapscrape": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch", "https://x402-cluster.ian-944.workers.dev/v1/mcp.json"],
"env": {
"AUTHORIZATION": "Bearer sk_live_YOUR_KEY_HERE"
}
}
}
}
Or connect directly via any streamable HTTP MCP client to:
https://x402-cluster.ian-944.workers.dev/v1/mcp.json
🛠️ Tools Included
| Tool | Cost | Best For |
|---|---|---|
preview_extract | FREE (3/hr per IP) | Test schema extraction on any page. Returns masked types + 300s preview_token. |
extract_dynamic_url | $0.05 / call | Full headless Chromium rendering on Cloudflare edge (React, Next.js, SPAs, dynamic tables). |
extract_from_url | $0.01 / call | Fast static HTML fetch + LLM entity normalization for docs, blogs, and articles. |
parse_web_schema | $0.01 / call | Extract a flat list of named keys out of unstructured raw text or DOM snippets. |
extract_structured_data | $0.01 / call | Strict schema validation & entity extraction for text snippets already in memory. |
validate_compliance | $0.01 / call | Regulatory, PII, and policy checks before database writes or API mutations. |
📦 Zero Drift & Optional Metadata
1. Snapshot Drift Prevention (preview_token)
Pass preview_token from your free preview to the paid tool:
curl -X POST https://x402-cluster.ian-944.workers.dev/v1/execute \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"tool": "extract_dynamic_url",
"preview_token": "prev_7f8a9b2c..."
}'
- Reuses the rendered DOM snapshot pinned during preview.
- Latency drops to <20ms.
- Eliminates page drift between preview and extraction.
2. Optional Metadata Wrapper (include_metadata: true)
By default, extraction returns a strictly flat JSON object matching your schema keys. If you want final redirect URLs, HTTP codes, or anti-bot challenge statuses, pass include_metadata: true:
{
"data": {
"top_story": "Show HN: x402-cluster",
"points": 142
},
"meta": {
"resolved_url": "https://news.ycombinator.com/news",
"status": "success",
"block_reason": null,
"cached": true
}
}
Detected block_reason values include: cloudflare_turnstile, captcha_detected, login_wall, access_denied, or null.
💳 Payment Options
- Prepaid API Keys ($10 for 1,000 credits):
- Instant self-serve checkout at x402-site-6gt.pages.dev.
- Use via
Authorization: Bearer sk_live_.... - Balances returned via
X-Credits-Remaining-Centsheader.
- On-Chain Crypto Micropayments (x402):
- Direct HTTP 402 with EIP-3009
TransferWithAuthorizationon Base L2 (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913).
- Direct HTTP 402 with EIP-3009
📄 License
MIT
No installation packages available.