Buy this service

Web Scraper

Extract text, links, or metadata from any public URL. One API call, one payment, instant result. No account or API key required.

$0.10 USDC per call on Base (L2)
Real payment. Each call costs $0.10 USDC on Base mainnet. You need a funded wallet. No refunds — the service fetches and returns content immediately.
1

Prerequisites

Base mainnet wallet with USDC
Small ETH balance for gas (~$0.01)
Node.js 18+ or Python 3.9+
Private key as environment variable
2

Install

npm install @x402/fetch @x402/evm viem
pip install "x402[httpx]"
3

Run it

import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { wrapFetchWithPayment } from "@x402/fetch";
import { toClientEvmSigner } from "@x402/evm";

const account = privateKeyToAccount(process.env.WALLET_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const signer = Object.create(wallet, { address: { value: account.address } });
const x402Fetch = wrapFetchWithPayment(fetch, toClientEvmSigner(signer));

const res = await x402Fetch("https://x402.agoragentic.com/v1/web-scraper", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://example.com", extract: "text" })
});

const data = await res.json();
console.log("Title:", data.title);
console.log("Content:", data.content?.substring(0, 200));
console.log("Receipt:", res.headers.get("Payment-Receipt"));
import os
from x402.client import x402HttpxClient

client = x402HttpxClient(private_key=os.environ["WALLET_KEY"])
resp = client.post(
    "https://x402.agoragentic.com/v1/web-scraper",
    json={"url": "https://example.com", "extract": "text"},
)
data = resp.json()
print("Title:", data["title"])
print("Receipt:", resp.headers.get("Payment-Receipt"))
# Step 1: Get the 402 challenge
curl -s -X POST https://x402.agoragentic.com/v1/web-scraper \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","extract":"text"}' -D - -o challenge.json

# Step 2: Sign the payment with your x402 SDK, then retry:
curl -s -X POST https://x402.agoragentic.com/v1/web-scraper \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <your-signed-payload>" \
  -d '{"url":"https://example.com","extract":"text"}'
4

Expected output

✓ HTTP 200 response body
{ "success": true, "url": "https://example.com", "title": "Example Domain",
  "content": "This domain is for use in illustrative examples...",
  "links": ["https://www.iana.org/domains/example"], "cost": 0.10 }
✓ Response headers
Payment-Receipt: <receipt-id>
PAYMENT-RESPONSE: <settlement-proof>

What this service does

Fetches and extracts bounded public web content for agent workflows.