unclecode/crawl4ai
๐๐ค Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper. Don't be shy, join here: https://discord.gg/jP8KfhDhyN
What it solves
Crawl4AI is an open-source web crawler and scraper designed specifically to prepare web content for Large Language Models (LLMs). It solves the problem of noisy, unstructured web data by converting websites into clean, structured Markdown that is optimized for Retrieval-Augmented Generation (RAG), AI agents, and data pipelines.
How it works
The tool uses an asynchronous browser pool (via Playwright) to navigate the web, handling dynamic content through JavaScript execution and simulated scrolling. It employs several strategies to refine data:
- Markdown Generation: Uses heuristics and the BM25 algorithm to filter out noise and generate "Fit Markdown" (AI-friendly content).
- Structured Extraction: Supports both LLM-driven extraction (using any open-source or proprietary model) and schema-based extraction using CSS selectors and XPath.
- Browser Control: Manages sessions, proxies, and cookies to avoid bot detection and mimic real user behavior.
- Deployment: Can be run as a Python package or deployed as a Dockerized FastAPI server with a monitoring dashboard.
Who itโs for
- AI Developers: Those building RAG systems or AI agents that require high-quality, clean web data.
- Data Engineers: People needing scalable, structured data extraction pipelines from dynamic websites.
- Researchers: Users who need to convert large volumes of web pages into a format suitable for NLP tasks.
Highlights
- LLM-Optimized Output: Produces smart Markdown with headings, tables, and citation hints.
- Adaptive Intelligence: Learns site patterns and uses BM25-based filtering to extract core information.
- Comprehensive Browser Support: Compatible with Chromium, Firefox, and WebKit, featuring stealth mode to avoid detection.
- Flexible Extraction: Offers LLM-driven, CSS-based, and regex-based chunking strategies.
- Production Ready: Includes a Docker implementation with a real-time monitoring dashboard and API gateway.
Related
- Project
- Project
- Project
- Project
- Project