Crawl4AI

Stale
GitHub Python Apache-2.0

Description

Crawl4AI is a web crawling toolkit for LLM and agent systems, offering structured extraction, site traversal, cleanup, and crawl controls for external knowledge acquisition.

Key Features

  • LLM-friendly content extraction — clean HTML into Markdown or structured data for LLM consumption
  • Batch async crawling — concurrent multi-URL fetching with rate limiting and anti-bot handling
  • Deep site traversal — recursive subpage discovery with automatic sitemap construction
  • Custom crawl strategies — configurable CSS selectors, XPath, headers, and cookies
  • Browser rendering support — Playwright integration for JavaScript-rendered dynamic pages
  • Content cleanup pipeline — auto-remove navbars, ads, footers, keep only main content

Use Cases

💡 Building high-quality web knowledge bases for RAG systems
💡 Batch-crawling competitor websites for market analysis
💡 Scraping technical docs for developer knowledge retrieval systems
💡 Scheduled crawling for price or content change monitoring
💡 Extracting social media or forum content for trend analysis

Quick Start

pip install crawl4ai

import asyncio
from crawl4ai import AsyncWebCrawler

async def main():
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(
            url="https://docs.crawl4ai.com",
            word_count_threshold=10,
            bypass_cache=True
        )
        print(result.markdown[:500])

asyncio.run(main())

Related Projects