Registry / llm-agents / crawl4ai

crawl4ai

JSON →
library0.9.2pypypi✓ verified 24d ago

Crawl4AI is an open-source, LLM-friendly web crawler and scraper designed for AI agents, RAG, and data pipelines. It provides fast, controllable, and customizable web content extraction, often converting pages into clean Markdown. The library supports dynamic content handling, caching, custom hooks, real-time monitoring via Docker, and offers flexible deployment options. It is actively maintained with frequent minor releases focusing on performance, anti-bot detection, and security, with the current version being 0.8.6. [8, 9]

pip install -U crawl4ai
INSTALL
IMPORT
SIG · CRAWL4AI
C
crawl4ai
llm-agentspythonv0.9.2
Install
75.9s avg
Import
3886ms
Disk
827MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
2/3 runs
py 3.11
✕ build_error
✓ 80.77s
py 3.12
✕ build_error
✓ 76.37s
py 3.13
✕ build_error
✓ 70.57s
py 3.9
✕ build_error
1/3 runs
827MB installed
● package 827MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncWebCrawler
from crawl4ai import AsyncWebCrawler
from crawl4ai.web_crawler import AsyncWebCrawler
The primary crawler class is directly available from the top-level package since v0.6.0 removed legacy browser modules. [1]

This quickstart demonstrates how to perform a basic web crawl using `AsyncWebCrawler` to fetch content from a URL and receive it as Markdown. It leverages Python's `asyncio` for non-blocking operations. Before running, ensure `playwright install` has been executed to set up necessary browser binaries. [13]

import asyncio from crawl4ai import AsyncWebCrawler async def main(): # Initialize the crawler. Ensure 'playwright install' has been run. async with AsyncWebCrawler() as crawler: # Perform a basic crawl and extract content as Markdown result = await crawler.arun( url="https://www.nbcnews.com/business" ) print("--- Extracted Markdown ---") print(result.markdown[:500]) # Print first 500 chars of Markdown # Example of getting raw HTML # result_html = await crawler.arun( # url="https://www.nbcnews.com/business", # include_raw_html=True # ) # print("--- Raw HTML ---") # print(result_html.html[:500]) if __name__ == "__main__": asyncio.run(main())
crawl4ai --version
Debug
Known issues
breakingCritical Security Hotfix (v0.8.6): The `litellm` dependency was replaced with `unclecode-litellm` due to a PyPI supply chain compromise. Users on `v0.8.5` or earlier are strongly advised to upgrade immediately to `v0.8.6` or later to mitigate this risk. [13]
fix
Upgrade to crawl4ai==0.8.6 or newer: `pip install -U crawl4ai`
affects: <=0.8.5
gotchaMandatory Playwright Installation: After installing `crawl4ai` via pip, you must run `playwright install` to download and set up the required browser binaries. Failing to do so will result in runtime errors when attempting to crawl. [6, 10, 13]
fix
Execute `playwright install` in your environment after `pip install crawl4ai`.
affects: All versions
breakingDocker API Hooks Disabled by Default (v0.8.0): For security reasons (Remote Code Execution vulnerability fix), hooks in the Docker API are now disabled by default. If you rely on hooks with the Docker API, you will need to re-enable them with caution. [2]
fix
Review the v0.8.0 release notes and documentation for how to securely re-enable and configure Docker API hooks if absolutely necessary. Ensure your Docker environment is secure.
affects: >=0.8.0
breakingLegacy Browser Modules Removed (v0.6.0): Modules under `crawl4ai/browser/*` were removed. Also, the `AsyncPlaywrightCrawlerStrategy.get_page` function signature changed. Update imports and method calls accordingly. [1]
fix
Update import statements (e.g., `from crawl4ai import AsyncWebCrawler` instead of deeper paths) and review method signatures if using custom crawler strategies. Consult the changelog for specific API changes from v0.6.0.
affects: <0.6.0
Upgrade
Version history
0.9.2latest on PyPI · released Jul 15, 2026
Audit
Dependencies
pythonrequiredRequired Python version
playwrightrequiredCore browser automation; requires separate installation step: `playwright install`
humanizerequiredUtility for human-readable formats
httpxrequiredAsynchronous HTTP client
pydanticrequiredData validation and settings management
unclecode-litellmrequiredLLM integration (replaces 'litellm' due to security fix in v0.8.6)
beautifulsoup4requiredHTML parsing
pyyamlrequiredYAML configuration parsing
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
crawl4ai — pip install crawl4ai · libregistry