Crawl4AI Online
EN

Crawl4AI Docker: the self-hosted crawling API

One command starts Crawl4AI as a REST API with a web playground: docker run -d -p 11235:11235 --shm-size=1g unclecode/crawl4ai:latest. Then call /md or /crawl from any language.

Updated 6 Nov 2026

Start the container

docker run -d \
  -p 11235:11235 \
  --name crawl4ai \
  --shm-size=1g \
  unclecode/crawl4ai:latest
  • API: http://localhost:11235
  • Playground (test requests in the browser): http://localhost:11235/playground
  • Health check: GET /health

--shm-size=1g matters: Chromium needs shared memory and crashes on larger pages without it.

Get Markdown: POST /md

curl -X POST http://localhost:11235/md \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "f": "fit"}'

f selects the filter: raw, fit, bm25 (with a query q) or llm.

Full crawl: POST /crawl

curl -X POST http://localhost:11235/crawl \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://example.com"],
    "browser_config": {"type": "BrowserConfig", "params": {"headless": true}},
    "crawler_config": {"type": "CrawlerRunConfig", "params": {"cache_mode": "bypass"}}
  }'

Other endpoints: /crawl/stream (NDJSON), /html, /screenshot, /pdf, /execute_js, plus MCP at /mcp/sse (see Crawl4AI MCP).

LLM features: .llm.env

# .llm.env  (never commit this file)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=...
docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g \
  --env-file .llm.env unclecode/crawl4ai:latest

docker compose

services:
  crawl4ai:
    image: unclecode/crawl4ai:latest
    ports: ["11235:11235"]
    shm_size: "1g"
    env_file: [.llm.env]
    restart: unless-stopped
Do not expose port 11235 to the internet as is. Authentication is off by default. Enable JWT in config.yml (security.enabled) or put the API behind a reverse proxy with auth.

Want the request for a specific page? Enter it in the online tool and open the “Docker API” tab.

Crawl4AI Docker FAQ

Which port does Crawl4AI Docker use?
Port 11235. The playground is at http://localhost:11235/playground.
Why does Crawl4AI crash in Docker?
Most often because shared memory is too small. Start the container with --shm-size=1g (or shm_size in docker compose).
Can I call the Docker API from n8n or JavaScript?
Yes, it is plain HTTP with JSON. See Crawl4AI with n8n.