crawl4ai
Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.
- 87.6k estrellas
- 9.1k forks
- 343 issues abiertos
- Lenguaje: Python
- Licencia: Apache-2.0
- actualizado
Instalación
git clone https://github.com/unclecode/crawl4ai && cp crawl4ai/*.md ~/.claude/agents/- Clone the repository and copy the agent .md definitions into ~/.claude/agents (or .claude/agents inside a project).
- Start a new Claude Code session to load the agents.
- Delegate work to them with the Task/Agent tool or by name.
1 items en este repositorio
Test current changes with adversarial tests, then run full regression suite
Resumen de Subagents
Crawl4AI
Crawl4AI Cloud is a hosted web scraping, extraction, and search API for AI agents and data pipelines. Turn pages into clean Markdown for RAG, extract structured JSON, or search the live web with one API key. Crawl4AI runs the browsers and manages the proxies.
Get a free API key · 1,000 free credits every month. No credit card required.
Try a URL in the playground · Set up Crawl4AI Cloud in Claude Code, Cursor, or Codex
This repository is home to the Apache-2.0 crawler that powers Crawl4AI Cloud. Run it yourself with Python or Docker.
Cloud quickstart
Hosted API base URL: https://api.crawl4ai.com.
Cloud API reference · Agent setup and MCP
Set CRAWL4AI_KEY to your API key, then scrape a page as Markdown:
curl -s https://api.crawl4ai.com/scrape \
-H "Authorization: Bearer $CRAWL4AI_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://news.ycombinator.com"}' | jq -r .markdownPython 3
import json
import os
from urllib.request import Request, urlopen
request = Request(
"https://api.crawl4ai.com/scrape",
data=json.dumps({"url": "https://news.ycombinator.com"}).encode("utf-8"),
headers={
"Authorization": f"Bearer {os.environ['CRAWL4AI_KEY']}",
"Content-Type": "application/json",
},
method="POST",
)
with urlopen(request) as response:
print(json.load(response)["markdown"])Node.js (18+)
async function main() {
const key = process.env.CRAWL4AI_KEY;
if (!key) throw new Error("Set CRAWL4AI_KEY first.");
const response = await fetch("https://api.crawl4ai.com/scrape", {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://news.ycombinator.com" }),
});
if (!response.ok) {
throw new Error(`Scrape failed (HTTP ${response.status}): ${await response.text()}`);
}
const { markdown } = await response.json();
console.log(markdown);
}
main().catch((error) => {
console.error(error.message);
process.exitCode = 1;
});Example Markdown output (illustrative excerpt):
# Hacker News
1. [Example story title](https://example.com/story)
2. [Another story title](https://example.com/another-story)The same key works for /extract, /search, /serp, /answer and many URLs at once (/scrape/batch, /scrape/jobs). Pay as you go: live prices.
For Claude Code, connect to the hosted MCP server:
claude mcp add --transport http crawl4ai https://api.crawl4ai.com/mcp \
--header "Authorization: Bearer $CRAWL4AI_KEY"Run Crawl4AI yourself
Latest: v0.9.6 (20 Nov 2026) · all releases →
pip install -U crawl4ai
crawl4ai-setup # installs the browser, onceimport 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())Docker server, CLI and every option: Installation · Self-hosted docs
Which one?
| ☁️ Crawl4AI Cloud | 🐍 Library | 🐳 Your own server | |
|---|---|---|---|
| Runs the browsers | we do | you, in your Python process | you, in Docker on your machine |
| JS-heavy pages and bot walls | handled for you, automatically | your settings, your proxies | your settings, your proxies |
| Web search | /search, /serp and /answer | – | – |
| Price | 1,000 free credits a month; plans from $10 | Free, Apache-2.0. You cover infrastructure. | Free, Apache-2.0. You cover hosting. |
🤓 My Personal Story
I grew up on an Amstrad, thanks to my dad, and never stopped building. In grad school I specialized in NLP and built crawlers for research. That’s where I learned how much extraction matters.
In 2023, I needed web-to-Markdown. The “open source” option wanted an account, API token, and $16, and still under-delivered. I went turbo anger mode, built Crawl4AI in days, and it went viral.
I made it open source for availability, anyone can use it without a gate. Now I’m building the platform for affordability, anyone can run serious crawls without breaking the bank. If that resonates, join in, send feedback, or just crawl something amazing.
That platform is live now: Crawl4AI Cloud.
Why developers pick Crawl4AI
LLM-ready output: smart Markdown with headings, tables, code and citation hints
Fast in practice: async browser pool, caching, minimal hops
Full control: sessions, proxies, cookies, user scripts, hooks
Adaptive intelligence: learns site patterns, explores only what matters
Deploy anywhere: run locally with Python or the CLI, secure your Docker server with a self-managed token, or use a Crawl4AI Cloud API key.
✨ Features
📝 Markdown generation
🧹 Clean Markdown: headings, lists, tables and code blocks, in a structure an LLM reads well.
🎯 Fit Markdown: filters remove menus, footers and boilerplate:
PruningContentFilterLXML,BM25ContentFilter(for a query) andLLMContentFilter.🔗 Citations: page links become a numbered reference list.
🛠️ Your own strategy: plug in a custom Markdown generator.
☁️ Same in the cloud: POST /scrape returns this Markdown, with no browser to run. Docs →
📊 Structured data extraction
🔎 CSS and XPath schemas: fast extraction with no LLM (
JsonCssExtractionStrategy,JsonXPathExtractionStrategy,RegexExtractionStrategy).🪄 Schema generator: describe what you want once;
generate_schemawrites a reusable schema.🤖 LLM extraction: any LLM provider, open-source or hosted, into a typed JSON schema (
LLMExtractionStrategy).🧱 Chunking: topic, regex and sentence chunking for long pages.
🌌 Cosine similarity: find the chunks that match a query (
CosineStrategy).
☁️ Same in the cloud: POST /extract, with no LLM key of your own. Docs →
🌐 Browser control
🖥️ Your own browser: persistent profiles with saved logins, cookies and settings.
🔄 Remote browsers: connect over the Chrome DevTools Protocol (CDP).
🔒 Sessions: keep a browser state across multi-step crawls.
🧩 Proxies: with authentication and rotation.
🕶️ Stealth mode:
enable_stealth, and an undetected-browser adapter for sites that detect automation.⚙️ Full control: headers, cookies, user agents, viewport.
🌍 Chromium, Firefox and WebKit.
🔎 Crawling and scraping
🕸️ Deep crawl: BFS, DFS and best-first strategies, with crash recovery (
resume_state) for long crawls.🧠 Adaptive crawling:
AdaptiveCrawlerstops when it has learned enough to answer your query.🌱 URL discovery:
AsyncUrlSeeder(sitemaps, Common Crawl) andDomainMapper;prefetch=Truefinds URLs 5 to 10 times faster.🚀 Dynamic pages: run JavaScript, wait for elements, scroll the full page (
scan_full_page) for infinite scroll and lazy images.📸 Screenshots and PDFs of any page.
🖼️ Media and links: images, audio, video,
srcset, internal and external links, iframes, metadata.📂 Raw HTML and local files:
raw:andfile://.🛠️ Hooks at every step of a crawl.
💾 Caching to skip repeated fetches.
⚡ Many URLs at once:
arun_manywith a memory-adaptive dispatcher.
☁️ Same in the cloud: up to 50 URLs in one streamed call, or 10,000 in a background job. Docs →
🐳 Self-hosting (Docker)
🔐 Secure by default: every endpoint needs your
CRAWL4AI_API_TOKEN.🧰 REST API:
/md,/html,/crawl,/crawl/stream,/screenshot,/pdf,/execute_js.🤖 MCP: connect Claude Code and other agents to your own server.
Lo que la gente pregunta sobre crawl4ai
¿Qué es unclecode/crawl4ai?
unclecode/crawl4ai es subagents para el ecosistema de Claude AI. Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it. Tiene 87.6k estrellas en GitHub y su última actualización registrada es del 2026-11-20.
¿Cómo se instala crawl4ai?
Puedes instalar crawl4ai clonando el repositorio (https://github.com/unclecode/crawl4ai) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar unclecode/crawl4ai?
Nuestro agente de seguridad ha analizado unclecode/crawl4ai y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene unclecode/crawl4ai?
unclecode/crawl4ai es mantenido por unclecode. La última actividad registrada en GitHub es del 2026-11-20, con 343 issues abiertos.
¿Hay alternativas a crawl4ai?
Sí. En ClaudeWave puedes explorar subagents similares en /categories/agents, ordenados por popularidad o actividad reciente.