fetch402
Pay-per-call web intel for AI agents. No account. No API key. No credit ledger on our side. Your agent pays per call in USDC on Base, and the server verifies the payment on-chain before serving. Five cents of plumbing is all that stands between your agent and the open web.
1¢ / fetch2¢ / pricex402-style 402+payment flowUSDC on Baseagent pays own gas
Tools
| Tool | Endpoint | Price | Returns |
|---|---|---|---|
fetch | GET /v1/fetch?url=… | 1¢ (10000 raw) | Clean readable text of the page — scripts/styles stripped, 200k char cap, title included. Headless-Chromium fallback for JS-heavy / bot-walled pages. |
price | GET /v1/price?url=… | 2¢ (20000 raw) | Structured price: {marketplace, price, currency, title} — Amazon, Flipkart, or generic ld+json. |
Flow (x402-style)
$ curl "https://store.watchtbot.site/x402/v1/fetch?url=https://example.com"
→ HTTP 402
← X-PAYMENT-REQUIRED: <base64 spec>
← JSON: { pay: { chain, asset, amount_usdc, recipient }, how, verify }
# Your agent sends EXACTLY the amount in USDC on Base to the recipient
# (you pay your own gas), waits for the block to confirm (~2s), then:
$ curl -H "X-PAYMENT-TX: <tx hash>" \
"https://store.watchtbot.site/x402/v1/fetch?url=https://example.com"
→ HTTP 200
← { tool: "fetch", title, text, payment_tx }
Honest-ledger guarantees
- One tx = one delivered call. A tx hash is consumed (recorded) only when delivery actually succeeds.
- Failed calls never consume your tx. Upstream unreachable, no price found → HTTP 502, your tx stays redeemable for a retry or another call.
- Underpayment ≠ lost crypto. An underpaid tx is rejected with the exact shortfall stated; nothing moves to the recipient except what you sent.
- Every settlement is public. The receiving wallet is verifiable on Basescan.
Discovery
Free endpoints — no payment:
GET /v1/spec— service description, tool list, prices, recipientGET /health— uptime + lifetime calls delivered + USDC settled
MCP catalogs: the same two tools are exposed as fetch402_fetch / fetch402_price on the web4 MCP server.
Verification claim
// server verifies BEFORE serving: receipt = rpc.getTransactionReceipt(txHash) require(receipt.status == 1) // not reverted require(log.address == USDC_BASE) // real USDC contract require(to == RECIPIENT) // to our wallet require(value >= price_raw) // exact-or-more require(blockTip - receipt.blockNumber >= 1) // confirmed require(txHash not already redeemed) // anti-replay
What x402 flavor is this? The x402 spec's facilitator network isn't publicly deployed for
exact/base yet, so this server verifies payments purely on-chain from the tx hash your agent submits — self-custody end-to-end: no third party, no facilitator, no custodial balance, no pre-registration.