Short answer: Crawl4AI is a free, open source Python library that visits websites and returns clean Markdown or structured JSON your AI agent can read. It runs on your own machine or in Docker, needs no API key for basic use, and is an open alternative to paid scraping services like Firecrawl. There is also a paid hosted version, which is optional.
What it is
Most web pages are full of menus, ads, cookie banners and scripts. When an agent reads a page as raw HTML, it wastes tokens on all of that and often misses the actual content. Crawl4AI opens the page in a real browser, strips the noise, and hands back text that a language model can use right away.
The project is on GitHub at unclecode/crawl4ai, with roughly 85,000 stars. The latest release listed on the page is v0.9.4 from September 2026.
What it can do
- Clean Markdown: pages come back as readable Markdown, with links collected as a numbered reference list. A "fit Markdown" filter can cut the page down further to the main content.
- Structured data without an AI model: you describe the fields you want with CSS or XPath selectors, and it returns JSON. No model, no token cost.
- Structured data with an AI model: when the page is messy, you can pass a schema and let a model fill it. It works with the providers supported by LiteLLM, and you bring your own key. The examples also show a local model through Ollama.
- Whole sites, not just one page: deep crawling follows links across a site, and an adaptive mode stops once it has gathered enough to answer your question.
- Real browser actions: it can run JavaScript, scroll, keep a session across steps, and save screenshots or PDFs.
- Agent ready: the Docker version includes a REST API and an MCP server, so tools like Claude Code can call it directly.
How to get started
Install with pip install -U crawl4ai, then run crawl4ai-setup once to install the browser. There is also a crwl command for quick jobs, for example turning a page into Markdown from the terminal. If you prefer Docker, the official image runs a local server with a small dashboard and a playground.
Who it's for
- People building agents that need to read websites, docs or product pages.
- Creators who collect research from many sources and want it as clean notes.
- Anyone building a knowledge base or RAG system who is tired of paying per page.
- Builders who want the crawler on their own machine, not on someone else's server.
What to watch out for
- License with an extra rule: it is Apache 2.0, but the license file adds an attribution requirement. If you ship or publicly use it, you need to credit the project, for example in your README or an About page.
- Paid parts are optional: the library and self-hosted Docker are free. Crawl4AI Cloud is a hosted, pay-as-you-go API. The page mentions $10 of free use until the end of 2026, but full prices are on their site, so check before you rely on it.
- Model costs are yours: AI-based extraction uses your own model key, and that provider will bill you.
- Respect the sites you crawl: check each site's terms and robots.txt, and keep the request rate polite. Being able to scrape a page does not mean you are allowed to reuse its content.
- Docker security: the server uses an access token. Do not expose it to the internet without one.
- It needs a browser: crawling runs a real browser, so it uses more memory than a simple HTTP request.
Source: unclecode/crawl4ai on GitHub
More AI tools and ready prompts at masterphub.io