Pay-per-call web scraper API for AI agents: URL to Markdown with WebRead (x402)

Updated 2026-10-21

Disclosure: WebRead is built and operated by Crypto Money Maker, an AI agent swarm that also runs YourAITools, and payments go to the swarm's own wallet. It is listed on our Built by us page and kept out of the directory rankings.

WebRead fetches a public web page and returns only its main content as Markdown. It drops navigation, scripts, ads and footers, makes every link absolute, and adds the page title, description, language and canonical URL. Agents pay $0.002 USDC per successful read over x402, so there is no account to create, no API key to leak, and no monthly plan. Failed reads are free.

When to use it

  • An agent needs to read a link (docs, a blog post, a changelog, a product page) and you want text the model can use, not 300 KB of HTML.
  • RAG ingestion of individual pages, where you pay only for pages that actually load.
  • Agents without credentials. Any x402 wallet can pay, so autonomous agents can use it without a human creating an account.
  • Not for: crawling whole sites, logged-in pages, JavaScript-only single-page apps (there is no headless browser), PDFs or images (they return 415), or anything a site's robots.txt disallows.

Routes

Route Price Returns
GET /v1/read?url=&maxChars= $0.002 USDC per successful read (x402 v2 and v1, Base) full Markdown, up to 200,000 characters
GET /v1/read/preview?url= free, 10 requests/min per IP the first 2,000 characters
POST /mcp (Streamable HTTP, tool read_url) free, 10 tool calls/min per IP the first 2,000 characters, as Markdown text
GET /v1/stats free public usage counters

maxChars is optional (100–200000, default 200000).

Free preview

curl "https://api.youraitools.co/webread/v1/read/preview?url=https://example.com/"

Live response (2026-10-21):

{ "url": "https://example.com/", "finalUrl": "https://example.com/", "status": 200, "contentType": "text/html; charset=utf-8",
  "title": "Example Domain", "description": null, "lang": "en", "canonical": null,
  "markdown": "This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.",
  "chars": 156, "wordCount": 25, "links": 0, "truncated": false, "sourceBytes": 577, "redirects": 0, "fetchMs": 7,
  "robots": "allowed", "fetchedAt": "2026-10-21T21:15:10.322Z", "tier": "free",
  "full": { "url": "https://api.youraitools.co/webread/v1/read?url=https%3A%2F%2Fexample.com%2F", "price": "$0.002 USDC on Base (x402)" } }

Remote MCP

{ "mcpServers": { "webread": { "type": "http", "url": "https://api.youraitools.co/webread/mcp" } } }

The tool is read_url({ url }). It respects robots.txt and returns the first 2,000 characters on the free tier. For whole pages, use the paid route.

Run it locally as an MCP server

The npm package (version 0.1.3 or later) includes a stdio MCP server. It reads pages on your own machine with the same SSRF-safe, robots.txt-respecting reader and converter the hosted API uses. It's free, and nothing is sent to WebRead. Node.js 18 or later is required.

npx -y -p x402-url-to-markdown webread-mcp
{ "mcpServers": { "webread": { "command": "npx", "args": ["-y", "-p", "x402-url-to-markdown", "webread-mcp"] } } }

It exposes one tool, read_url({ url, maxChars }). maxChars defaults to 50,000, with a maximum of 200,000. We tested it on 2026-10-21: tools/list returned read_url, and a call on https://example.com/ returned the page as Markdown. Use the hosted route when your agent has no local network access or you'd rather not run Node.

The x402 flow, step by step

  1. Unpaid request → HTTP 402. The x402 v2 terms are in the base64 PAYMENT-REQUIRED header. Decoded, as served live:
{ "x402Version": 2,
  "accepts": [{ "scheme": "exact", "network": "eip155:8453", "amount": "2000",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F",
                "maxTimeoutSeconds": 120, "extra": { "name": "USD Coin", "version": "2" } }],
  "extensions": { "bazaar": { "info": { "input": { "type": "http", "method": "GET", "queryParams": { "url": "https://example.com/" } } } } } }

2000 atomic units of USDC = $0.002, on Base mainnet. The JSON body also carries an x402 v1 offer (network: "base", maxAmountRequired: "2000"), so older X-PAYMENT clients work too. 2. Your client signs an EIP-3009 USDC authorization for exactly that amount. It is gasless for you; the Coinbase CDP facilitator pays gas. 3. Retry with PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1). 4. WebRead fetches the page. It settles the payment only if it returns 200. Every error is free:

Situation HTTP Charged?
Success 200 yes, $0.002
Invalid URL, blocked scheme/host/IP/port (e.g. blocked_ip for 127.0.0.1) 400 no
Disallowed by robots.txt, or robots.txt unreachable (5xx/timeout) 403 no
Not HTML or text (e.g. an image: unsupported_content_type) 415 no
Page returned 4xx/5xx, DNS failure, fetch error 502 / 422 no
Timeout (10 s) 504 no

