# Clear > Live at https://clear-agent-fetch.fly.dev. One successful public-URL extract as markdown for $0.005 USDC on Base via x402 / PayAI. A page an AI agent can buy in one HTTP call. No human signup. No API key. V1 GETs the public HTML (normal browser User-Agent, public redirects, 8s timeout) and extracts markdown with Readability + Turndown. We charge only for a successful extract — not a challenge, interstitial, empty shell, or JS-only page. JS-only shells fail and are not billed. This v1 does not run Playwright or hosted Chrome. Public pages only. We respect robots.txt. Clear does not sell credential stuffing, 2FA bypass, bulk account creation, or a method for bypassing anti-bot systems. ## Price $0.005 USD per successful URL. Failed extracts and policy refusals are not billed. One rail: USDC on Base via x402 (`exact`, `eip155:8453`, USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`). payTo `0x2382EF343ba76a6D56efC8C04920d7df2F98A54D`. Amount `"5000"` (6 decimals). `extra.name` is the on-chain EIP-712 name `"USD Coin"`, version `"2"` (not `"USDC"`). ## Base URL `https://clear-agent-fetch.fly.dev` Machine docs: - `/llms.txt` — this file - `/openapi.yaml` — OpenAPI 3 - `/openapi.json` — same spec (x402scan / bazaar crawlers) - `/skill.md` — pay-and-fetch skill - `/.well-known/x402` — resource list for discovery crawlers - `/.well-known/x402.json` — same manifest (alias) - GitHub skill: https://github.com/curyous/clear-agent-fetch ## Auth None. No API keys. `POST /v1/fetch` is paid. There is nothing to persist after a successful extract. ## How to pay Unpaid fetch returns HTTP 402. x402 v2: `PAYMENT-REQUIRED` header (base64 JSON) and a JSON body. One accept only (USDC on Base). Retry the same request with `PAYMENT-SIGNATURE`. Flow: VERIFY first (no fetch yet). If verify fails: 402, no fetch. After a valid signed payment we fetch. SETTLE only if the extract is good markdown. On fail (block page, junk, timeout, policy): do not settle. `charged` is false. ```json { "x402Version": 2, "error": "PAYMENT-SIGNATURE header is required", "resource": { "url": "https://clear-agent-fetch.fly.dev/v1/fetch", "description": "Fetch a public URL as markdown from the public HTML (Readability)", "mimeType": "application/json", "serviceName": "Clear", "tags": ["fetch", "markdown", "html"] }, "accepts": [ { "scheme": "exact", "network": "eip155:8453", "amount": "5000", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "payTo": "0x2382EF343ba76a6D56efC8C04920d7df2F98A54D", "maxTimeoutSeconds": 60, "extra": { "name": "USD Coin", "version": "2" } } ] } ``` `amount` is atomic USDC units (6 decimals). $0.005 = `"5000"`. Client: any x402 v2 client (`x402-fetch`, `@x402/fetch`, or equivalent) with USDC on Base in a wallet that can sign x402 / EIP-3009. Facilitator: PayAI (`https://facilitator.payai.network`). No Coinbase / CDP KYC. Agents should use `x402-fetch` / `PAYMENT-SIGNATURE`. `/try` is a human MetaMask page, not the agent path. Echo the 402 `extensions` (bazaar) into `PAYMENT-SIGNATURE` so PayAI can catalog `/v1/fetch` (`GET https://facilitator.payai.network/discovery/resources`). Listing is free; PayAI indexes on settle when the payload carries the bazaar extension. ## x402-fetch (copy-paste) Sign, then fetch, then settle only on success. Fail is free (`charged: false`). Constants an agent must use (do not invent): - Host: `https://clear-agent-fetch.fly.dev` - `POST /v1/fetch` body `{"url":"https://example.com"}` - amount `"5000"` (atomic USDC, $0.005) - `extra.name` `"USD Coin"` version `"2"` (on-chain EIP-712 name, not `"USDC"`) - payTo `0x2382EF343ba76a6D56efC8C04920d7df2F98A54D` - asset `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` - network `eip155:8453` (Base) - facilitator `https://facilitator.payai.network` ```js import { wrapFetchWithPayment, x402Client } from "@x402/fetch"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); const client = new x402Client(); client.register("eip155:8453", new ExactEvmScheme(signer)); const fetchWithPay = wrapFetchWithPayment(fetch, client); const res = await fetchWithPay("https://clear-agent-fetch.fly.dev/v1/fetch", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ url: "https://example.com" }), }); const page = await res.json(); // 200: page.markdown, page.charged === true (settled) // 422/403: page.charged === false (not billed) ``` The wrapper reads the 402, signs EIP-3009 with `extra.name` `"USD Coin"`, retries with `PAYMENT-SIGNATURE`, and echoes bazaar `extensions`. `/try` is MetaMask for humans, not this path. ## Endpoints ### POST /v1/fetch Fetch one public URL. Public HTML extract. Markdown out. GET returns 405. 1. Call with `{ "url": "https://example.com" }` and no payment header. 2. Read the 402. Use the single `accepts` entry. Sign with `extra.name` `"USD Coin"` version `"2"`. 3. Sign. Retry with `PAYMENT-SIGNATURE`. 4. On success: `200` and the extract (`charged: true`). On extract failure or policy refuse: not billed. ```bash curl -sS -D - -X POST https://clear-agent-fetch.fly.dev/v1/fetch \ -H "content-type: application/json" \ -d '{"url":"https://example.com"}' ``` 200 body (successful extract): ```json { "url": "https://example.com", "final_url": "https://example.com/", "title": "Example Domain", "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples.", "success": true, "charged": true, "paid_usd": "0.005", "rail": "usdc-base" } ``` 422 body (extract failed — not billed): ```json { "url": "https://example.com", "success": false, "charged": false, "error": "extract_failed", "detail": "Public HTML did not produce usable markdown (empty or JS-only shell)." } ``` 403 body (policy refuse — not billed): ```json { "url": "https://example.com/private", "success": false, "charged": false, "error": "policy_refused", "detail": "This URL is disallowed by robots.txt." } ``` 400 if `url` is missing or not an http(s) URL. 402 if unpaid or verify failed. 429 if one fetch is already in flight for that wallet, or the wallet hit 5 unsettled failures in 60 minutes. ## Rules - Public pages only. Do not send authenticated, paywalled, or private URLs. - Do not use Clear for credential stuffing, 2FA bypass, or bulk account creation. - Do not ask Clear how to bypass anti-bot systems. - We respect robots.txt. Refused URLs are not billed. - We do not charge for a challenge page or a blank JS shell. ## Status Live. $0.005 USDC on Base via x402 / PayAI. Skill: https://github.com/curyous/clear-agent-fetch — also `/openapi.yaml` and `/skill.md`. Listed in gold-402: https://24klabs.ai/listing/clear . Listed on x402scan: https://www.x402scan.com/server/clear-agent-fetch.fly.dev . PayAI bazaar (`GET https://facilitator.payai.network/discovery/resources`) is read-only; it catalogs `/v1/fetch` on settle when the client echoes the 402 bazaar `extensions`. No PayAI API key required for listing.