通过 x402 微支付在 Base 主网提供无需注册、API key 或速率限制的 URL 元数据服务,最低价每个请求 $0.0005。
我运行着一个拥有 24 个端点的 URL 元数据 API,通过 Base 主网上的 x402 微支付向 AI agents 收取每次调用 $0.0005 到 $0.005 USDC 的费用。无需注册、无需 API Key、无速率限制。
/api/diff — 两个 URL 的 SEO/营销对比,费用 $0.002。
GET /api/diff?a=https://example.com&b=https://example.org 并行抓取两个 URL,返回标题/描述/og_image 是否相等、词数/图片数/链接数差值,以及列出每个不匹配字段的差异数组。
/api/favicon — 真正的图标字节,费用 $0.0005。
GET /api/favicon?url=https://github.com 解析 <link rel=icon> 链、抓取实际图标字节,返回 base64 编码的字节内容及 content-type、尺寸、格式和 SHA-256。
完整的 24 端点目录
$0.005 /api/extract 完整元数据
$0.005 /api/summarize 标题 + 正文摘要
$0.002 /api/keywords 标题 + 描述 + 关键词
$0.002 /api/links 所有 <a href>
$0.002 /api/markdown URL 转干净 MD
$0.002 /api/diff 两 URL 对比
$0.001 /api/og Open Graph + Twitter Card
$0.001 /api/feed RSS/Atom/JSON feed 发现
$0.001 /api/headings h1/h2/h3 大纲
$0.001 /api/schema JSON-LD + microdata + RDFa
$0.001 /api/emails mailto + 混淆的邮箱
$0.001 /api/dns A/AAAA/MX/NS/TXT/CNAME
$0.0005 /api/canonical rel=canonical + hreflang
$0.0005 /api/robots robots.txt 摘要
$0.0005 /api/sitemap sitemap.xml 发现
$0.0005 /api/tech 技术指纹
$0.0005 /api/hash SHA-256 + 正文统计
$0.0005 /api/headers HTTP 头 + 安全审计
$0.0005 /api/redirects 重定向链分析
$0.0005 /api/whois 通过 RDAP 的 WHOIS
$0.0005 /api/ssl TLS 证书检查
$0.0005 /api/timing DNS/TCP/TLS/TTFB 分解
$0.0005 /api/portscan 24 端口 TCP 探测
$0.0005 /api/favicon 图标字节(base64)
x402 是一个开放的 HTTP 402 微支付标准。你的 agent 收到带支付挑战的 HTTP 402,在 Base 上签署 EIP-3009 transferWithAuthorization USDC 转账,然后带上 PAYMENT-SIGNATURE 头重试。结算以秒计。
from x402 import x402ClientSync
from x402.mechanisms.evm.exact import ExactEvmScheme
client = x402ClientSync()
client.register("eip155:8453", ExactEvmScheme(signer=my_signer))
resp = client.get("https://...trycloudflare.com/api/diff",
params={"a": "https://example.com", "b": "https://example.org"})
大多数 URL 元数据 API 对固定配额收取 $20-200/月。AI agents 没有月度配额——它们有按次调用的预算。x402 让一个 agent 以每个端点 $0.0005 的价格调用 10,000 个端点,总共 $5,从自己的 USDC 钱包随用随付。无需人工配置。
GET /.well-known/x402 — 旧版 Bazaar 发现
GET /openapi.json — 带 x-payment-info 扩展的 OpenAPI 3.1
GET /llms.txt — 适合 LLM 的目录
免费层:GET https://...trycloudflare.com/api?url=https://example.com
付费目录:GET https://...trycloudflare.com/.well-known/x402