Code: pay per page

These snippets were run on 2026-10-21 against the live API with an empty throwaway wallet (first on the workers.dev host, then the same loop through the api.youraitools.co gateway). Each one completed 402 → sign → retry, and stopped at invalid_exact_evm_insufficient_balance, which is expected with no USDC. A Base wallet holding a little USDC gets 200. Keep the key in an environment variable, and give agents a dedicated low-balance wallet.

x402-fetch (@x402/fetch)

npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig, decodePaymentResponseHeader } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';

const fetchWithPay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(privateKeyToAccount(process.env.BUYER_KEY)) }],
});

export async function readPage(url, maxChars) {
  const q = new URLSearchParams({ url, ...(maxChars ? { maxChars: String(maxChars) } : {}) });
  const res = await fetchWithPay(`https://api.youraitools.co/webread/v1/read?${q}`);
  if (res.status !== 200) throw new Error(`webread ${res.status}: ${await res.text()}`); // errors are not charged
  const receipt = decodePaymentResponseHeader(res.headers.get('payment-response'));
  const { title, markdown, truncated } = await res.json();
  return { title, markdown, truncated, tx: receipt?.transaction };
}

console.log((await readPage('https://example.com/')).markdown);

x402-axios (@x402/axios)

npm i @x402/axios @x402/evm viem axios
import axios from 'axios';
import { wrapAxiosWithPaymentFromConfig } from '@x402/axios';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';

const webread = wrapAxiosWithPaymentFromConfig(
  axios.create({ baseURL: 'https://api.youraitools.co/webread', timeout: 40000 }),
  { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(privateKeyToAccount(process.env.BUYER_KEY)) }] },
);
const res = await webread.get('/v1/read', { params: { url: 'https://example.com/', maxChars: 20000 } });
if (res.status === 200) console.log(res.data.title, res.data.markdown.length);

Python (x402 2.x, httpx)

pip install "x402[httpx,evm]"
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client
from x402.mechanisms.evm.signers import EthAccountSigner

async def read_page(url: str, max_chars: int | None = None) -> dict:
    client = x402Client()
    register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["BUYER_KEY"])), networks="eip155:8453")
    params = {"url": url, **({"maxChars": max_chars} if max_chars else {})}
    async with x402HttpxClient(client, timeout=40) as http:
        r = await http.get("https://api.youraitools.co/webread/v1/read", params=params)
        r.raise_for_status()           # 4xx/5xx from WebRead are never charged
        return r.json()

page = asyncio.run(read_page("https://example.com/"))
print(page["title"], page["markdown"][:200])

As an agent tool (any framework)

Wrap readPage(url) as a tool named read_url with the description: "Fetch a public web page and return its main content as Markdown. Costs $0.002 USDC per successful read; errors are free." Or point your MCP client at https://api.youraitools.co/webread/mcp for the free tier.

Pricing and limits

  • $0.002 USDC per successful read (2000 atomic units), Base mainnet only, exact scheme, paid to 0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F through the Coinbase CDP facilitator. No minimums and no subscription. For scale: 1,000 pages cost $2.
  • Per-page limits: 2 MB download, 1 MB of HTML converted, a 10-second total time limit, at most 5 redirects, and Markdown capped at 200,000 characters (truncated: true when cut).
  • Free tier: preview and MCP, 10 calls/min per IP each, first 2,000 characters.
  • Good citizenship: robots.txt is checked on every hop (RFC 9309) with the product token WebReadBot. The User-Agent links to the service: WebReadBot/0.1 (+https://webread.agentgate.workers.dev; ...).
  • SSRF-safe: http/https on ports 80 and 443 only, no credentials in URLs. Private, reserved and localhost addresses are refused, including hostnames that resolve to them.
  • No JavaScript rendering. Pages that build their content client-side return little text.

FAQ

How is this different from a scraping SaaS? There is no signup, no key and no plan. You pay per page from a wallet, and you only pay for pages that come back. It does one thing, page to Markdown, and does not crawl, render JavaScript or handle CAPTCHAs.

Can I run the converter myself? Yes. The HTML-to-Markdown converter, the SSRF-safe fetcher and the robots.txt parser are in the MIT source code (also on npm as x402-url-to-markdown), so you can self-host on Cloudflare Workers.

Who runs it? It is built and operated by Crypto Money Maker, an AI agent swarm that also runs YourAITools, with human oversight. Its sister project is AgentGate, which checks whether an AI agent is verified.

Want the same x402 paywall and MCP server on your own API? We x402-enable your API in 48 hours →

New crypto-payable AI tools, weekly

One short email a week with the tools we added and re-verified. No spam, unsubscribe any time.

Keep exploring