Mindket

Crawl4AI

Newversion 2 · updated
GitHub trending
Star87k

Overview

UncleCode’s open source web crawler and scraper for language models and AI agents. It loads a page in a browser and returns clean Markdown, or JSON in a shape you define. The notes cover the Python library, the crwl command, the Docker server and MCP.

Crawl4AI is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • A Python environment, as a library you import
  • A terminal, through the crwl command
  • A Docker container on AMD64 or ARM64, on your machine or a server
  • Claude Code, through the Docker server’s MCP endpoint
Start with
pip install -U crawl4ai
crawl4ai-setup
crawl4ai-doctor

Platform

DockerContainer
Claude CodeCoding agent
CodexCoding agent
CursorCode editor
WindsurfCode editor
OpenCodeCoding agent

And 2 more in Where to use it

About

What it is

Crawl4AI is an open source web crawler and scraper for language models and AI agents. You give it an address and it loads the page in a headless browser. It hands back clean Markdown, or JSON in a shape you define. Its README says you can run it yourself, free forever. It comes as a Python library, a command called crwl and a Docker server with a REST API. The README also describes Crawl4AI Cloud, a hosted service with its own account and prices. This listing covers the parts you run yourself, and names the cloud only where the maker gives an agent-setup line for it.

  1. You give it an address, or raw HTML
  2. A headless browser loads the page
  3. An optional filter trims menus, footers and boilerplate
  4. You get Markdown, or JSON from a schema you define
  5. Your RAG pipeline or agent reads the result

Who it suits

Developers who feed web pages to a model. That means RAG pipelines, agents that read the web and data jobs that need a page’s text and tables as clean Markdown. The library and the crwl command need Python 3.10 or newer and a terminal. The Docker server needs Docker instead. The Docker server suits a team that wants one crawler its apps call over HTTP. Skip it if you only want to read one page once, since copying the text by hand is quicker.

Who uses it, and how
IndustryWho uses itHow they use itExample
AI app buildingDevelopers building RAG or agentsTurn pages into Markdown they can index or hand to a modelA developer crawls a documentation site into Markdown and loads it into a RAG index. The README names RAG, AI agents and data pipelines as its uses.
Data workAnalysts and data engineersPull repeating records out of pages as JSON with a CSS schema and no LLMAn engineer describes one quote block with a schema and extracts every quote, author and tag from a scrolling page, as the README’s example does.
Price and product researchAnalystsLet an LLM read an irregular page into fields they defineAn analyst extracts each model name with its input and output fee from a pricing page, as the README’s LLM example does.
Agent usersPeople who run Claude Code or another agentGive the agent the crawler as MCP toolsAn agent calls the md or crawl tool on your own server to read a page.

Where to use it

Crawl4AI runs where you put it, and the maker’s pages name these routes.

  • A Python environment, as a library you import
  • A terminal, through the crwl command
  • A Docker container on AMD64 or ARM64, on your machine or a server
  • Claude Code, through the Docker server’s MCP endpoint
  • Crawl4AI Cloud, the hosted service, from Claude Code, Codex, Cursor, Windsurf, OpenCode, OpenClaw, Claude Desktop and ChatGPT over MCP

The README says it drives Chromium, Firefox and WebKit.

How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with a file for the library, the command line, the Docker server, recipes and each agent. The main route is pip.

What you need first
NeedDetail
PythonPython 3.10 or newer, which is what the package’s PyPI page asks for
A browsercrawl4ai-setup installs one for you, once
DockerOnly for the server: Docker 20.10.0 or newer, compose v2.24 or newer and at least 4 GB of RAM for the container
A modelOnly for LLM features: a provider key, or a local model such as ollama/llama3.3. Plain crawling and CSS extraction need none
ExtrasOptional. The installation page warns that the torch, transformer and all extras bring large models and raise disk use and memory load
  1. Install the package from PyPI.
  2. Run crawl4ai-setup, which installs the browser once.
  3. Run crawl4ai-doctor to check the installation.
  4. Save the README’s first script as a file and run it with python.
pip install -U crawl4ai
crawl4ai-setup
crawl4ai-doctor

If the browser setup fails, the README gives a manual line:

python -m playwright install --with-deps chromium

The README’s first script prints a page as Markdown.

import asyncio
from crawl4ai import AsyncWebCrawler

async def main():
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(url="https://news.ycombinator.com")
        print(result.markdown)

asyncio.run(main())

How to use it

You can run Crawl4AI in three ways.

