g-mcp-tools-fast-生产就绪富集API
带9个丰富工具的企业级数据智能API+批量处理
🚀 状态: 生产就绪| SaaS就绪|完全部署 🔗 实时端点: https://scaile--g-mcp-tools-fast-api.modal.run 📚 交互式文档: Swagger 用户界面 | ReDoc
______________________________________________________________________
🎯 概述
在Modal.com上构建了一个完整的数据丰富API,将人工智能网络抓取与8种专门的智能工具相结合。非常适合销售情报、市场研究、潜在客户丰富和数据验证。
主要特点
✅ 9个丰富工具 -网络抓取、电子邮件情报、公司数据、电话验证等 ✅ 批量加工 -与自动检测并行处理100s-1000条记录 ✅ 智能自动检测 -自动检测数据类型并应用适当的工具 ✅ 多工具丰富 -在一条记录上组合多个工具 ✅ 人工智能驱动的提取 -使用Gemini 2.5 Flash进行智能数据提取 ✅ 生产准备就绪 -身份验证、健康检查、全面的错误处理 ✅ 自动缩放 -无服务器架构自动处理流量峰值 ✅ 24小时缓存 -降低成本并缩短响应时间 ✅ OpenAPI文档 -Swagger/ReDoc便于集成 ✅ 类型安全 -所有输入/输出的Pydantic模型
______________________________________________________________________
🚀 批量处理和电源特性
新 通过智能自动检测并行处理多条记录!
多工具丰富(/enrich)
同时使用多个工具丰富单个记录:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/enrich \
-H 'Content-Type: application/json' \
-d '{
"data": {
"phone": "+14155552671",
"email": "john@anthropic.com"
},
"tools": ["phone-validation", "email-intel", "email-pattern"]
}'自动检测(/enrich/auto)
自动检测数据类型并应用适当的工具:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/enrich/auto \
-H 'Content-Type: application/json' \
-d '{
"data": {
"contact_phone": "+14155552671",
"work_email": "john@anthropic.com",
"company_domain": "anthropic.com"
}
}'答复: 自动检测并丰富了5个工具(电话验证、电子邮件情报、电子邮件模式、WHOIS、技术栈)!
批量加工(/bulk)
使用显式工具并行处理多条记录:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/bulk \
-H 'Content-Type: application/json' \
-d '{
"rows": [
{"name": "Alice Johnson", "email": "alice@example.com"},
{"name": "Bob Smith", "email": "bob@example.com"}
],
"tools": ["email-intel", "email-pattern"]
}'答复:
{
"success": true,
"batch_id": "batch_1761503726531_7AzCBh1nHak",
"status": "completed",
"total_rows": 2,
"successful": 2,
"failed": 0,
"processing_time_seconds": 1.24,
"results": [ /* enriched rows */ ]
}批量自动加工(/bulk/auto)
使用自动刀具检测处理多条记录:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/bulk/auto \
-H 'Content-Type: application/json' \
-d '{
"rows": [
{"name": "Alice", "email": "alice@example.com", "website": "example.com"},
{"name": "Bob", "phone": "+14155551234"}
]
}'智能功能:
- ✅ 自动检测电子邮件、电话、域名、公司、GitHub用户名
- ✅ 应用适当的工具(电子邮件情报、电子邮件模式、whois、技术栈等)
- ✅ 使用asyncio并行处理行
- ✅ 每批最多可处理10000行
- ✅ 返回详细的成功/错误统计信息
______________________________________________________________________
🛠️ 个人扩展工具
1. 网络爬虫 (/scrape)
使用自然语言提示从任何网站提取结构化数据。
能力:
- 使用Gemini 2.5 Flash进行人工智能提取
- 具有自动发现功能的多页抓取
- 自定义JSON模式支持
- 链接提取
- 24小时智能缓存
例子:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/scrape \
-H 'Content-Type: application/json' \
-d '{
"url": "https://anthropic.com",
"prompt": "Extract the company mission and product names",
"max_pages": 1
}'答复:
{
"success": true,
"data": {
"company_mission": "Build safe, beneficial AI...",
"product_names": ["Claude", "Claude Code", "Opus", "Sonnet", "Haiku"]
},
"metadata": {
"extraction_time": 10.31,
"pages_scraped": 1,
"model": "gemini-2.5-flash"
}
}______________________________________________________________________
2. 给英特尔发电子邮件 (/email-intel)
检查电子邮件在哪些平台上注册(holehe)。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/email-intel \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'______________________________________________________________________
3. 邮件搜索者 (/email-finder)
查找与域(theHarvester)关联的电子邮件地址。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/email-finder \
-H 'Content-Type: application/json' \
-d '{"domain": "anthropic.com", "limit": 10}'______________________________________________________________________
4. 公司数据 (/company-data)
获取公司注册和公司信息(OpenCorporates)。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/company-data \
-H 'Content-Type: application/json' \
-d '{"companyName": "Anthropic", "domain": "anthropic.com"}'______________________________________________________________________
5. 电话验证 (/phone-validation)
使用运营商、位置和线路类型信息验证电话号码。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/phone-validation \
-H 'Content-Type: application/json' \
-d '{"phoneNumber": "+14155552671", "defaultCountry": "US"}'答复:
{
"success": true,
"data": {
"valid": true,
"formatted": {
"e164": "+14155552671",
"international": "+1 415-555-2671",
"national": "(415) 555-2671"
},
"country": "San Francisco, CA",
"carrier": "Unknown",
"lineType": "FIXED_LINE_OR_MOBILE",
"lineTypeCode": 2
}
}______________________________________________________________________
6. 技术栈 (/tech-stack)
检测网站使用的技术和框架。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/tech-stack \
-H 'Content-Type: application/json' \
-d '{"domain": "anthropic.com"}'答复:
{
"success": true,
"data": {
"domain": "anthropic.com",
"technologies": [
{"name": "Next.js", "category": "Framework"},
{"name": "cloudflare", "category": "Web Server"}
],
"totalFound": 2
}
}______________________________________________________________________
7. 电子邮件模式 (/email-pattern)
为域生成通用电子邮件模式。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/email-pattern \
-H 'Content-Type: application/json' \
-d '{"domain": "anthropic.com", "firstName": "John", "lastName": "Doe"}'______________________________________________________________________
8. WHOIS (/whois)
查找域名注册信息。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/whois \
-H 'Content-Type: application/json' \
-d '{"domain": "anthropic.com"}'答复:
{
"success": true,
"data": {
"domain": "anthropic.com",
"registrar": "MarkMonitor, Inc.",
"creationDate": "2001-10-02",
"expirationDate": "2033-10-02",
"nameServers": ["ISLA.NS.CLOUDFLARE.COM", "RANDY.NS.CLOUDFLARE.COM"]
}
}______________________________________________________________________
9. GitHub英特尔 (/github-intel)
分析GitHub用户配置文件和存储库。
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/github-intel \
-H 'Content-Type: application/json' \
-d '{"username": "anthropics"}'答复:
{
"success": true,
"data": {
"username": "anthropics",
"name": "Anthropic",
"location": "United States of America",
"publicRepos": 54,
"followers": 14565,
"languages": {
"Python": 6,
"TypeScript": 3,
"JavaScript": 1
}
}
}______________________________________________________________________
🔐 认证
API支持通过 x-api-key 头球
启用身份验证
- 创建模态秘密:
modal secret create modal-api-key MODAL_API_KEY=your-secret-key-here- 重新部署API:
./DEPLOY_G_MCP_TOOLS.sh- 在请求中包含API密钥:
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/scrape \
-H 'Content-Type: application/json' \
-H 'x-api-key: your-secret-key-here' \
-d '{"url": "https://example.com", "prompt": "Extract data"}'注: 如果 MODAL_API_KEY 未设置,API是可公开访问的(对开发有用)。
______________________________________________________________________
🚀 部署
先决条件
- 安装Modal CLI:
pip install modal- 身份验证:
modal setup- 创建Gemini API机密:
modal secret create gemini-secret GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-key部署
chmod +x DEPLOY_G_MCP_TOOLS.sh
./DEPLOY_G_MCP_TOOLS.sh或手动:
modal deploy g-mcp-tools-complete.py______________________________________________________________________
🏥 健康检查
监控API状态:
curl https://scaile--g-mcp-tools-fast-api.modal.run/health答复:
{
"status": "healthy",
"service": "g-mcp-tools-fast",
"version": "1.0.0",
"tools": 9,
"timestamp": "2025-10-26T17:30:00.000000Z"
}______________________________________________________________________
📊 响应格式
所有端点都遵循一致的响应格式:
成功响应
{
"success": true,
"data": { ... },
"metadata": {
"source": "tool-name",
"timestamp": "2025-10-26T17:30:00.000000Z"
}
}错误响应
{
"success": false,
"error": "Error message",
"metadata": {
"source": "tool-name",
"timestamp": "2025-10-26T17:30:00.000000Z"
}
}______________________________________________________________________
💰 成本优化
API包括几个节省成本的功能:
- 24小时缓存 -重复请求返回缓存结果
- 超时 -防止进程失控(默认30秒,最大120秒)
- 容器空闲超时 -容器在120秒不活动后关闭
- 高效利用资源 -仅在需要时运行
预估成本(模态定价):
- 网络抓取:每次请求约0.001美元
- 其他工具:每次请求约0.0001美元
- 缓存命中率:0美元(从内存中提供)
______________________________________________________________________
🧪 测试
运行所有测试
# Test all 9 endpoints
./test-all-endpoints.sh单个端点测试
# Email pattern
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/email-pattern \
-H 'Content-Type: application/json' \
-d '{"domain": "anthropic.com"}'
# Phone validation
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/phone-validation \
-H 'Content-Type: application/json' \
-d '{"phoneNumber": "+14155552671"}'
# GitHub intel
curl -X POST https://scaile--g-mcp-tools-fast-api.modal.run/github-intel \
-H 'Content-Type: application/json' \
-d '{"username": "anthropics"}'______________________________________________________________________
📈 SaaS准备情况检查表
- \[x\] 健康检查端点 -
/health用于监控 - \[x\] API身份验证 -可选
x-api-key头球 - \[x\] OpenAPI文档 -Swagger UI+ReDoc
- \[x\] 错误处理 -全面的错误响应
- \[x\] 输入验证 -Pydantic模型
- \[x\] 速率限制 -由Modal平台处理
- \[x\] 监控 -模态仪表板+日志
- \[x\] 自动缩放 -无服务器架构
- \[x\] 成本优化 -缓存+超时
- \[x\] 类型安全 -TypeScript风格类型
准备出售为:
✅ B2B SaaS API ✅ 数据丰富服务 ✅ Lead智能平台 ✅ 市场研究工具
______________________________________________________________________
🔧 监控和日志
查看日志
modal app logs g-mcp-tools-fast --follow检查应用程序状态
modal app list | grep g-mcp-tools查看秘密
modal secret list______________________________________________________________________
🏗️ 建筑
Client Request
↓
FastAPI (Modal ASGI)
↓
Authentication Check (optional)
↓
Input Validation (Pydantic)
↓
Cache Check (24h TTL)
↓ (cache miss)
Tool Execution
├→ Web Scraper (crawl4ai + Gemini)
├→ Email Intel (holehe)
├→ Email Finder (theHarvester)
├→ Company Data (OpenCorporates API)
├→ Phone Validation (libphonenumber)
├→ Tech Stack (custom detection)
├→ Email Pattern (pattern generation)
├→ WHOIS (python-whois)
└→ GitHub Intel (GitHub API)
↓
Cache Result
↓
JSON Response______________________________________________________________________
📝 许可证
有关许可证信息,请参阅父存储库。
______________________________________________________________________
🤝 支持
- 文档: Swagger 用户界面
- 问题: 通过GitHub报告问题
- 模态支持: modal.com/docs
______________________________________________________________________
🎯 用例
销售情报
- 用公司信息丰富潜在客户数据
- 查找联系人电子邮件和电话号码
- 验证联系信息
市场调研
- 删除竞争对手网站
- 分析技术栈
- 通过WHOIS跟踪公司变更
开发人员智能
- 分析GitHub配置文件
- 检测使用的技术
- 研究开发者生态系统
数据验证
- 验证电话号码
- 验证电子邮件模式
- 检查域名注册
______________________________________________________________________
内置: Modal.com | FastAPI | Gemini 2.5 Flash | crawl4ai
