跳到主要内容Skip to main content
RAG 与知识库RAG & Knowledge Bases生产可用Production

Crawl4AI

unclecode / crawl4ai

面向 LLM 的网页抓取与清洗:异步爬取、浏览器渲染、去噪、Markdown/JSON 输出、分块与缓存,适合把网页变成 RAG 可用的语料。LLM-oriented web crawling and cleaning: async crawling, browser rendering, boilerplate removal, Markdown/JSON output, chunking and caching — turning pages into RAG-ready corpus.

87.6k stars 9143 forks Python 语言Language Apache-2.0 许可License 最近推送Last push 2026-11-20

为什么选Why choose it

  • 输出直接是 Markdown/JSON,少写一套清洗管线。Outputs Markdown/JSON directly, removing a separate cleaning pipeline.
  • 异步与浏览器渲染能处理大量动态页面。Async crawling and browser rendering handle many dynamic pages.
  • 缓存、分块和结构化字段适合接向量库。Caching, chunking and structured fields plug into vector stores.

不适合Not for

不绕过付费墙、登录或 robots 限制;合规责任在使用者。Does not bypass paywalls, logins or robots restrictions; compliance is the operator’s job.
大规模抓取要代理、限速与反封策略,成本不低。Large crawls need proxies, rate limits and blocking strategy — not free.
不是搜索引擎,也不做网页排名。Not a search engine and does not rank pages.

最小上手Minimum setup

  1. pip install crawl4ai,跑一次单页抓取,确认浏览器依赖已装。pip install crawl4ai, crawl one page and confirm browser dependencies are installed.
  2. 开 Markdown 与去噪,检查表格/代码块是否保留。Enable Markdown and boilerplate removal; check tables and code blocks survive.
  3. 再接分块与向量库,先小批量测重复率与失败率。Then add chunking and a vector store; measure duplication and failure rate on a small batch.

依赖与成本Dependencies and cost

Python + Playwright/Chromium;网络出口与代理;大规模要队列、缓存与对象存储。Python + Playwright/Chromium; outbound network and proxies; large jobs need queues, cache and object storage.

许可与使用边界License and usage boundaries

Apache-2.0;抓取内容仍受原站版权、robots 与数据库权利约束。Apache-2.0; crawled content remains subject to source copyright, robots and database rights.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • Firecrawl — 生产可用Production,把网站抓成干净 markdown / 结构化数据,供 RAG 与 agent 使用;可本地单二进制、MCP server 或自托管 API。Crawl websites into clean Markdown or structured data for RAG and agents, available as a local binary, MCP server or self-hosted API.
  • Docling — 先试这个Start here,文档解析工具包:PDF / HTML / Office 转结构化 Markdown / JSON,保留版面、表格与阅读顺序。A document parsing toolkit that turns PDF, HTML and Office files into structured Markdown or JSON while preserving layout, tables and reading order.
  • Marker — 特定场景Niche,PDF → Markdown / JSON 的高质量转换器,重点处理版面、表格、公式与阅读顺序。A high-quality PDF-to-Markdown and JSON converter focused on layout, tables, formulas and reading order.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.