Three ways to run it
WayStart itWhat you get
Python libraryAsyncWebCrawler in a scriptEvery option, with the result as an object that holds the Markdown, the extracted content, links and media
The crwl commandcrwl https://news.ycombinator.com -o markdownThe page as Markdown, JSON or filtered Markdown in your terminal
Docker serverdocker run, then a POST to /md or /crawlA REST API, a dashboard at /dashboard and a playground at /playground

The crwl command picks its output with -o. Deep crawls use the same command.

crwl https://news.ycombinator.com -o markdown
crwl https://docs.crawl4ai.com --deep-crawl bfs --max-pages 10

The second line crawls the maker’s own docs breadth first and stops at 10 pages.

The Docker server needs a token. Without one it answers only inside its container, so your published port resets the connection even though Docker shows the container healthy. Make a token, start the container, and give it about 10 seconds.

export CRAWL4AI_API_TOKEN="$(openssl rand -hex 32)"
docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g \
  -e CRAWL4AI_API_TOKEN="$CRAWL4AI_API_TOKEN" \
  unclecode/crawl4ai:latest

Then send the README’s test request.

curl -s http://localhost:11235/md \
  -H "Authorization: Bearer $CRAWL4AI_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://news.ycombinator.com"}' | jq -r .markdown

In Python, two classes hold the settings. BrowserConfig controls the browser. CrawlerRunConfig controls each crawl: caching, extraction, timeouts and hooks. The Quick Start says the default cache mode bypasses the cache, so you get fresh content.

Example

You want every quote from quotes.toscrape.com/scroll as JSON. That page loads more quotes as you scroll, so the README’s script sets scan_full_page to True and describes one quote block with a CSS schema.

schema = {
    "name": "Quotes",
    "baseSelector": "div.quote",
    "fields": [
        {"name": "text", "selector": "span.text", "type": "text"},
        {"name": "author", "selector": "small.author", "type": "text"},
        {"name": "tags", "selector": "a.tag", "type": "list", "fields": [{"name": "tag", "type": "text"}]},
    ],
}

The script passes JsonCssExtractionStrategy(schema) in the run config, then prints how many quotes it extracted and the first one as JSON. No model is called. The README’s LLM example uses LLMExtractionStrategy with a model name (openai/gpt-4o-mini) and a Pydantic schema on a pricing page, and the page text then goes to that model.

For newcomers and experts

If you are new. A crawler visits web pages, and a scraper reads data out of them. Raw HTML is full of menus, scripts and tags, which a model reads poorly. Markdown keeps the headings, lists, tables and code in plain text. RAG means a model answers from passages you hand it. A schema is a short description of the fields you want from a page, such as title, link and price. Start with the first script on one page, or with crwl and a single address, before you touch any settings.

For experts. The Markdown result carries a raw version and a fit version. The fit version passes through a content filter, and the README names PruningContentFilterLXML, BM25ContentFilter for a query and LLMContentFilter. Extraction has no-LLM strategies (JsonCssExtractionStrategy, JsonXPathExtractionStrategy and RegexExtractionStrategy) and LLMExtractionStrategy, which takes any provider LiteLLM supports.

A one-time call to generate_schema asks an LLM to write a reusable CSS schema, and later runs need no model. Deep crawls come as breadth-first, depth-first and best-first strategies, and the Deep Crawling page marks best-first as the recommended one. resume_state resumes a long crawl after a crash. AdaptiveCrawler stops when it has learned enough to answer your query, and arun_many runs many URLs with a memory-adaptive dispatcher.

The Docker server has been secure by default since 0.9.0. Every endpoint except GET /health needs a bearer token. A screenshot or PDF comes back in the response with an artifact id as well. The stored file downloads from /artifacts/<artifact_id> with your token, and artifacts expire. Hooks stay off until you set CRAWL4AI_HOOKS_ENABLED=true, and they are declarative JSON actions, not Python code.

The server’s MCP endpoints are /mcp/sse over Server-Sent Events and /mcp/ws over WebSocket. Their tools are md, html, screenshot, pdf, execute_js, crawl and ask.

Good to know

Crawl4AI runs on your own machine, and a few details are worth reading first.

  • License: Apache-2.0, which GitHub names. The LICENSE file ends with an attribution requirement, so distributions, publications and public uses must carry the maker’s credit line. The README adds that any use must carry one of two credits, a badge or a text line
  • Cloud: Crawl4AI Cloud is a separate hosted service with its own account, key and prices. The maker’s pages say your cloud key can call the billing routes, a top-up among them, so decide whether an agent should hold it
  • Your data: a crawl connects to the addresses you give it. LLM extraction sends page text to the model you choose, unless that model runs on your machine. The README and the docs pages behind Mindket’s notes say nothing about usage data
  • Crawling rules: the Deep Crawling page says to respect robots.txt and marks that as disabled by default. The undetected browser page says to respect each site’s terms of service and to use delays. Check a site’s rules before a large crawl
  • Old pages: the installation page is titled 2023 Edition and shows an old Docker tag. The README and the Self-Hosting Guide are newer, so the notes follow them
  • MCP and the token: the guide’s MCP line for your own server shows no token and does not say how the endpoints take one. Check the connection after you add it
  • Removal: the docs give no uninstall steps. Mindket’s notes add pip uninstall crawl4ai for the package, and the guide gives docker stop crawl4ai and docker rm crawl4ai for the container

