内容
<h1 align="center">
WebSight API
<br/>
<sub>AI-Native Web Intelligence</sub>
</h1>
<p align="center">
<strong>一次 API 调用。七个智能模块。任意 URL。</strong>
<br/>
提取干净的内容、技术栈、SEO 分数、联系信息、结构化数据、AI 检测和域名情报 — 所有这些都针对 AI 代理和 LLM 应用进行了优化。
</p>
<p align="center">
<a href="https://apify.com/george.the.developer/websight-api"><img src="https://img.shields.io/badge/Apify-Actor-00B3E6?style=for-the-badge&logo=apify&logoColor=white" alt="Apify Actor" /></a>
<img src="https://img.shields.io/badge/Price-$0.005%2Fpage-10B981?style=for-the-badge" alt="Price" />
<img src="https://img.shields.io/badge/Modules-7-8B5CF6?style=for-the-badge" alt="Modules" />
<img src="https://img.shields.io/badge/Response-<2s-F59E0B?style=for-the-badge" alt="Speed" />
<img src="https://img.shields.io/badge/Cache-1hr_Free-3B82F6?style=for-the-badge" alt="Cache" />
<img src="https://img.shields.io/badge/Bulk-20_URLs-EF4444?style=for-the-badge" alt="Bulk" />
</p>
---
## 问题
构建需要网络情报的 AI 代理?今天您需要:
| 任务 | 单独 API | 成本 |
|------|-------------|------|
| 内容提取 | Diffbot / Jina | $0.01+ |
| 技术栈检测 | BuiltWith / Wappalyzer | $0.02+ |
| SEO 分析 | Moz / Ahrefs API | $0.05+ |
| 联系信息提取 | Hunter.io | $0.01+ |
| 结构化数据 | 自定义解析器 | 开发时间 |
| AI 内容检测 | GPTZero / Originality | $0.01+ |
| 域名情报 | WHOIS API | $0.01+ |
| **每页总计** | **7 个 API,7 个集成** | **$0.12+** |
**WebSight 以一次调用完成所有这些,价格为 $0.005。**
---
## 工作原理
```mermaid
flowchart LR
A["URL 输入"] --> B["获取和解析"]
B --> C1["干净的内容"]
B --> C2["技术栈"]
B --> C3["SEO 审计"]
B --> C4["联系信息"]
B --> C5["结构化数据"]
B --> C6["AI 评分"]
B --> C7["域名情报"]
C1 --> D["组合 JSON"]
C2 --> D
C3 --> D
C4 --> D
C5 --> D
C6 --> D
C7 --> D
D --> E["1 小时缓存"]
E --> F["响应"]
style A fill:#3B82F6,color:#fff,stroke:none
style B fill:#8B5CF6,color:#fff,stroke:none
style C1 fill:#10B981,color:#fff,stroke:none
style C2 fill:#10B981,color:#fff,stroke:none
style C3 fill:#10B981,color:#fff,stroke:none
style C4 fill:#10B981,color:#fff,stroke:none
style C5 fill:#10B981,color:#fff,stroke:none
style C6 fill:#10B981,color:#fff,stroke:none
style C7 fill:#10B981,color:#fff,stroke:none
style D fill:#F59E0B,color:#fff,stroke:none
style E fill:#EF4444,color:#fff,stroke:none
style F fill:#3B82F6,color:#fff,stroke:none
```
所有 7 个模块并行执行。平均响应时间小于 2 秒。
---
## 架构
```mermaid
graph TB
subgraph "客户端"
AI["AI 代理<br/>Claude, GPT, Gemini"]
MCP["MCP 服务器<br/>Cursor, Windsurf"]
APP["应用程序<br/>JS, Python, cURL"]
end
subgraph "WebSight API"
LB["HTTP 服务器<br/>待机模式"]
CACHE["内存缓存<br/>1 小时 TTL,LRU"]
SSRF["SSRF 保护<br/>私有 IP 阻止"]
subgraph "并行模块引擎"
M1["内容提取器<br/>Markdown / 文本 / HTML"]
M2["技术检测器<br/>40+ 技术"]
M3["SEO 分析器<br/>评分 0-100"]
M4["联系信息查找器<br/>电子邮件,电话,社交媒体"]
M5["结构化解析器<br/>OG,Twitter,JSON-LD"]
M6["AI 评分器<br/>5 因素启发式"]
M7["域名情报<br/>DNS,SPF,DMARC,WHOIS"]
end
end
subgraph "基础设施"
APIFY["Apify 平台"]
PPE["按事件付费<br/>$0.005/页"]
end
AI --> LB
MCP --> LB
APP --> LB
LB --> CACHE
LB --> SSRF
SSRF --> M1 & M2 & M3 & M4 & M5 & M6 & M7
LB --> APIFY
APIFY --> PPE
style AI fill:#8B5CF6,color:#fff,stroke:none
style MCP fill:#8B5CF6,color:#fff,stroke:none
style APP fill:#8B5CF6,color:#fff,stroke:none
style LB fill:#3B82F6,color:#fff,stroke:none
style CACHE fill:#F59E0B,color:#fff,stroke:none
style SSRF fill:#EF4444,color:#fff,stroke:none
style M1 fill:#10B981,color:#fff,stroke:none
style M2 fill:#10B981,color:#fff,stroke:none
style M3 fill:#10B981,color:#fff,stroke:none
style M4 fill:#10B981,color:#fff,stroke:none
style M5 fill:#10B981,color:#fff,stroke:none
style M6 fill:#10B981,color:#fff,stroke:none
style M7 fill:#10B981,color:#fff,stroke:none
style APIFY fill:#00B3E6,color:#fff,stroke:none
style PPE fill:#00B3E6,color:#fff,stroke:none
```
---
## 为什么选择 WebSight
### 与使用 7 个独立 API 的比较
| 功能 | 7 个独立 API | WebSight API |
|---------|:-:|:-:|
| 需要维护的 API 集成 | 7 | **1** |
| 身份验证令牌 | 7 | **1** |
| 每页成本 | ~$0.12 | **$0.005** |
| 需要的响应调用 | 7 个顺序 | **1 个并行** |
| 延迟 | 5-10 秒总计 | **<2 秒** |
| 缓存 | 自己构建 | **内置(免费)** |
| 批量支持 | 手动编排 | **原生(20 个 URL)** |
### 与原始 HTML 用于 AI 代理的比较
| 指标 | 原始 HTML | WebSight Markdown |
|--------|:-:|:-:|
| 标记数(典型页面) | ~15,000 | **~2,000** |
| 标记减少 | 0% | **~87%** |
| 噪音(广告,导航,脚本) | 包括 | **已移除** |
| LLM 格式 | 不可解析 | **干净的 Markdown** |
| 结构化元数据 | 必须解析 | **预提取的 JSON** |
| 在 GPT-4 费率下的成本($10/1M 标记) | $0.15/页 | **$0.02/页** |
### 标记节省示例
```
stripe.com 首页的原始 HTML:
<html><head><meta charset="utf-8"><meta name="viewport"...
<script>window.__NEXT_DATA__={...15KB 的 JSON...}</script>
<nav class="TopNav">...<div class="cookie-banner">...
========================
~18,400 个标记(GPT-4 费用 $0.184)
WebSight Markdown 输出:
# Stripe:互联网的金融基础设施
数百万公司使用 Stripe 在线和线下接受付款...
## 产品
- 支付:接受在线和线下付款
- 计费:建立和扩展您的 recurring 业务模式
- 连接:为平台设置多方支付
- 终端:构建线下支付体验
========================
~1,800 个标记(GPT-4 费用 $0.018)
标记节省:90% | 成本节省:每页 $0.166
```
---
## 快速入门
### cURL
```bash
# 全分析 — 所有 7 个模块
curl "https://george-the-developer--websight-api.apify.actor/analyze?url=https://stripe.com"
# 选择性模块 — 只需要你需要的
curl "https://george-the-developer--websight-api.apify.actor/analyze?url=https://stripe.com&modules=tech,seo,contacts"
# 批量分析 — 最多 20 个 URL
curl -X POST "https://george-the-developer--websight-api.apify.actor/analyze/bulk" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://stripe.com", "https://shopify.com", "https://vercel.com"]}'
```
### JavaScript / Node.js
```javascript
// 使用 Apify 待机端点
const BASE = 'https://george-the-developer--websight-api.apify.actor';
// 单个 URL — 完整分析
const response = await fetch(`${BASE}/analyze?url=https://stripe.com`);
const data = await response.json();
console.log(data.modules.content.text); // 干净的 Markdown
console.log(data.modules.tech.detected); // [{name: "React", category: "framework"}, ...]
console.log(data.modules.seo.score); // 78
console.log(data.modules.contacts.emails); // ["sales@stripe.com"]
console.log(data.modules.aiContent.verdict); // "likely_human"
// 选择性模块 — 节省处理时间
const seoOnly = await fetch(`${BASE}/analyze?url=https://stripe.com&modules=seo,tech`);
// 批量分析
const bulk = await fetch(`${BASE}/analyze/bulk`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
urls: ['https://stripe.com', 'https://shopify.com'],
modules: ['tech', 'seo', 'contacts']
})
});
const results = await bulk.json();
console.log(`Analyzed ${results.total} pages, charged for ${results.charged}`);
```
### Python
```python
import requests
BASE = "https://george-the-developer--websight-api.apify.actor"
# 单个 URL
resp = requests.get(f"{BASE}/analyze", params={"url": "https://stripe.com"})
data = resp.json()
# 访问模块
print(data["modules"]["content"]["text"][:200]) # 前 200 个字符的 Markdown
print(data["modules"]["tech"]["detected"]) # 技术栈
print(data["modules"]["seo"]["score"]) # SEO 评分 0-100
print(data["modules"]["domain"]["dns"]["a"]) # IP 地址
# 批量分析
bulk = requests.post(f"{BASE}/analyze/bulk", json={
"urls": ["https://stripe.com", "https://shopify.com", "https://vercel.com"],
"modules": ["tech", "contacts"]
})
for result in bulk.json()["results"]:
print(f"{result['url']}: {len(result['modules']['tech']['detected'])} technologies found")
```
### AI 代理集成(LangChain / Claude 工具)
```javascript
// 定义为 AI 代理的工具
const websightTool = {
name: 'analyze_website',
description: '从任何 URL 提取关于网站的综合情报:内容、技术栈、SEO、联系信息、AI 检测、域名信息',
parameters: {
url: { type: 'string', description: '要分析的 URL' },
modules: { type: 'string', description: '逗号分隔:content,tech,seo,contacts,structured,ai_score,domain' }
},
execute: async ({ url, modules }) => {
const params = new URLSearchParams({ url });
if (modules) params.set('modules', modules);
const res = await fetch(`https://george-the-developer--websight-api.apify.actor/analyze?${params}`);
return res.json();
}
};
// 您的代理现在可以调用:
// "分析 stripe.com 并告诉我他们使用的技术栈"
// "检查这篇博客文章是否是 AI 撰写的"
// "查找该公司的联系信息"
```
### MCP 服务器(即将推出)
WebSight API 设计为与 Cursor、Windsurf 和 Claude Desktop 等 AI 编码助手配合使用,MCP 服务器配置将很快发布。
```json
{
"mcpServers": {
"websight": {
"command": "npx",
"args": ["@anthropic/websight-mcp"],
"env": {
"WEBSIGHT_API_URL": "https://george-the-developer--websight-api.apify.actor"
}
}
}
}
```
---
## API 参考
### 端点
| 方法 | 路径 | 描述 |
|--------|------|-------------|
| `GET` | `/analyze?url=<url>` | 完整分析(所有模块) |
| `GET` | `/analyze?url=<url>&modules=tech,seo` | 选择性模块分析 |
| `POST` | `/analyze` | JSON 正文:{ url, modules?, contentFormat?, maxContentLength? } |
| `POST` | `/analyze/bulk` | JSON 正文:{ urls: [...], modules? }(最多 20 个 URL) |
| `GET` | `/` | 健康检查 + API 文档 |
### 查询参数
| 参数 | 类型 | 默认值 | 描述 |
|-----------|------|---------|-------------|
| `url` | 字符串 | *必填* | 要分析的 URL |
| `modules` | 字符串 | all | 以逗号分隔的模块列表 |
| `format` | 字符串 | `markdown` | 内容格式:`markdown`,`text`,`html` |
| `maxLength` | 整数 | `10000` | 最大内容字符数(500-100,000) |
### 可用模块
| 模块 | 键 | 返回内容 |
|--------|-----|-----------------|
| **干净的内容** | `content` | 优化的 Markdown/文本/HTML 标记。去除广告、导航、页脚、Cookie 横幅、脚本。减少 80-90% 的标记。 |
| **技术栈** | `tech` | 检测到的技术数组,附带类别。40+ 技术:CMS(WordPress、Shopify、Wix)、框架(React、Next.js、Vue、Angular、Svelte)、分析(GA、GTM、Hotjar、Segment)、基础设施(Cloudflare、Vercel、AWS)、支付(Stripe、PayPal)、安全(reCAPTCHA、hCaptcha)。 |
| **SEO 审计** | `seo` | 0-100 分、标题分析(长度 + 最佳范围)、元描述审计、标题结构(H1/H2)、规范 URL、机器人元标签、视口、图标、图像替代文本覆盖率、内部/外部链接数量、字数。 |
| **联系信息** | `contacts` | 电子邮件(过滤、去重)、电话号码、社交媒体资料:LinkedIn、Twitter/X、Facebook、Instagram、GitHub、YouTube。 |
| **结构化数据** | `structured` | OpenGraph 标签(标题、图像、描述、类型)、Twitter 卡片数据、JSON-LD 模式(解析和标准化)。 |
| **AI 内容评分** | `ai_score` | 0-100 分,附有判决(`ai_generated`、`likely_ai`、`mixed`、`likely_human`、`human_written`)。5 因素分析:句子一致性、AI 短语密度、词汇多样性(TTR)、可读性(Flesch-Kincaid)、段落一致性。 |
| **域名情报** | `domain` | DNS 记录(A、AAAA、MX、NS)、SPF 验证、DMARC 检查、WHOIS 数据(创建时间、注册商、域名年龄(天))。 |
---
## 输入模式
在标准 Apify Actor(非 API 模式)下运行:
```json
{
"url": "https://stripe.com",
"urls": ["https://stripe.com", "https://shopify.com"],
"modules": ["content", "tech", "seo", "contacts", "structured", "ai_score", "domain"],
"contentFormat": "markdown",
"maxContentLength": 10000
}
```
---
## 输出示例
`GET /analyze?url=https://stripe.com` 的完整响应:
```json
{
"url": "https://stripe.com",
"analyzedAt": "2026-03-22T14:30:00.000Z",
"fetchInfo": {
"statusCode": 200,
"responseTimeMs": 847,
"contentLength": 198432
},
"modules": {
"content": {
"format": "markdown",
"text": "# Stripe:互联网的金融基础设施\n\n数百万公司使用 Stripe 在线和线下接受付款、发送付款、自动化财务流程,并最终增加收入。\n\n## 产品\n\n- 支付:接受在线和线下付款\n- 计费:建立和扩展您的 recurring 业务模式\n- 连接:为平台设置多方支付\n- 终端:构建线下支付体验\n...",
"charCount": 4823
},
"tech": {
"detected": [
{ "name": "React", "category": "framework" },
{ "name": "Next.js", "category": "framework" },
{ "name": "Cloudflare", "category": "infra" },
{ "name": "Google Analytics", "category": "analytics" },
{ "name": "Google Tag Manager", "category": "analytics" },
{ "name": "Segment", "category": "analytics" },
{ "name": "Stripe", "category": "payment" }
]
},
"seo": {
"score": 82,
"title": {
"text": "Stripe | 互联网的金融基础设施",
"length": 51,
"optimal": true
},
"metaDescription": {
"text": "Stripe 支持在线和线下支付处理以及各类企业的财务解决方案。",
"length": 106,
"optimal": true
},
"headings": {
"h1": ["互联网的金融基础设施"],
"h2": ["产品", "用例", "集成和自定义解决方案", "开始使用"]
},
"canonical": "https://stripe.com",
"robots": "",
"viewport": true,
"favicon": true,
"images": { "total": 34, "withAlt": 30, "withoutAlt": 4 },
"links": { "internal": 87, "external": 12 },
"wordCount": 2341
},
"contacts": {
"emails": ["sales@stripe.com", "support@stripe.com"],
"phones": [],
"socialProfiles": {
"twitter": "https://twitter.com/stripe",
"linkedin": "https://www.linkedin.com/company/stripe",
"github": "https://github.com/stripe",
"youtube": "https://www.youtube.com/stripe"
}
},
"structured": {
"openGraph": {
"title": "Stripe | 互联网的金融基础设施",
"description": "Stripe 支持在线和线下支付处理...",
"image": "https://images.ctfassets.net/fzn2n1nzq965/og-image.png",
"type": "website",
"url": "https://stripe.com"
},
"twitterCard": {
"card": "summary_large_image",
"site": "@stripe",
"title": "Stripe | 互联网的金融基础设施"
},
"jsonLd": [
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Stripe",
"url": "https://stripe.com"
}
]
},
"aiContent": {
"score": 28,
"verdict": "likely_human",
"factors": [
{ "name": "sentence_uniformity", "score": 30, "weight": 15 },
{ "name": "ai_phrase_density", "score": 10, "weight": 20 },
{ "name": "vocabulary_diversity", "score": 50, "weight": 10 },
{ "name": "readability", "score": 50, "weight": 8 },
{ "name": "paragraph_uniformity", "score": 20, "weight": 8 }
]
},
"domain": {
"hostname": "stripe.com",
"dns": {
"a": ["3.18.12.63", "3.18.1.20"],
"aaaa": [],
"mx": [
{ "priority": 1, "exchange": "aspmx.l.google.com" },
{ "priority": 5, "exchange": "alt1.aspmx.l.google.com" }
],
"ns": ["ns-423.awsdns-52.com", "ns-1408.awsdns-48.org"],
"hasSPF": true,
"hasDMARC": true
},
"age": {
"created": "2009-09-16T04:00:00Z",
"registrar": "SafeNames Ltd.",
"daysOld": 6032
}
}
},
"processingTimeMs": 1843
}
```
---
## 用例
```mermaid
mindmap
root((WebSight API))
AI Agents
研究助手
内容总结器
竞争分析机器人
潜在客户资格评估代理
潜在客户生成
大规模联系信息提取
技术栈定位
公司信息丰富
SEO 工具
网站审计
竞争对手基准测试
内容质量评分
竞争情报
技术栈监控
域名年龄验证
社交媒体存在映射
内容分析
AI 内容检测
可读性评分
结构化数据验证
安全与信任
域名声誉检查
SPF/DMARC 验证
SSL 和 DNS 审计
```
## 定价
**每分析一个页面收取 0.005 美元** (半美分)。
1小时内缓存的响应 **免费** 且返回时间 <500ms。
| 分析页面数量 | 费用 | 有效价格 |
|--------|------|-----------------|
| 100 | $0.50 | $0.005/页面 |
| 1,000 | $5.00 | $0.005/页面 |
| 10,000 | $50.00 | $0.005/页面 |
| 100,000 | $500.00 | $0.005/页面 |
**分析1,000个页面的成本比较:**
| 解决方案 | 每月费用 |
|----------|:-:|
| BuiltWith + Hunter + Moz + GPTZero + ... | **$120+** |
| WebSight API (所有7个模块) | **$5.00** |
| 节省 | **96%** |
> Apify 上提供免费层。开始使用 5 美元的免费平台积分。
---
## 功能概览
| 功能 | 详情 |
|---------|---------|
| **模块** | 7个智能模块,全部一次调用 |
| **内容格式** | Markdown(默认)、纯文本、HTML |
| **技术检测** | 7类40+种技术 |
| **SEO评分** | 0-100权重评分,12个排名因素 |
| **AI检测** | 5因素启发式分析,5个置信度级别 |
| **DNS分析** | A、AAAA、MX、NS、SPF、DMARC记录 |
| **WHOIS** | 域名年龄、注册商、创建时间 |
| **缓存** | 1小时TTL、LRU逐出、缓存=免费 |
| **批量** | 每个请求最多20个URL |
| **SSRF保护** | 内置私有IP阻塞 |
| **CORS** | 启用所有来源 |
| **超时** | 每个URL获取15秒,300秒执行超时 |
| **内存** | 默认分配2GB |
---
## 常见问题
<details>
<summary><strong>什么算作一个“分析页面”?</strong></summary>
每个唯一URL分析算作一个页面。如果您在1小时内请求相同的URL,则缓存结果免费返回。批量请求按分析的URL收费(不是按API调用次数)。
</details>
<details>
<summary><strong>我可以选择要运行哪些模块吗?</strong></summary>
是的。传递 `modules=tech,seo,contacts` 作为查询参数(GET)或JSON正文(POST)。只有选定的模块执行,但无论模块数量多少,每个页面的价格相同。
</details>
<details>
<summary><strong>AI内容检测的准确性如何?</strong></summary>
AI内容评分器使用5个启发式因素:句子统一性、AI短语密度、词汇多样性(类型-标记比率)、可读性(Flesch-Kincaid)和段落统一性。它返回0-100的分数和从 `human_written` 到 `ai_generated` 的判决。它是一个启发式模型,而不是训练好的分类器——最好作为其他分析的信号使用,而不是作为唯一证据。
</details>
<details>
<summary><strong>它能否处理JavaScript渲染的页面?</strong></summary>
当前版本使用HTTP获取和Cheerio解析,可用于服务器渲染和静态页面。对于重度SPA/JavaScript渲染页面,内容提取可能有限。基于Puppeteer的渲染作为依赖项提供,可能会在未来更新中启用。
</details>
<details>
<summary><strong>关于速率限制呢?</strong></summary>
没有人为设置的速率限制。通过量由Apify平台并发性和2GB内存分配限制。对于高容量批量作业,请使用批量端点或直接使用 `urls` 输入字段运行执行器。
</details>
<details>
<summary><strong>WHOIS数据是否始终可用?</strong></summary>
WHOIS查询是尽力而为。一些TLD或注册商会阻止自动WHOIS查询。当不可用时,`domain.age`字段返回 `null`,但所有DNS记录(A、MX、NS、SPF、DMARC)仍然被解析。
</details>
<details>
<summary><strong>我可以使用自己的Apify代理吗?</strong></summary>
是的。在直接运行执行器(非通过备用API)时,您可以在输入模式的 `proxyConfiguration` 下配置Apify代理。这有助于处理阻止数据中心IP的站点。
</details>
<details>
<summary><strong>如果目标URL不可用,会发生什么?</strong></summary>
API返回502状态, `{ "url": "...", "error": "Failed to fetch: ...", "statusCode": 502 }`。您不会为失败的获取计费。
</details>
---
## 链接
- **Apify商店**: [george.the.developer/websight-api](https://apify.com/george.the.developer/websight-api)
- **API端点**: `https://george-the-developer--websight-api.apify.actor`
- **作者**: [george.the.developer](https://apify.com/george.the.developer) 在Apify上
---
<p align="center">
由 <a href="https://apify.com/george.the.developer">george.the.developer</a> 构建
<br/>
<sub>WebSight API — 以AI视角看世界。</sub>
</p>
MCP 配置
以下是此 MCP Server 的配置信息,可直接复制到 Cursor 或其他 MCP 客户端中使用。
mcp.json
连接信息
猜你喜欢
暂无推荐服务器