内容
# 网站智能API
<p align="center">
<img src="public/assets/santos-eagle.svg" width="140" alt="Santos 金色鹰徽标" />
</p>
<p align="center">
<img src="https://img.shields.io/badge/AI-网站智能-7c3aed?style=for-the-badge&logo=robot" alt="AI 网站智能" />
<img src="https://img.shields.io/badge/代理-就绪-2563eb?style=for-the-badge&logo=lightning" alt="代理就绪" />
<img src="https://img.shields.io/badge/x402-基于Base的USDC-0ea5e9?style=for-the-badge&logo=bitcoin" alt="x402 on Base" />
<a href="https://www.santosautomation.com/integrations/grok"><img src="https://img.shields.io/badge/Grok-远程MCP就绪-000000?style=for-the-badge&logo=x" alt="Grok 远程MCP就绪" /></a>
<img src="https://img.shields.io/badge/Next.js-16-000000?style=for-the-badge&logo=nextdotjs" alt="Next.js" />
</p>
<p align="center">
<strong>评估一个公共网站是否可发现、可理解、可调用和值得信赖,以便代理使用。</strong>
</p>
<div align="center">
<pre>
┌──────────────────────────────────────────────────────────────┐
│ 网站智能 • AI就绪的网络评估 │
│ 发现 • 理解 • 调用 • 信任 │
└──────────────────────────────────────────────────────────────┘
</pre>
</div>
**网站智能和代理就绪性,适用于代理网络** — 快速、代理就绪性和浏览器渲染的深度审计返回结构化证据和优先修复。无需账户或传统API密钥;付费资源使用 [x402 协议](https://x402.org) 和 Base上的USDC。
### 亮点
- 🔍 网站智能和代理就绪性信号的快速审计
- 📦 **批量审计** — 单笔 0.50 美元 USDC 支付,可审计最多 50 个网站
- 🧠 使用Chromium、Lighthouse和axe-core的浏览器渲染深度审计
- 💳 基于x402的支付,使用Base上的USDC
- 📡 支持OpenAPI、MCP、llms.txt和能力清单
[](https://www.santosautomation.com/)
[](https://vercel.com/thereal-baitjets-projects/santos-api)
[](https://api.santosautomation.com/openapi.json)
[](https://www.santosautomation.com/reports/santosautomation.com)
[](https://x402.org/)
[](https://api.santosautomation.com/openapi.json)
[](https://glama.ai/mcp/servers/thereal-baitjet/santos-audit-api)
[](LICENSE)
实时:API 地址 **https://api.santosautomation.com** · 首页地址 **https://www.santosautomation.com** (同一应用,两个域名)
公共网站定位为Santos网站智能。其响应式导航使用来自 `public/assets` 的金色Santos鹰矢量图。
| 界面 | URL |
|---|---|
| 快速智能审计(0.015 USDC,同步) | `GET /api/audit?url=https://example.com` |
| **批量快速审计(0.50 USDC 固定,最高 50 个 URL)** | `POST /api/audit/batch` `{"urls": [...]}` |
| **代理就绪性**(0.075 USDC,有限被动评估) | `GET /api/agent-readiness?url=https://example.com&depth=quick` |
| 安全抓取(0.002 USDC,同步) | `GET /v1/fetch?url=https://example.com` |
| 内容提取(0.005 USDC,同步) | `POST /v1/extract` `{"url": "https://example.com"}` |
| 结构化提取(0.08 USDC,同步) | `POST /v1/extract/structured` `{"url": "...", "schema": {...}}` |
| **Feed 解析器**(0.003 USDC,同步) | `GET /v1/feed?url=https://example.com/feed.xml` |
| **链接地图**(0.003 USDC,同步) | `GET /v1/links?url=https://example.com` |
| **摘要器**(0.033 USDC,同步) | `POST /v1/summarize` `{"url": "https://example.com", "focus": "..."}` |
| 截图和PDF渲染(0.01 USDC,同步) | `GET /v1/screenshot?url=https://example.com` |
| **深度网站智能审计**(0.225 USDC,异步任务) | `POST /v1/audits` `{"url": "https://example.com"}` |
| 免费演示(每天 1 次,每个 IP 共享配额) | `GET /api/audit/demo?url=...` · `GET /api/agent-readiness/demo?url=...` |
| OpenAPI 3.1 | [`/openapi.json`](https://api.santosautomation.com/openapi.json) |
| llms.txt | [`/llms.txt`](https://api.santosautomation.com/llms.txt) |
| MCP 服务器(工具:`audit_website_preview`, `audit_agent_readiness`, `extract_page_markdown`, `extract_structured_data`, `feed_parse`, `link_map`, `summarize`) | `POST /mcp` |
| 服务清单 | [`/api`](https://api.santosautomation.com/api) |
| 能力清单 | [`/capabilities.json`](https://api.santosautomation.com/capabilities.json) |
| 众所周知的能力清单 | [`/.well-known/agent-capabilities.json`](https://www.santosautomation.com/.well-known/agent-capabilities.json) |
| 机器可读版本和合约 | [`/version`](https://www.santosautomation.com/version) |
| 状态和更新日志 | [`/status`](https://www.santosautomation.com/status) · [`/changelog`](https://www.santosautomation.com/changelog) |
| 网站地图/爬虫规则 | [`/sitemap.xml`](https://www.santosautomation.com/sitemap.xml) · [`/robots.txt`](https://www.santosautomation.com/robots.txt) |
## 网站智能模型
Santos 评估四个方面的完整、适用的检查:
- **可发现** — 爬虫访问、规范 URL、站点地图、`llms.txt`、文档和接口链接。
- **可理解** — 结构化身份、JSON-LD、语义 HTML、元数据、定价和业务背景。
- **可调用** — OpenAPI、MCP、能力清单、类型化模式、稳定错误、作业端点和适用的 x402。
- **值得信赖** — HTTPS、安全标头、辅助功能、性能、浏览器行为、支持和证据质量。
附加的 `website_intelligence_score` 和 `website_intelligence` 字段与历史快速审计字段一起出现。现有的 `overall_score`、类别分数、端点路径、能力 ID 和支付行为保持兼容。
## 公共产品页面
- [AI 网站智能](https://www.santosautomation.com/ai-website-intelligence)
- [代理就绪性审计](https://www.santosautomation.com/agent-readiness-audit)
- [网站智能API](https://www.santosautomation.com/website-intelligence-api)
- [MCP就绪性检查器](https://www.santosautomation.com/mcp-readiness-checker)
- [llms.txt 检查器](https://www.santosautomation.com/llms-txt-checker)
- [OpenAPI就绪性检查器](https://www.santosautomation.com/openapi-readiness-checker)
- [代理就绪性方法论](https://www.santosautomation.com/methodology/agent-readiness)
- [代理就绪性报告示例](https://www.santosautomation.com/reports/sample-agent-readiness)
- [学习指南](https://www.santosautomation.com/learn/what-is-ai-website-intelligence)
## 适用于人类(信用卡,无加密货币)
- [购买报告(信用卡)](https://www.santosautomation.com/agent-readiness/buy) — **9 美元快速**(代理就绪性,基于抓取)或 **29 美元深度**(网站智能,浏览器渲染),一次性,格式化并通过电子邮件发送。x402 价格保持代理价格(原始 API);信用卡价格是人类报告。
- [Santos 监控](https://www.santosautomation.com/monitoring) — **9 美元/月** 订阅:每周重新审计一个 URL,当分数变化 5 分以上时发送电子邮件提醒,以及每月摘要。可随时取消。
## 代理支付(x402)
```
GET /api/audit?url=example.com
← 402 · PAYMENT-REQUIRED: <base64 条款:$0.015 USDC · eip155:8453 · payTo · asset>
→ 重试并附上 PAYMENT-SIGNATURE:<base64 签名 EIP-3009 授权>
← 200 OK · 审计 JSON · PAYMENT-RESPONSE:<base64 链上收据>
```
协议:**x402 v2**(2026-07-17 迁移;不再接受旧版 v1 `X-PAYMENT` 客户端)。
支付仅在**成功响应后结算** — 错误的 URL 或无法访问的目标不会使代理支付任何费用。
### JavaScript / TypeScript
```javascript
import { privateKeyToAccount } from "viem/accounts";
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
const account = privateKeyToAccount(process.env.BUYER_PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPay(
"https://api.santosautomation.com/api/audit?url=example.com"
);
const report = await res.json(); // { overall_score, scores, checks, issues, ... }
```
工作脚本:[`buy-audit.js`](buy-audit.js)(本地开发),[`buy-live.js`](buy-live.js)(生产环境)和 [`buy-batch.js`](buy-batch.js)(批量)。Python 示例:[`examples/audit_client.py`](examples/audit_client.py)。
## 批量审计(容量轨道)
一次性 **0.50 USDC** 支付审计 **最多 50 个 URL** — 满负荷时 0.01 美元/URL,约为单次调用价格的 33% 下降。同步、去重、8 路有界并发、每个 URL 故障隔离(一个坏目标返回错误条目,而不是失败的批量)。仅当**至少一个**审计成功时结算 — 全部失败的批量是免费的。
```
POST /api/audit/batch
{ "urls": ["https://example.com", "https://example.org", ...] }
← 402 · PAYMENT-REQUIRED: $0.50 USDC 条款
→ 重试并附上 PAYMENT-SIGNATURE
← 200 · { batch_size, succeeded, failed, results: [{url, ok, report|error}] }
```
工作买家示例:[`buy-batch.js`](buy-batch.js)。
## Feed 解析器、链接地图和摘要器
三个同步内容工具,遵循相同的成功付费合同:
- **Feed 解析器** — `GET/POST /v1/feed`(0.003 USDC):一个公共 Feed URL 输入,标准化 JSON 输出。检测 RSS 2.0、Atom 和 JSON Feed 通过相同的 SSRF 防护抓取器;返回 Feed 元数据和最多 50 个项目(`id`、`title`、`url`、`published`、`summary`、`author`)。非 Feed 目标返回 422 且永不结算。买家示例:[`buy-feed.js`](buy-feed.js)。
- **链接地图** — `GET/POST /v1/links`(0.003 USDC):一个 HTML 页面输入,一个分类链接地图输出 — 每个链接(最多 200)带有类型(内部或外部)和主题标签(文档、定价、API、职业、社交、Feed)和每个类别的计数。站点发现步骤,而非爬虫。买家示例:[`buy-links.js`](buy-links.js)。
- **摘要器** — `POST/GET /v1/summarize`(0.033 USDC):一个 HTML 页面输入,一个 Claude 生成的结构化摘要输出(`title`、`summary`、`key_facts`、`entities`、`word_count`),带有可选的 `focus` 引导提示。非 HTML 目标返回 422 且永不结算。买家示例:[`buy-summarize.js`](buy-summarize.js)。
### 免费演示
相同报告形状,无需支付,每天限 1 次,每个 IP:
```
curl "https://api.santosautomation.com/api/audit/demo?url=example.com"
```
## 免费工具、徽章和 CI
**验证电子邮件免费审计** — 每天每个验证电子邮件(6 位验证码流程,令牌有效 30 天)可进行一次完整的快速智能审计,附 HMAC 签名报告:
```
POST /api/leads/verify/request {"email": "you@example.com", "url": "example.com"}
POST /api/leads/verify/confirm {"email": "you@example.com", "code": "123456"} → token
GET /api/audit/free?url=example.com&token=<token>
```
**代理就绪徽章** — 嵌入您的公共分数的实时 SVG 盾牌:
```markdown
[](https://www.santosautomation.com/reports/example.com)
```
**llms.txt 生成器** — 撰写一个标准格式的 `llms.txt`,来自一个页面样本(无需验证电子邮件,可免费使用 1 个共享配额):
`GET /v1/llms-txt/demo?url=example.com&token=<token>` 或工具页面 [/llms-txt-generator](https://www.santosautomation.com/llms-txt-generator)。
**报告验证** — 每个报告都带有 HMAC-SHA256 签名。在 [/verify](https://www.santosautomation.com/verify) 或 `POST /v1/verify`(30 小时内 1 次,限额 30 次)处验证一个。
**CI 门控** — 当其预览部署的分数低于您的代理就绪阈值时,失败一个拉取请求(通过 x402,每个运行约 0.075 USDC):
[`examples/agent-readiness-ci.yml`](examples/agent-readiness-ci.yml)(GitHub Actions)和 [`examples/agent-readiness-ci.sh`](examples/agent-readiness-ci.sh)(任意 CI)。指南:[/ci](https://www.santosautomation.com/ci).
## 深度网站智能(浏览器渲染层)
使用 Fly.io 隔离工作器中的真实 Chromium:实验室指标、呈现的 axe-core 可访问性发现、浏览器网络/控制台证据、截图和被动安全检查。异步:0.225 美元的付款购买 **有限计算预留**(在作业接受时结算,而不是报告完成)。`POST /v1/audits` 带有 `Idempotency-Key` 头部 → 使用返回的临时 `access_token` 轮询 `status_url` → 获取 `report_url`(版本化 `schema_version: 3.0.0` JSON + 签名工件网址)。买家示例:[`buy-deep.js`](buy-deep.js)。架构 + 上线运行手册:[`docs/deep-audit.md`](docs/deep-audit.md)。
## 代理就绪性
版本化的 `AgentReadinessResult` 评估公共代理面向的发现、结构化身份、OpenAPI、MCP、操作信任和 x402/机器商务信号。首先分类适用性,因此普通网站不会因缺乏 API、MCP 服务器或支付接口而受到惩罚。独立快速通道使用最多八个有界请求,并且永远不会对审计目标进行身份验证或支付、提交表单、创建目标帐户、调用目标工具或执行代码。代理就绪性也作为 `agent-readiness` 模块提供给 `POST /v1/audits`,通过 MCP `audit_agent_readiness` 付费 HTTP 转发,并作为 Quick Audit 响应中的低覆盖嵌入式预览添加。独立结果的成本为 **0.075 USDC 成功响应** 通过 x402 v2;失败的审计不会结算。现有的 Quick Audit `overall_score` 保持不变。独立响应还包括附加的网站智能分数和四维表示,其中 `callable` 标记为不适用,当目标不宣传可调用服务时。在 [`docs/agent-readiness-scoring.md`](docs/agent-readiness-scoring.md) 和 [`docs/agent-readiness-spec-baseline.md`](docs/agent-readiness-spec-baseline.md) 中记录了评分和标准基线。
## 响应形状(快速智能审计)
```json
{
"tier": "paid",
"url": "https://example.com/",
"http_status": 200,
"timing_ms": { "ttfb": 166, "total": 168 },
"overall_score": 68,
"scores": { "performance": 100, "seo": 40, "accessibility": 100, "security": 33 },
"website_intelligence_score": 74,
"website_intelligence": {
"dimensions": {
"discoverable": 81,
"understandable": 68,
"callable": null,
"trustworthy": 73
},
"applicability": { "callable": "not_applicable" },
"coverage": { "tests_executed": 28, "tested_percent": 88 },
"confidence": 0.86,
"priority_fixes": []
},
"checks": { "performance": [ { "pass": true, "detail": "TTFB 166ms" } ] },
"issues": ["Missing canonical link", "Missing Content-Security-Policy header"]
}
```
错误为 `{ "error": "<human message>", "code": "<STABLE_CODE>" }`,代码为 `INVALID_URL`、`UNSUPPORTED_SCHEME`、`PRIVATE_ADDRESS_BLOCKED`、`RATE_LIMITED`、`AUDIT_TIMEOUT`、`TARGET_UNREACHABLE`、`AUDIT_FAILED`。
## 技术栈
Vercel 上的 Next.js 应用路由器。支付:`@x402/next` v2(`withX402` 包装器)+ `@x402/core`/`@x402/evm` 与 `@coinbase/x402`(Coinbase CDP 促进者 - 实际结算 Base 主网上的 USDC 的部分)以及 `@x402/extensions` Bazaar 发现扩展。审计引擎:`fetch` + `cheerio`,无无头浏览器。SSRF 防护:私有/保留/元 IP 被阻止,带有每个重定向跳的重新验证,15 秒超时,5 个重定向,5 MB 限制(`lib/safe-fetch.js`)。
## 开发
```bash
npm install
cp .env.example .env.local # 填写值
npm run dev # http://localhost:3000
npm test # 针对 BASE(默认为 localhost:3000)的 e2e 检查
BASE=https://api.santosautomation.com EXPECT_NETWORK=base npm test
```
网站智能层的关注检查:
```bash
npm run test:agent-readiness
npm run test:website-intelligence
npm run build
```
### 环境变量
参见 [.env.example](.env.example)。生产环境中需要:`CDP_API_KEY_ID`、`CDP_API_KEY_SECRET`(促进者身份验证)。可选:`DISCORD_WEBHOOK_URL`(支付通知),`PUBLIC_API_BASE_URL`(文档输出中的规范主机名),审计调优旋钮。
### 部署
`vercel --prod` 从链接的检出。Vercel 部署网站和 API 控制平面;浏览器渲染的工作器是一个单独的 Fly.io 部署,当工作器代码更改时必须单独发布。接收钱包和网络硬编码在 `app/api/audit/route.js` 中故意这样做 — 旧环境变量不会无声地将 API 切换回测试网络。
## 注册列表
x402 目录和 MCP 注册表的复制就绪提交文本:[`docs/registry-submissions.md`](docs/registry-submissions.md)。
## 操作员
Santos Automation(Juan Santos)— 定制 x402 API、Web 应用程序、电子商务和自动化系统。info@santosautomation.com · https://santosautomation.com
MCP 配置
以下是此 MCP Server 的配置信息,可直接复制到 Cursor 或其他 MCP 客户端中使用。
mcp.json
连接信息
猜你喜欢
暂无推荐服务器