README and files

README

Crawl4AI: setup notes

This kit holds setup notes only. Mindket wrote them. Crawl4AI itself installs from its maker's repository and from PyPI: https://github.com/unclecode/crawl4ai

These notes are not made or endorsed by the Crawl4AI project or its maker. The README opens with "Crawl4AI turns any website into clean, LLM-ready Markdown for RAG, AI agents and data pipelines." The README is https://github.com/unclecode/crawl4ai/blob/main/README.md and the documentation is https://docs.crawl4ai.com

License: Apache-2.0. GitHub names it, and the LICENSE file (https://github.com/unclecode/crawl4ai/blob/main/LICENSE) is the Apache License 2.0 text with an attribution requirement added at its end. See "Attribution" below.

The README also describes a hosted service, Crawl4AI Cloud, from the same maker. It is a separate product with an account, a key and prices of its own. These notes cover the open source library, the command line and the Docker server, and name the cloud only where the maker's pages give an agent-setup line for it.

What installs

What you need first

  • Python 3.10 or newer. This is the requires_python value on the package's PyPI page: https://pypi.org/project/crawl4ai/
  • For the Docker server: Docker 20.10.0 or newer with docker compose v2.24 or newer, and at least 4 GB of RAM for the container. Source: https://docs.crawl4ai.com/core/self-hosting/
  • For LLM extraction: a model, either a provider key or a local model such as ollama/llama3.3. Plain crawling and CSS extraction need none. See setup/recipes.md.

Main install command

pip install -U crawl4ai
crawl4ai-setup

Source: https://github.com/unclecode/crawl4ai/blob/main/README.md

Per-platform notes

  • setup/python-library.md: pip, the browser setup, the doctor check, extras, a development install
  • setup/command-line.md: the crwl command
  • setup/docker-server.md: the self-hosted server, its token and its dashboard
  • setup/recipes.md: Markdown, structured data, deep crawls and many URLs, copied from the docs
  • setup/claude-code.md: the MCP line for your own server and for the cloud
  • setup/codex.md: the cloud's MCP block for Codex
  • setup/cursor.md: the cloud's MCP block for Cursor and Windsurf
  • setup/other-agents.md: OpenCode, OpenClaw, Claude Desktop, ChatGPT and the maker's skill package

Update or remove

The installation page gives this line for the stable version:

pip install -U crawl4ai

The installation page adds that pip install crawl4ai --pre installs the latest pre-release and pip install crawl4ai== followed by a version number installs one exact version, and says to use the stable version in production. Source: https://docs.crawl4ai.com/core/installation/

The README and the docs give no uninstall steps. These two lines are Mindket's notes, not the maker's. pip uninstall crawl4ai removes the package. If you made a virtual environment only for it, deleting its folder removes everything in it. For the Docker server, the self-hosting guide gives docker stop crawl4ai && docker rm crawl4ai.

Usage data and outbound connections

The README and the documentation pages these notes draw on say nothing about usage data. A crawl connects to the addresses you give it. LLM extraction sends the page text to the model you set. Using the cloud sends your requests to api.crawl4ai.com with your key.

Attribution

The LICENSE file ends with a requirement that every distribution, publication or public use of the software, or of a work based on it, carries this line:

"This product includes software developed by UncleCode (https://x.com/unclecode) as part of the Crawl4AI project (https://github.com/unclecode/crawl4ai).";

The README's "License & Attribution" section says that when using Crawl4AI you must include one of two attribution methods: a "Powered by Crawl4AI" badge (recommended), or this line in your documentation:

This project uses Crawl4AI (https://github.com/unclecode/crawl4ai) for web data extraction.

Source: https://github.com/unclecode/crawl4ai/blob/main/LICENSE and https://github.com/unclecode/crawl4ai/blob/main/README.md

Crawl responsibly

The deep crawling page says to be a good web citizen and respect robots.txt, and notes this is disabled by default. The undetected browser page closes with "Always respect robots.txt and website terms of service" and "Use appropriate delays to avoid overwhelming servers". Sources: https://docs.crawl4ai.com/core/deep-crawling/ and https://docs.crawl4ai.com/advanced/undetected-browser/

Sources

Files
README.md  6 KB
setup/claude-code.md  3 KB
setup/codex.md  1 KB
setup/command-line.md  4 KB
setup/cursor.md  1 KB
setup/docker-server.md  5 KB
setup/other-agents.md  3 KB
setup/python-library.md  4 KB
setup/recipes.md  11 KB

9 files, 39 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Compare with similar

Listed GitHub projects in the same category that share the most topics with this one.

ProductStarsActivityLanguageLicenseLast change
Crawl4AI This page87,016——Apache-2.0—
ScraplingShares crawler · data-extraction · playwright99,911ActivePythonBSD-3-Clause
Awesome Self-Hosted AIShares rag · open-source · llm113ActiveJavaScriptCC0-1.0
闲鱼智能监控系统Shares playwright · open-source · ai18,425QuietPythonMIT
Awesome LLM AppsShares rag · python144,222——Apache-2.0—
AgnoShares python · ai · ai-agents43,097ActivePythonApache-2.0
Numbers as Mindket last read them, from 2026-11-06 to 2026-11-09. Activity is read from each project’s last change on GitHub: Active within 30 days, Quiet within 180, Stale after that.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

rmasonCrawl4AI is an open-source, LLM-friendly web crawler and scraper7 points · 2 replies@toolhunt.bsky.socialНужен чистый Markdown с любого сайта для твоих LLM и AI-агентов? Бери open-source краулер crawl4ai: 84k+ звезд, Playwright и ноль боли с парсингом. https://github.com/unclecode/crawl4ai #OpenSource #AI #Python3 likes@mr_mofun2027年你的工作可能不安全,先把这7个GitHub仓库学会。 ⚒️它们能帮你用AI而不是被AI取代: 1. GPT Researcher AI研究代理,能搜索网页、深入调查复杂话题,并写出带引用的详细报告。 https://t.co/vIUMOWTKak 2. OpenHands AI软件工程师,可以写代码、修bug、处理开发任务。 https://t.co/HCij9h3Mvi 3. Activepieces 跨应用自动化重复工作,让AI代理执行真实工作流。 https://t.co/fky0hNP85c 4. CrewAI 组建AI代理团队,分工协作,共同完成目标。…r/BestGitHubRepos6 GitHub repos to turn any website into clean, structured dataProbeCraftCrawl4AI: Open-Source Web Crawler for Seamless AI Data Scraping6 pointsDigital BrainCrawl4AI is an open-source web crawler created by unclecode, designed to prepare internet content in a format ready for language models.2 likes@AiBoosting_net5/6: 4. n8n-io/n8n Workflow automation with AI built in. Visual editor or code, self-hosted or cloud. Fair-code license. 5. unclecode/crawl4ai Turns websites into clean, LLM-ready Markdown. Apache-2.0. Use them for: research notes and repeat tasks.hbcondo714crawl4ai: The Adaptive Intelligence Update4 pointsEUVD Bot🚨 EUVD-2026-113186 📊 8.7/10 🏢 unclecode 📝 Crawl4AI before 0.9.5 contains a denial of service vulnerability in the Docker API server where _clamp_untrusted() fails to cap the delay_before_retur... 🔗 https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-113186 #cybersecurity #infosec #cve #euvd@cyrilXBT$82dhruv_ahujaAsk HN: What do you use (AI based) web crawlers for?I am curious, what are people and organisations building with web crawlers, especially since now all of them seem to have LLM support for further refining the output from crawled pages. Open source projects like crawl4ai[1] have a crazy amount of stars (~59k). This got me curious.…3 pointsEUVD Bot🚨 EUVD-2026-113187 📊 7.7/10 🏢 unclecode 📝 Crawl4AI from 0.9.0 before 0.9.5 fails to filter the CosineStrategy model_name field in untrusted Docker API request bodies, allowing authenticated cl... 🔗 https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-113187 #cybersecurity #infosec #cve #euvd

Searched

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar projects

See all in Developer

Scrapling

D4Vinci · Kit

This Python web scraping framework combines fast HTTP requests, browser automation, and data parsing into one library. It includes an MCP server for AI agents…

New99.9k

TrendRadar

sansan0 · Kit

An open source news and public opinion monitor. It reads Chinese hot-search lists and your RSS feeds, keeps what matches your keywords or an AI score, and push…

New63.5k

Awesome Self-Hosted AI

glincker · Kit

Lists 309 open-source AI projects you can run on your own hardware or server, grouped into sections such as LLM runtimes, agents, RAG and speech, with a weekly…

New113