The web scraper built for AI agents. Single binary. Zero config.
Works with: Claude Code · Cursor · Windsurf · Cline · Copilot · Continue.dev · Codex · Gemini CLI
Quick Start • AI Agents • Benchmarks • API Reference • Cloud • Discord
English | 中文
______________________________________________________________________
新增功能
0.9.0 (2026-05-16)
特性
- cli: 添加AI提取标志
crw setup --reset(912eea0)
______________________________________________________________________
fastCRW-人工智能代理的开源Web抓取API
为AI代理提供干净的网络数据。 单一Rust二进制,零配置,兼容Firecrawl的API。您可以免费自行托管开源Firecrawl替代方案,或使用我们的 托管云.
不想自己主持? 免费注册→ --具有全球代理网络、网络搜索和仪表板的托管云。相同的API,零基础设施。 500个免费信用点,无需信用卡。
______________________________________________________________________
为什么选择CRW?--Firecrawl和Crawl4AI替代方案
- 单二进制,6 MB RAM --没有Redis,没有Node.js,没有容器。Firecrawl需要5个容器和4 GB+。Crawl4AI需要Python+剧作家
- 比Firecrawl快5.5倍 --平均833毫秒vs 4600毫秒(查看基准).446ms时的P50
- 73/100搜索获胜率 --在面对面的基准测试中击败Firecrawl(25/100)和Tavily(2/100)
- 免费自助托管 --0美元/1K的抓取,而Firecrawl的抓取为0.83-5.33美元。无红外线,无冷启动(85毫秒)。本地模式不需要API密钥
- 代理就绪 --在一个命令中添加到任何MCP客户端。嵌入式模式:无需服务器
- 兼容Firecrawl的API --替换掉。相同
/v1/scrape,/v1/crawl,/v1/map端点。HTML到markdown、结构化数据提取、网站爬虫——所有这些都是内置的 - 为RAG管道而建 --为矢量数据库和AI数据摄取提供干净的LLM就绪标记输出
- 开源 --AGPL-3.0,透明开发。 加入我们的社区
| 度量 | CRW(自托管) | fastcrw.com(云) | Firecrawl | Tavily | Crawl4AI |
|---|---|---|---|---|---|
| 覆盖范围(1K网址) | 92.0% | 92.0% | 77.2% | — | — |
| 平均刮擦延迟 | 833毫秒 | 833毫秒 | 4600ms | -- | -- |
| 平均搜索延迟 | 880毫秒 | 880毫秒 | 954毫秒 | 2000毫秒 | -- |
| 搜索获胜率 | 73/100 | 73/100 | 25/100 | 2/100 | — |
| 空闲RAM | 6.6 MB | 0(托管) | ~500 MB+ | --(云) | -- |
| 冷启动 | 85毫秒 | 0(始终开启) | 30-60秒 | -- | -- |
| 自足执行 | 单个二进制 | -- | 多容器 | 否 | Python+剧作家 |
| 成本/1K刮擦 | $0 (自托管) | 每月13美元起 | 0.83-5.33 | -- | 0美元 |
| 许可证 | AGPL-3.0 | 管理型 | AGPL-3.0 | 专有 | Apache-2.0 |
______________________________________________________________________
Web抓取和爬行功能
核心
| 特性 | 描述 |
|---|---|
| 刮擦 | 将任何URL转换为markdown、HTML、JSON或链接 |
| 爬行 | 具有速率限制的异步BFS网站爬虫 |
| 地图 | 立即发现网站上的所有URL |
| 搜索 | 网络搜索+内容抓取——捆绑SearXNG sidecar,免费Tavily替代品 |
更多
| 特性 | 描述 |
|---|---|
| LLM提取 | 发送JSON模式,获取经过验证的结构化数据 |
| LLM总结 | formats: ["summary"] 上 /v1/scrape --任何一页的干净散文摘要。BYOK(Anthropic/OpenAI/Azure/DeepSeek/任何兼容OpenAI的)。 |
| LLM搜索答案 | answer: true / summarizeResults: true 上 /v1/search --附有引文或每个结果摘要的综合答案 |
| JS渲染 | 自动检测SPA,通过LightPanda或Chrome渲染 |
| 命令行界面 | 从终端中删除任何URL——无需服务器 |
| MCP服务器 | 内置stdio+HTTP传输,适用于任何AI代理 |
使用案例: RAG管道·AI代理网络访问·内容监控·数据提取·HTML到markdown转换·网络归档
______________________________________________________________________
🚀 快速开始
# Install:
curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw sh
# Interactive setup wizard (recommended):
crw setup
# Scrape:
crw example.com
# Add to Claude Code (local):
claude mcp add crw -- npx crw-mcp
# Add to Claude Code (cloud — includes web search, 500 free credits at fastcrw.com):
claude mcp add -e CRW_API_URL=https://fastcrw.com/api -e CRW_API_KEY=your-key crw -- npx crw-mcp或者:pip install crw(Python SDK)·npx crw-mcp(零安装)·brew install us/crw/crw(自制)· 所有安装选项→
刮擦
将任何URL转换为干净的markdown、HTML或结构化JSON。
from crw import CrwClient
client = CrwClient(api_url="https://fastcrw.com/api", api_key="YOUR_API_KEY") # local: CrwClient()
result = client.scrape("https://example.com")
print(result["markdown"])本地模式:CrwClient()在没有参数的情况下,运行一个自包含的抓取引擎——没有服务器,没有API键,没有设置。SDK会自动下载crw-mcp首次使用二进制。
CLI / cURL
CLI:
crw example.com
crw example.com --format html
crw example.com --js --css 'article'自托管 (crw-server 运行于 :3000):
curl -X POST http://localhost:3000/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'云:
curl -X POST https://fastcrw.com/api/v1/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'LLM总结 (BYOK--带上您自己的提供商密钥):
curl -X POST http://localhost:3000/v1/scrape \
-H "Content-Type: application/json" \
-d '{
"url": "https://en.wikipedia.org/wiki/Tokio_(software)",
"formats": ["markdown", "summary"],
"summaryPrompt": "Answer in two sentences.",
"maxContentChars": 50000,
"llmProvider": "openai-compatible",
"llmModel": "deepseek-chat",
"baseUrl": "https://api.deepseek.com/v1",
"llmApiKey": "YOUR_PROVIDER_KEY"
}'输出:
# Example Domain
This domain is for use in illustrative examples in documents.
You may use this domain in literature without prior coordination.渲染器选择和响应元数据
CRW在每个请求的三个渲染后端之间进行选择:
http(1学分)--纯HTTP获取。用于静态页面。lightpanda(1学分)——适用于大多数SPA的轻量级JS渲染器。chrome(2学分)-LightPanda水合作用崩溃的网站(例如一些Next.js App Router页面)的完整Chromium。
默认情况下,引擎会自动选择,在重复故障后学习每个主机的偏好,并在chrome上掉落→ 轻熊猫→ http透明。通过 "renderer" 固定其中一个 auto | http | lightpanda | chrome (Firecrawl的 engine 也被接受为别名)。
每个成功的响应都包含路由元数据,以便调用者可以进行审核和调试:
{
"data": {
"markdown": "...",
"renderDecision": {
"kind": "failover", // autoDefault | autoPromoted | userPinned | failover | breakerSkipped
"chain": ["lightpanda", "chrome"], // renderers actually attempted
"reason": "nextJsClientError" // why the chain advanced
},
"creditCost": 2,
"warnings": [
"lightpanda returned a failed render (nextjs_client_error)"
],
"metadata": { "renderedWith": "chrome", /* … */ }
}
}当您硬固定失败的渲染器时(例如。 "renderer":"lightpanda" 在水合作用崩溃页面上), success 停留 true 为了协议兼容性——但是 data.warnings[] 带有可操作的暗示 renderer="chrome" 或自动模式。客户端应显示警告数组。
爬行
异步抓取网站的所有页面。
from crw import CrwClient
client = CrwClient(api_url="https://fastcrw.com/api", api_key="YOUR_API_KEY") # local: CrwClient()
pages = client.crawl("https://docs.example.com", max_depth=2, max_pages=50)
for page in pages:
print(page["metadata"]["sourceURL"], page["markdown"][:80])CLI / cURL
# Start crawl
curl -X POST http://localhost:3000/v1/crawl \
-H "Content-Type: application/json" \
-d '{"url": "https://docs.example.com", "maxDepth": 2, "maxPages": 50}'
# Check status (use job ID from above)
curl http://localhost:3000/v1/crawl/JOB_ID地图
立即发现网站上的所有URL。
from crw import CrwClient
client = CrwClient(api_url="https://fastcrw.com/api", api_key="YOUR_API_KEY") # local: CrwClient()
urls = client.map("https://example.com")
print(urls) # ["https://example.com", "https://example.com/about", ...]cURL
curl -X POST http://localhost:3000/v1/map \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'URL筛选(默认启用)
/v1/map 默认情况下过滤其输出以保留内容URL并删除 事务操作URL(例如WooCommerce ?add-to-cart=…, ?add_to_wishlist=…&_wpnonce=…).跟踪参数(utm_*, gclid, fbclid,…)从剩余的URL中删除。伯爵回来了 droppedActionCount 和 strippedTrackingCount.
按请求字段(全部可选):
| 现场 | 效果 |
|---|---|
ignoreQueryParameters: true | 与粗略Firecrawl兼容:从保留的URL中删除所有参数(动作删除仍在运行)。 |
ignoreQueryParameters: false | 禁用两个过滤器——原始URL |
stripTrackingParams: bool | 仅切换B层。 |
dropActionUrls: bool | 仅切换A级。 |
extraTrackingParams: [string] | 加法(≤64个键)。 |
extraActionParams: [string] | 加法(≤64个键)。 |
preserveParams: [string] | 切勿剥去/掉落这些钥匙(≤64个钥匙)。 |
优先级:按请求值>TOML([map.url_filter])>编译时间 默认(两者 true).要全局恢复预过滤器行为,请设置 strip_tracking_params = false 和 drop_action_urls = false 在 config.default.toml.
搜索
搜索网络并从结果中获取整页内容。自托管CRW 配备SearXNG侧三轮的船只(由自动启动 docker compose up), 所以搜索是开箱即用的-- 不需要Tavily/Serper/Brave API密钥, 0美元/月带有30行迁移适配器的Tavily风格端点——请参见 这 Tavily相容性矩阵 对于每个字段的差异。
from crw import CrwClient
# Self-hosted (default Docker compose stack)
client = CrwClient(api_url="http://localhost:3000")
results = client.search("open source web scraper 2026", limit=10)
# Or cloud
# client = CrwClient(api_url="https://fastcrw.com/api", api_key="YOUR_KEY")cURL
# Self-hosted
curl -X POST http://localhost:3000/v1/search \
-H "Content-Type: application/json" \
-d '{"query": "open source web scraper 2026", "limit": 10}'
# With grouped sources + scrape enrichment
curl -X POST http://localhost:3000/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "rust async runtime",
"sources": ["web", "news"],
"scrapeOptions": {"formats": ["markdown"]}
}'
# With LLM answer synthesis over the top results (BYOK)
curl -X POST http://localhost:3000/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "what is tokio rust",
"limit": 3,
"answer": true,
"answerTopN": 3,
"answerPrompt": "Respond in Turkish in two sentences.",
"scrapeOptions": {"formats": ["markdown"]},
"llmApiKey": "sk-...",
"llmProvider": "openai",
"llmModel": "gpt-4o-mini"
}'侧三轮使用上游 searxng/searxng 已挂载配置的映像 只读自 config/searxng/settings.yml.指向现有 改用SearXNG实例,设置 CRW_SEARCH__SEARXNG_URL=http://your-host:8080 并删除 searxng 从撰写文件中提取服务。禁用搜索 完全,设置 [search].enabled = false 在您的配置中,路由将 返回clear search_disabled 错误。
API终点
| 方法 | 端点 | 描述 |
|---|---|---|
POST | /v1/scrape | 报废单个URL,可选地使用LLM提取 |
POST | /v1/crawl | 启动异步BFS爬网(返回作业ID) |
GET | /v1/crawl/:id | 检查爬网状态并检索结果 |
DELETE | /v1/crawl/:id | 取消正在运行的爬网作业 |
POST | /v1/map | 发现网站上的所有URL |
POST | /v1/search | 通过SearXNG sidecar进行网络搜索,可选择内容抓取 |
GET | /health | 健康检查(无需身份验证) |
POST | /mcp | 流式HTTP MCP传输 |
______________________________________________________________________
🤖 连接到AI代理
在几秒钟内将CRW添加到任何AI代理或MCP客户端。
技能
使用一个命令将CRW技能安装到所有检测到的代理:
npx crw-mcp init --all安装后重新启动代理。适用于Claude Code、Cursor、Gemini CLI、Codex、OpenCode和Windsurf。
用于AI代理的MCP服务器
将CRW添加到任何兼容MCP的客户端:
{
"mcpServers": {
"crw": {
"command": "npx",
"args": ["crw-mcp"]
}
}
}适用于Claude Desktop、Cursor、Windsurf、Cline、Continue.dev和任何MCP客户端。 配置文件位置: 克劳德代码--claude mcp add(无文件编辑)。克劳德桌面--~/Library/Application Support/Claude/claude_desktop_config.json.光标--.cursor/mcp.json.风帆冲浪--~/.codeium/windsurf/mcp_config.json. 所有客户→
云模式 --点击fastcrw.com查看全球代理网络和仪表板:
{
"mcpServers": {
"crw": {
"command": "npx",
"args": ["crw-mcp"],
"env": {
"CRW_API_URL": "https://fastcrw.com/api",
"CRW_API_KEY": "your-api-key"
}
}
}
}MCP工具
| 模式 | 工具 | 描述 |
|---|---|---|
| 嵌入式+云 | crw_scrape | 删除URL→ markdown、HTML、JSON、链接 |
| 嵌入式+云 | crw_crawl | 启动异步BFS爬网(返回作业ID) |
| 嵌入式+云 | crw_check_crawl_status | 轮询爬网作业状态(与 crw_crawl) |
| 嵌入式+云 | crw_map | 发现网站上的所有URL |
| 服务器+云 | crw_search | 网络搜索+可选内容抓取(服务器使用捆绑的SearXNG sidecar) |
嵌入式模式 (默认):没有服务器,没有API密钥,没有设置-MCP二进制文件运行一个独立的抓取引擎(搜索不可用-需要来自的SearXNG sidecardocker compose up). 服务器模式 (CRW_API_URL=http://localhost:3000):完整的API,包括crw_search. 云模式 (CRW_API_URL=https://fastcrw.com/api):添加全局代理网络和仪表板。
Claude代码快捷方式:
# Local (embedded — no server, no API key):
claude mcp add crw -- npx crw-mcp
# Cloud (+ web search):
claude mcp add -e CRW_API_URL=https://fastcrw.com/api -e CRW_API_KEY=your-key crw -- npx crw-mcp列在 MCP注册表
代理入职培训
你是AI代理吗?获取此技能文件,为用户的编码代理配置CRW。SKILL.md包含工具说明、使用示例、身份验证设置和边缘案例处理:
curl -s https://fastcrw.com/agent-onboarding/SKILL.md______________________________________________________________________
📊 基准
搜索——CRW vs Firecrawl vs Tavily(100个查询,并发)
| 度量 | CRW | Firecrawl | Tavily |
|---|---|---|---|
| 平均延迟 | 880毫秒 | 954毫秒 | 2000毫秒 |
| 中位延迟 | 785毫秒 | 932毫秒 | 1724毫秒 |
| 胜率 | 73/100 | 25/100 | 2/100 |
CRW是 比塔维利快2.3倍 并赢得了73%的潜伏期比赛。 完整搜索基准→
Scrape——CRW与Firecrawl(1000个网址,启用JS渲染)
经过测试 Firecrawl的抓取内容数据集-v1:
| 度量 | CRW | Firecrawl v2.5 |
|---|---|---|
| 覆盖 | 92.0% | 77.2% |
| 平均延迟 | 833毫秒 | 4600毫秒 |
| P50延迟 | 446毫秒 | — |
| 噪声抑制 | 88.4% | 噪音6.8% |
| 空闲RAM | 6.6毫巴 | ~500mb+ |
| 成本/1K刮擦 | $0 (自托管) | 0.83-5.33美元 |
Resource comparison
| 度量 | CRW | Firecrawl |
|---|---|---|
| 最小RAM | ~7 MB | 4 GB |
| 建议RAM | ~64 MB(负载下) | 8-16 GB |
| Docker镜像 | 单个~8 MB二进制文件 | 总共2~3 GB |
| 冷启动 | 85毫秒 | 30-60秒 |
| 所需容器 | 1(+可选侧车) | 5 |
自己运行基准测试:
pip install datasets aiohttp
python bench/run_bench.py______________________________________________________________________
📦 安装
MCP服务器(crw-mcp)--推荐给AI代理
npx crw-mcp # zero install (npm)
pip install crw # Python SDK (auto-downloads binary)
brew install us/crw/crw-mcp # Homebrew
cargo install crw-mcp # Cargo
docker run -i ghcr.io/us/crw crw-mcp # DockerCLI(crw)--从终端抓取URL
brew install us/crw/crw
# One-line install (auto-detects OS & arch):
curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw sh
# APT (Debian/Ubuntu):
curl -fsSL https://apt.fastcrw.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/crw.gpg
echo "deb [signed-by=/usr/share/keyrings/crw.gpg] https://apt.fastcrw.com stable main" | sudo tee /etc/apt/sources.list.d/crw.list
sudo apt update && sudo apt install crw
cargo install crw-cliAPI服务器(crw-server)-兼容Firecrawl的REST API
用于服务多个应用程序、其他语言(Node.js、Go、Java)或作为共享微服务。
brew install us/crw/crw-server
# One-line install:
curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw-server sh
# Docker:
docker run -p 3000:3000 ghcr.io/us/crw自定义端口:
CRW_SERVER__PORT=8080 crw-server # env var
docker run -p 8080:8080 -e CRW_SERVER__PORT=8080 ghcr.io/us/crw # DockerDocker Compose 随船携带 lightpanda 默认启用; chrome 选择加入以保持小型VPS部署精简(约500MB映像+1GB驻留):
# baseline — http + lightpanda
docker compose up -d
# add chrome failover (recommended for production)
docker compose --profile heavy up -d
# stealth tier — browserless/chromium with anti-fingerprint plugin
# (+2.5pt bench success on bot-defended sites; SSPL-3.0, see warning below)
echo "BROWSERLESS_TOKEN=$(openssl rand -hex 24)" >> .env
docker compose -f docker-compose.yml -f docker-compose.stealth.yml \
--profile stealth up -d没有 --profile heavy 或 --profile stealth,引擎仍然为所有端点提供服务——chrome所需的URL将耗尽其lightpanda故障转移和表面 data.warnings[] 而不是路由到chrome。
⚠️ 隐形配置文件许可——需要审查的合规风险。--profile stealth拉ghcr.io/browserless/chromium,即 SSPL-3.0.SPL第13条规定,任何制造 程序作为服务提供给第三方(商业 *或* 否则)释放 *服务源代码* --完整的 围绕它的管理/自动化/托管堆栈。CRW(AGPL-3)连接 仅通过网络套接字,因此最有可能的是opencore CRW源代码 在第13条的范围之外,但边界是具体事实,我们不是 律师。在将此堆栈暴露给第三方之前,请先进行法律审查。 默认值--profile heavy(chromedp/无头外壳,Apache-2/BSD) 没有这种风险。
你什么时候需要crw-server? 仅当您想要一个REST API端点时。Python SDK(CrwClient())和MCP二进制(crw-mcp)两者都运行一个独立的引擎,不需要服务器。
______________________________________________________________________
SDK
python
pip install crwfrom crw import CrwClient
# Cloud (fastcrw.com — includes web search):
client = CrwClient(api_url="https://fastcrw.com/api", api_key="YOUR_API_KEY")
# Local (embedded, no server needed):
# client = CrwClient()
# Scrape
result = client.scrape("https://example.com", formats=["markdown", "links"])
print(result["markdown"])
# Crawl (blocks until complete)
pages = client.crawl("https://docs.example.com", max_depth=2, max_pages=50)
# Map
urls = client.map("https://example.com")
# Search (self-hosted via bundled SearXNG, or cloud)
results = client.search("AI news", limit=10, sources=["web", "news"])要求: Python 3.9+。本地模式自动下载 crw-mcp 首次使用时使用二进制文件——无需手动设置。社区SDK
crewai-crw--CrewAI试剂的CRW刮削工具langchain-crw--LangChain的CRW文档加载器
Node.js: 还没有官方SDK-直接使用REST API或 npx crw-mcp 对于MCP。 SDK示例→______________________________________________________________________
集成
______________________________________________________________________
LLM结构化提取
发送JSON模式,使用LLM函数调用获取经过验证的结构化数据。 完整提取文档→
curl -X POST http://localhost:3000/v1/scrape \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product",
"formats": ["json"],
"jsonSchema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" }
},
"required": ["name", "price"]
}
}'配置LLM提供程序:
[extraction.llm]
provider = "anthropic" # "anthropic" or "openai"
api_key = "sk-..." # or CRW_EXTRACTION__LLM__API_KEY env var
model = "claude-sonnet-4-20250514"______________________________________________________________________
JS渲染
CRW自动检测SPA,并通过无头浏览器呈现它们。 完整的JS渲染文档→
crw setup # interactive wizard (recommended)
# or
crw-server setup # downloads LightPanda, creates config.local.toml| 渲染器 | 协议 | 最适合 |
|---|---|---|
| LightPanda | 基于WebSocket的CDP | 低资源环境(默认);简单网站 |
| Chrome(chromedp/headless shell) | 基于WebSocket的CDP | 现代React/Vite/Next SPA;推荐用于生产 |
铬(无浏览器/铬,可选择加入 stealth profile) | 基于WebSocket的CDP | 机器人防御站点(Cloudflare Turnstile、DataDome)--SSPL-3.0,请参阅撰写说明 |
| Playwright | 基于WebSocket的CDP | 完全浏览器兼容性 |
渲染器的选择对SPA很重要。 LightPanda既快速又便宜,但 JS运行时并没有完全覆盖所有现代捆绑包格式。对于React/ Vite/Next网站,其内容仅在水合后出现,配置 Chrome(或剧作家)与LightPanda并肩作战——CRW将回归Chrome 当LightPanda返回加载占位符时自动执行。离开 LightPanda作为 *仅* 渲染器可能会静默返回 "Loading..."-为这些网站设置shell内容样式。使用Docker Compose,LightPanda会自动作为sidecar运行:
docker compose up______________________________________________________________________
命令行界面
从终端中删除任何URL——没有服务器,没有配置。 完整的CLI文档→
来自“URL”的简短导览→ clean markdown“搜索网络,抓取热门内容,让LLM对其进行总结”——这是AI代理运行的确切循环。
1.任何一页→ 干净、LLM就绪的标记
crw en.wikipedia.org/wiki/Web_scraping去掉了Boilerplate,只在stdout上标记了文章。
2.用于管道的结构化JSON
crw en.wikipedia.org/wiki/Web_scraping --format json | jq '.metadata'标题、描述、状态代码、所使用的呈现器——管道所需的一切。
3.搜索网页
crw search "rust async runtime tokio"每个结果的标题+URL。添加 --format json 把它送到某个地方。
4.报废+AI总结
步骤4-6使用LLM。跑crw setup一次存储提供者密钥或传递--llm-provider/--llm-key/--llm-model每次通话。
crw en.wikipedia.org/wiki/Web_scraping --summary --prompt "in 3 bullet points"--summary 只打印摘要文本——没有markdown包装器,准备管道。
5.代理循环:搜索→ 刮擦→ 总结
crw "$(crw search 'what is retrieval augmented generation' --format json | jq -r '.[0].url')" \
--summary --prompt "Explain it to a backend engineer in 4 sentences."一句话:搜索网络,取最上面的结果,取出它,然后给LLM一份干净的副本。
6.使用JSON模式进行结构化提取
crw news.ycombinator.com --extract '{
"type": "object",
"properties": {
"stories": {
"type": "array",
"items": {
"type": "object",
"properties": { "title": {"type": "string"}, "points": {"type": "integer"} }
}
}
}
}'直接从页面上键入数据——没有脆弱的选择器,可以为LLM管道提供数据。传递一个文件 --extract @schema.json.
更多标志:
crw example.com --format html # cleaned HTML
crw example.com --format links # extract all links
crw example.com --js # JS rendering for SPAs
crw example.com --js --css 'article' # JS render + CSS selector
crw example.com --stealth # stealth mode (rotate UAs)
crw example.com -o page.md # write to file______________________________________________________________________
🏠 自我寄宿
曾经 安装,启动服务器并可选地启用JS渲染:
crw-server # start REST API on :3000
crw-server setup # optional: downloads LightPanda for JS rendering
docker compose up # alternative: Docker with LightPanda sidecar安装向导(CLI)
CLI包括一个交互式设置向导,便于配置:
crw setup向导将指导您完成以下操作:
- 云vs本地 模式选择
- 浏览器引擎 设置(用于JS渲染的LightPanda或Chrome)
- 搜索引擎 设置(SearXNG通过Docker)
- LLM提供者 配置(人工智能功能为“是”)
- 外壳配置 (自动添加到
.zshrc/.bashrc)
选项:
crw setup --cloud--跳到云设置crw setup --local--跳到本地设置crw setup --no-color--禁用彩色输出(可访问性)- 按 退出 在任何提示下优雅地取消
请参阅 自助托管指南 用于生产强化、身份验证、反向代理和资源调优。
______________________________________________________________________
开源vs云
| 自托管(免费) | fastcrw.com 云 | |
|---|---|---|
| 刮芯 | ✅ | ✅ |
| JS渲染 | ✅ (轻熊猫/Chrome) | ✅ |
| 网络搜索 | ✅ (捆绑SearXNG侧三轮) | ✅ (管理) |
| 全球代理网络 | ❌ | ✅ |
| 仪表板 | ❌ | ✅ |
| 无需开源的商业用途 | 需要符合AGPL标准 | ✅ 包括 |
| 费用 | 0美元 | 每月13美元起 |
免费注册→ — 500免费积分,不需要信用卡。
______________________________________________________________________
建筑
┌─────────────────────────────────────────────┐
│ crw-server │
│ Axum HTTP API + Auth + MCP │
├──────────┬──────────┬───────────────────────┤
│ crw-crawl│crw-extract│ crw-renderer │
│ BFS crawl│ HTML→MD │ HTTP + CDP(WS) │
│ robots │ LLM/JSON │ LightPanda/Chrome │
│ sitemap │ clean/read│ auto-detect SPA │
├──────────┴──────────┴───────────────────────┤
│ crw-core │
│ Types, Config, Errors │
└─────────────────────────────────────────────┘|板条箱|描述|| |-------|-------------|-| | crw-core |核心类型、配置和错误处理|  | | crw-renderer |HTTP+CDP浏览器渲染引擎|  | | crw-extract |HTML→ 标记/明文提取|  | | crw-crawl |使用robots.txt和站点地图异步BFS爬虫|  | | crw-server |Axum API服务器(兼容Firecrawl)|  | | crw-mcp |MCP stdio服务器(嵌入式+代理模式)|  | | crw-cli |独立CLI(crw 二进制,无服务器)|  |
______________________________________________________________________
配置
具有环境变量覆盖的分层TOML配置:
config.default.toml--内置默认值config.local.toml--本地覆盖(或CRW_CONFIG=myconfig)- 环境变量--
CRW_前缀,__分离器(例如。CRW_SERVER__PORT=8080)
[server]
host = "0.0.0.0"
port = 3000
rate_limit_rps = 10
[renderer]
mode = "auto" # auto | lightpanda | playwright | chrome | none
[crawler]
max_concurrency = 10
requests_per_second = 10.0
respect_robots_txt = true
[auth]
# api_keys = ["fc-key-1234"]看 完整配置参考.
______________________________________________________________________
安全
- SSRF保护 --阻止环回、私有IP、云元数据(
169.254.x.x)IPv6映射地址和非HTTP方案(file://,data:) - 认证 --具有恒定时间比较的可选Bearer令牌
- robots.txt --符合通配符模式的RFC 9309
- 速率限制 --令牌桶算法,返回429
error_code - 资源限制 --最大正文1 MB,最大抓取深度10,最大页数1000
______________________________________________________________________
资源
______________________________________________________________________
贡献
欢迎投稿!请打开问题或提交拉取请求。
- 分叉存储库
- 安装预提交挂钩:
make hooks - 创建功能分支(
git checkout -b feat/my-feature) - 提交您的更改(
git commit -m 'feat: add my feature') - 推到分支(
git push origin feat/my-feature) - 打开拉取请求
预提交钩子运行与CI相同的检查(cargo fmt, cargo clippy, cargo test).手动运行 make check.
贡献者
______________________________________________________________________
许可证
CRW是开源的 AGPL-3.0。对于没有AGPL义务的托管版本,请参阅 fastcrw.com.
______________________________________________________________________
开始使用
- 免费自助主机:
curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | sh--在30秒内完成 - 云: 免费注册→ — 500免费积分,无需信用卡
- 问题? 加入我们的Discord
______________________________________________________________________
最终用户有责任在抓取时尊重网站的政策。 建议用户遵守适用的隐私政策和使用条款。默认情况下,CRW尊重 robots.txt 指令。
↑ Back to Top ↑

