关于 x402-scraper-api
x402-scraper-api 是面向 Agent 和研究工作流的网页抓取 MCP 服务,支持静态 HTML、JavaScript 渲染页面及按指定结构提取内容,并通过 Base 上的 x402 微支付结算。
主要功能
- 01静态 HTML 转 Markdown
- 02抓取 JavaScript 渲染页面
- 03按指定 JSON Schema 提取
- 04通过 Base 上的 USDC 微支付
适用场景
- 01提取静态网页内容
- 02采集 JavaScript 密集型网站数据
- 03将抓取结果整理为指定结构
MCP 相关
它向 MCP 客户端提供网页抓取工具,支持本地 stdio 配置和远程 JSON-RPC HTTP 接口。Agent 可通过服务器卡发现工具定义,并处理 x402 付款请求。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://x402-scraper-api-production-67a4.up.railway.app/mcpclaude mcp add --transport http ihen404-x402-scraper-api https://x402-scraper-api-production-67a4.up.railway.app/mcp{"mcpServers":{"ihen404-x402-scraper-api":{"type":"http","url":"https://x402-scraper-api-production-67a4.up.railway.app/mcp"}}}在 Cursor 中打开{"servers":{"ihen404-x402-scraper-api":{"type":"http","url":"https://x402-scraper-api-production-67a4.up.railway.app/mcp"}}}在 VS Code 中打开{"mcpServers":{"ihen404-x402-scraper-api":{"type":"http","url":"https://x402-scraper-api-production-67a4.up.railway.app/mcp"}}}{"mcpServers":{"ihen404-x402-scraper-api":{"serverUrl":"https://x402-scraper-api-production-67a4.up.railway.app/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
🌐 x402 Scraper API
高速、多层级网页抓取 MCP 服务,通过 Base Mainnet 上的 HTTP 402 微支付实现变现。专为自主 Agent 集群、研究管线和企业大模型工作流而设计。
⚡ 开发者快速入门(Claude Desktop / MCP 客户端)
将此服务配置添加到 MCP 客户端设置文件(例如 claude_desktop_config.json),即可立即为本地 AI 工作区配备付费网页抓取工具:
{
"mcpServers": {
"x402-scraper": {
"command": "npx",
"args": ["-y", "x402-scraper-api"],
"env": {
"BASE_RPC_URL": "https://mainnet.base.org"
}
}
}
}
🛠️ 工具层级与定价
我们的抓取基础设施提供三个独立的编程层级,专为自主 Agent 量身打造:
| 工具名称 | 描述 | 价格(Base 上的 USDC) |
|---|---|---|
scrape_basic | 快速 DOM 解析,并从静态 HTML 中提取整洁的 Markdown。 | $0.01 |
scrape_dynamic | 使用无头浏览器渲染 JavaScript 密集型动态 Web 应用。 | $0.05 |
scrape_structured | 抓取网页,并将原始内容直接解析为指定的 JSON Schema。 | $0.15 |
🤖 自主 Agent 集成(M2M / x402 协议)
自主侦察 Agent 和 Agent 集群可通过我们的服务卡以编程方式发现工具定义,并即时完成 x402 付款挑战。
直接使用端点
- Base URL:
https://x402-scraper-api-production-67a4.up.railway.app - MCP 网关:
https://x402-scraper-api-production-67a4.up.railway.app/mcp - 服务卡:
https://x402-scraper-api-production-67a4.up.railway.app/.well-known/mcp/server-card.json - 遥测:
https://x402-scraper-api-production-67a4.up.railway.app/telemetry
JavaScript 客户端请求示例
Agent 可使用标准 JSON-RPC over HTTP 调用工具:
const response = await fetch("https://x402-scraper-api-production-67a4.up.railway.app/mcp", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
method: "tools/call",
params: {
name: "scrape_structured",
arguments: {
url: "https://example.com/target-data",
jsonSchema: { title: "string", price: "number" }
}
},
id: 1
})
});
const result = await response.json();
console.log(result);
📊 实时遥测与监控
我们的生产基础设施会实时跟踪请求速率、活跃会话和收入里程碑。可通过编程方式查看当前运行时间和指标:
curl -s https://x402-scraper-api-production-67a4.up.railway.app/telemetry
🚀 许可证
MIT © 2026 x402 Scraper API
🤖 Claude Code 与 AI Agent 快速入门
借助 Base 或 Solana 上的 x402 微支付,为自主 Agent(Claude Code、ElizaOS、Cursor)提供原生付费墙网页抓取能力。无需订阅 API 密钥。
通过 Claude Code 安装
将代码库克隆到本地工作区或 Agent 环境中:
git clone [https://github.com/your-username/x402-scraper-api.git](https://github.com/your-username/x402-scraper-api.git)
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。