# 200ok.xyz — x402 Web Unlocker API > Bypass web protections (CAPTCHA, Cloudflare, anti-bot) with x402 micropayments. --- ## Overview **200ok** provides x402-payable APIs for AI agents. Pay per call with USDC on Base network. **Service:** Web Unlocker — Unlock protected web content --- ## API Specification **Base URL:** `https://web-unlocker.200ok.xyz` **Pricing:** $0.01 USDC per successful request (HTTP 200 only) **Network:** Base (eip155:8453) **Payment:** x402 protocol via `PAYMENT-SIGNATURE` header --- ## Endpoints ### POST /unlock Unlock a protected website and retrieve HTML content or screenshots. **Request:** ```json { "url": "https://example.com", "type": "html", "js_render": true } ``` **Response:** ```json { "success": true, "url": "https://example.com", "html": "...", "timestamp": "2026-03-29T12:00:00Z" } ``` ### GET /health Check service health (free, no payment required). **Response:** ```json { "status": "ok", "timestamp": "2026-03-29T12:00:00Z" } ``` --- ## Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `url` | string | ✅ Yes | — | Target URL (http:// or https://) | | `type` | string | ❌ No | `html` | Output: `html`, `png`, or `both` | | `js_render` | boolean | ❌ No | `true` | Enable JavaScript rendering for SPAs | | `wait` | number | ❌ No | — | Wait time in ms (max: 100000) | | `wait_for` | string | ❌ No | — | CSS selector to wait for | | `country` | string | ❌ No | — | Proxy country code (2 letters, e.g., `us`) | | `block_resources` | string | ❌ No | — | Block: `script`, `image`, `css`, `font`, `media` | | `clean_content` | string | ❌ No | — | Remove from response: `js`, `css` | | `headers` | array | ❌ No | — | Custom headers: `[{"name":"...", "value":"..."}]` | | `cookies` | array | ❌ No | — | Custom cookies: `[{"name":"...", "value":"..."}]` | --- ## Payment Flow 1. **Send request** → Receive HTTP 402 with payment details 2. **Sign payment** → Use x402-compatible wallet (USDC on Base) 3. **Retry with signature** → Include `PAYMENT-SIGNATURE` header 4. **Get content** → Charged only on HTTP 200 **For detailed payment setup:** https://docs.x402.org/getting-started/quickstart-for-buyers --- ## Error Codes | Code | Error | Charged? | |------|-------|----------| | 200 | ✅ Success | Yes — $0.01 | | 400 | ❌ Bad Request | No | | 401 | ❌ Unauthorized | No | | 402 | ❌ Payment Required | No | | 403 | ❌ Forbidden (SSRF) | No | | 429 | ❌ Too Many Requests | No | | 500 | ❌ Internal Error | No | | 502 | ❌ Bad Gateway | No | | 503 | ❌ Unavailable | No | | 504 | ❌ Timeout | No | --- ## Discovery **Service Discovery:** https://web-unlocker.200ok.xyz/.well-known/x402 **OpenAPI Spec:** https://web-unlocker.200ok.xyz/openapi.json **For AI Agents:** Use OpenAPI for canonical API specification with x402 payment metadata. --- ## Testing **Test Script:** https://200ok.xyz/docs/web-unlocker/testing#_5-paste-this-code **Quick Test (without payment):** ```bash # Health check curl https://web-unlocker.200ok.xyz/health # Unlock request (returns 402) curl -X POST https://web-unlocker.200ok.xyz/unlock \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "type": "html"}' ``` --- ## Documentation - **Quick Start:** https://200ok.xyz/docs/web-unlocker/quick-start - **API Reference:** https://200ok.xyz/docs/web-unlocker/api - **Testing Guide:** https://200ok.xyz/docs/web-unlocker/testing --- **Powered by x402 Protocol** | https://x402.org