### Install and Start LightPanda Source: https://github.com/us/crw/blob/main/docs/docs/js-rendering.md Use these commands to automatically install and start the LightPanda CDP backend for JS rendering. ```bash # Auto-install crw-server setup ``` ```bash # Manual start lightpanda serve --host 127.0.0.1 --port 9222 & ``` -------------------------------- ### Setup LightPanda and Start crw-server Source: https://context7.com/us/crw/llms.txt These commands set up LightPanda, the fastest CDP backend for fastCRW, and then start both LightPanda and the crw-server. LightPanda is downloaded to `~/.local/bin/lightpanda`. ```bash # Setup LightPanda (fastest CDP backend) crw-server setup # downloads LightPanda to ~/.local/bin/lightpanda # Start LightPanda + crw-server lightpanda serve --host 127.0.0.1 --port 9222 & crw-server ``` -------------------------------- ### Install and Launch crw-browse Source: https://github.com/us/crw/blob/main/docs/mcp/index.html Install the crw-browse tool from crates.io or download a prebuilt binary. Launch it to start a browser automation server. ```bash # From crates.io car go install crw-browse crw-browse # Or grab a prebuilt binary from the v0.4.0 GitHub release # https://github.com/us/crw/releases/tag/v0.4.0 ``` -------------------------------- ### Install and Run LightPanda Source: https://github.com/us/crw/blob/main/docs/js-rendering/index.html Use this command to automatically install LightPanda. Alternatively, start the LightPanda server manually. ```bash crw-server setup ``` ```bash lightpanda serve --host 127.0.0.1 --port 9222 & ``` -------------------------------- ### Quick Start Pattern - Search Source: https://github.com/us/crw/blob/main/docs/agent-onboarding/index.html Example of searching the web for relevant information. ```APIDOC 3. **Search** when you need to find relevant pages across the web: ```bash curl -X POST https://fastcrw.com/api/v1/search \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "your search query", "limit": 5}' ``` ``` -------------------------------- ### Quick Start Pattern - Map and Scrape Source: https://github.com/us/crw/blob/main/docs/agent-onboarding/index.html Example of discovering pages on a domain and then extracting content from a specific page. ```APIDOC ## Quick Start Pattern For most agent workflows, start with this sequence: 1. **Discover** what pages exist on a target domain: ```bash curl -X POST https://fastcrw.com/api/v1/map \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}' ``` 2. **Extract** content from specific pages: ```bash curl -X POST https://fastcrw.com/api/v1/scrape \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/page", "formats": ["markdown"]}' ``` ``` -------------------------------- ### One-Line Install Script with wget Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Alternative one-line installation script using wget. ```bash wget -qO- https://raw.githubusercontent.com/us/crw/main/install.sh | sh ``` -------------------------------- ### Install crw-cli Source: https://github.com/us/crw/blob/main/docs/crates/index.html Install the `crw-cli` as a standalone binary for scraping URLs directly to markdown, JSON, or plain text without a server. Usage examples are provided for different output formats and file output. ```bash cargo install crw-cli ``` ```bash crw https://example.com # markdown to stdout crw https://example.com --format json crw https://example.com -o page.md ``` -------------------------------- ### Use crw-server as a library in Rust Source: https://github.com/us/crw/blob/main/crates/crw-server/README.md Example of how to integrate crw-server into a Rust application using tokio and axum. This snippet shows the basic setup for creating the application and starting the server. ```rust use crw_server::app::create_app; use crw_server::state::AppState; #[tokio::main] async fn main() { let config = crw_core::AppConfig::load().unwrap(); let state = AppState::new(config).await; let app = create_app(state); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); axum::serve(listener, app).await.unwrap(); } ``` -------------------------------- ### One-Line Install Script Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Recommended one-line installation script that auto-detects OS and architecture. Uses curl. ```bash curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | sh ``` -------------------------------- ### Install crw-server Source: https://github.com/us/crw/blob/main/crates/crw-server/README.md Install the crw-server binary using Cargo. ```bash cargo install crw-server ``` -------------------------------- ### Install fastCRW Binary Source: https://context7.com/us/crw/llms.txt Installs the fastCRW binary, including the server and MCP components. Supports OS auto-detection or specific binary installation. Homebrew, APT, and Cargo installation methods are also provided. ```bash # Auto-detects OS and architecture, installs crw + crw-server + crw-mcp curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | sh ``` ```bash # Install specific binary curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw sh ``` ```bash curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw-server sh ``` ```bash # Homebrew brew install us/crw/crw ``` ```bash brew install us/crw/crw-server ``` ```bash # APT (Debian/Ubuntu) curl -fsSL https://apt.fastcrw.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/crw.gpg echo "deb [signed-by=/usr/share/keyrings/crw.gpg] https://apt.fastcrw.com stable main" \ | sudo tee /etc/apt/sources.list.d/crw.list sudo apt update && sudo apt install crw ``` ```bash # Cargo cargo install crw-cli ``` ```bash cargo install crw-server ``` ```bash cargo install crw-mcp ``` ```bash # Python SDK (auto-downloads crw-mcp binary on first use) pip install crw ``` ```bash # Docker docker run -p 3000:3000 ghcr.io/us/crw:latest ``` ```bash # Docker Compose (includes LightPanda JS-rendering sidecar) docker compose up -d ``` -------------------------------- ### Install and Launch crw-browse Source: https://github.com/us/crw/blob/main/docs/docs/mcp.md Install the crw-browse tool using cargo or download a prebuilt binary. Launch it as a self-hosted binary for browser automation. ```bash # From crates.io carp install crw-browse crw-browse # Or grab a prebuilt binary from the v0.4.0 GitHub release # https://github.com/us/crw/releases/tag/v0.4.0 ``` -------------------------------- ### Install crw-cli Source: https://github.com/us/crw/blob/main/crates/crw-cli/README.md Installs the crw binary using Cargo. Ensure you have Rust and Cargo installed. ```bash cargo install crw-cli ``` -------------------------------- ### Start crw-server Source: https://github.com/us/crw/blob/main/crates/crw-server/README.md Start the crw-server with default settings. This command also enables JS rendering by downloading LightPanda if not already present. ```bash crw-server crw-server setup ``` -------------------------------- ### Install CRW MCP Server (npm) Source: https://github.com/us/crw/blob/main/README.md Install the CRW MCP server using npm for zero installation. This is the recommended method for AI agents. ```bash npx crw-mcp # zero install (npm) ``` -------------------------------- ### Start crw Server Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Starts the crw server after LightPanda has been initiated. ```bash crw-server ``` -------------------------------- ### Docker Compose Setup for CRW Source: https://github.com/us/crw/blob/main/docs/docker/index.html Clone the CRW repository and use Docker Compose to start the CRW API server and the Lightpanda service for JavaScript rendering. ```bash git clone https://github.com/us/crw.git cd crw docker compose up ``` -------------------------------- ### Verify MCP Installation with Initialize Command Source: https://github.com/us/crw/blob/main/docs/docs/mcp.md Use this command to verify that the MCP client is installed and responding correctly by sending an initialization request. ```bash echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"test"},"protocolVersion":"2024-11-05"}}' \ | crw-mcp 2>/dev/null ``` ```json { "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "serverInfo": {"name": "crw-mcp", "version": ""} } } ``` -------------------------------- ### Fetch CRW Agent Onboarding Skill File Source: https://github.com/us/crw/blob/main/README.md Fetch the SKILL.md file using curl to configure CRW for AI agents. This file contains tool descriptions, usage examples, and authentication setup. ```bash curl -s https://fastcrw.com/agent-onboarding/SKILL.md ``` -------------------------------- ### Install CRW MCP Server (Python SDK) Source: https://github.com/us/crw/blob/main/README.md Install the CRW Python SDK. This method automatically downloads the necessary binary. ```bash pip install crw # Python SDK (auto-downloads binary) ``` -------------------------------- ### Quick Start Pattern - Discover Source: https://github.com/us/crw/blob/main/docs/docs/agent-onboarding.md Discover all reachable URLs on a domain using the `/v1/map` endpoint. ```APIDOC ## Quick Start Pattern For most agent workflows, start with this sequence: 1. **Discover** what pages exist on a target domain: ```bash curl -X POST https://fastcrw.com/api/v1/map \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}' ``` ``` -------------------------------- ### Install CRW API Server (One-line) Source: https://github.com/us/crw/blob/main/README.md Install the CRW API server with a single command. This script auto-detects the operating system and architecture. ```bash # One-line install: curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw-server sh ``` -------------------------------- ### crw-browse Configuration Source: https://github.com/us/crw/blob/main/crates/crw-browse/README.md Example configuration for crw-browse within an MCP server setup. This specifies the command and arguments to run. ```json { "mcpServers": { "crw-browse": { "command": "crw-browse", "args": ["--ws-url", "ws://localhost:9222"] } } } ``` -------------------------------- ### Start LightPanda Server Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Starts the LightPanda server for JavaScript rendering on localhost port 9222. ```bash lightpanda serve --host 127.0.0.1 --port 9222 & ``` -------------------------------- ### Install crw-mcp Source: https://github.com/us/crw/blob/main/docs/docs/mcp.md Install the crw-mcp binary using curl, npm, pip, cargo, or Docker. Use npx for zero-install. ```bash curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | sh ``` ```bash npx crw-mcp ``` ```bash pip install crw ``` ```bash cargo install crw-mcp ``` ```bash docker run -i ghcr.io/us/crw crw-mcp ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/us/crw/blob/main/README.md Installs pre-commit hooks for the project. These hooks run formatting, linting, and testing checks before commits. ```bash make hooks ``` -------------------------------- ### Example JSON-RPC 'tree' Tool Call Source: https://github.com/us/crw/blob/main/crates/crw-browse/README.md Illustrates calling the 'tree' tool via JSON-RPC to fetch the page's accessibility tree. The example shows the request and a partial response indicating the tree structure. ```json → {"jsonrpc":"2.0","id":3,"method":"tools/call", "params":{"name":"tree","arguments":{"max_nodes":50}}} ← {... data.tree = "[1] WebArea: Example Domain\n [2] heading: Example Domain\n [3] link: More information\n..." } ``` -------------------------------- ### Install to Custom Directory Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Installs the script to a custom directory using the CRW_INSTALL_DIR environment variable. ```bash curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_INSTALL_DIR=~/.local/bin sh ``` -------------------------------- ### Install crw-renderer with CDP support Source: https://github.com/us/crw/blob/main/crates/crw-renderer/README.md To enable headless browser rendering via CDP, include the 'cdp' feature flag during installation. ```bash cargo add crw-renderer --features cdp ``` -------------------------------- ### Install CRW CLI (One-line) Source: https://github.com/us/crw/blob/main/README.md Install the CRW CLI with a single command. This script auto-detects the operating system and architecture. ```bash # One-line install (auto-detects OS & arch): curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw sh ``` -------------------------------- ### Install OpenClaw CRW Plugin Source: https://github.com/us/crw/blob/main/docs/docs/integrations.md Install the CRW plugin for OpenClaw to enable CRW functionalities. ```bash openclaw plugins install openclaw-plugin-crw ``` -------------------------------- ### Install crw-renderer Source: https://github.com/us/crw/blob/main/crates/crw-renderer/README.md Add the crw-renderer crate to your Cargo.toml file. ```bash cargo add crw-renderer ``` -------------------------------- ### CLI - Basic Scrape Source: https://context7.com/us/crw/llms.txt Example of using the CLI to scrape a URL and output markdown to stdout. ```APIDOC ## CLI — Scrape from the Terminal # Basic scrape — markdown to stdout crw example.com ``` -------------------------------- ### Start CRW MCP Server Source: https://github.com/us/crw/blob/main/python/README.md Start the CRW MCP stdio server from the command line. This is used to integrate CRW with AI coding agents. ```bash crw-mcp ``` -------------------------------- ### Install CRW Python SDK Source: https://github.com/us/crw/blob/main/docs/mcp/index.html Installs the CRW Python SDK using pip. Note that for the MCP binary, npx or cargo are recommended. ```bash pip install crw ``` -------------------------------- ### Quick Start Pattern - Extract Source: https://github.com/us/crw/blob/main/docs/docs/agent-onboarding.md Extract content from specific pages using the `/v1/scrape` endpoint. ```APIDOC 2. **Extract** content from specific pages: ```bash curl -X POST https://fastcrw.com/api/v1/scrape \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/page", "formats": ["markdown"]}' ``` ``` -------------------------------- ### Start a Crawl and Poll with TypeScript Source: https://github.com/us/crw/blob/main/docs/docs/sdk-examples.md Initiate a crawl job and poll its status using raw HTTP requests in TypeScript. This example shows the POST request to start a crawl and a GET request to check its status. ```typescript const start = await fetch("https://fastcrw.com/api/v1/crawl", { method: "POST", headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://example.com/docs", limit: 10 }), }); const { id } = await start.json(); const status = await fetch(`https://fastcrw.com/api/v1/crawl/${id}`, { headers: { Authorization: "Bearer YOUR_API_KEY" }, }); ``` -------------------------------- ### Python SDK - Search Source: https://context7.com/us/crw/llms.txt Example of using the Python SDK for web search. ```APIDOC # ── Search (cloud only) ──────────────────────────────────────────────────── results = client.search("LLM benchmark 2026", limit=10, sources=["web", "news"]) for r in results.get("web", []): print(r["title"], r["url"]) results = client.search( "rust web frameworks", limit=5, tbs="qdr:m", scrape_options={"formats": ["markdown"]}, ) ``` -------------------------------- ### Crawl Job Start Response Source: https://github.com/us/crw/blob/main/docs/docs/crawling.md Example of a successful response after starting a crawl job, containing the unique job ID. ```json { "success": true, "id": "550e8400-e29b-41d4-a716-446655440000" } ``` -------------------------------- ### Example JSON-RPC 'goto' Tool Call Source: https://github.com/us/crw/blob/main/crates/crw-browse/README.md Shows how to call the 'goto' tool via JSON-RPC to navigate to a URL and wait for the page to load. Includes the request and a sample success response. ```json → {"jsonrpc":"2.0","id":2,"method":"tools/call", "params":{"name":"goto","arguments":{"url":"https://example.com"}}} ← {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text", "text":"{\"ok\":true,\"session\":\"a3f1\",\"url\":\"https://example.com\", \"navigated\":true,\"elapsed_ms\":412,\"data\":{\"status\":200}}"}]}} ``` -------------------------------- ### Initialize CrwClient Source: https://github.com/us/crw/blob/main/python/README.md Demonstrates how to initialize the CrwClient, both with zero-configuration (auto-downloading the binary) and by connecting to a remote server. ```APIDOC ## Initialize CrwClient ### Description Initialize the CrwClient for interacting with the CRW service. This can be done with zero configuration, which automatically downloads the crw-mcp binary, or by specifying the `api_url` and `api_key` for a remote server. ### Method ```python CrwClient(api_url: str = None, api_key: str = None) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from crw import CrwClient # Zero-config (downloads crw-mcp binary automatically): client = CrwClient() # Or connect to a remote server: client = CrwClient(api_url="https://fastcrw.com/api", api_key="fc-...") ``` ### Response #### Success Response (200) N/A (Initialization does not return a response in this context) #### Response Example N/A ``` -------------------------------- ### Add crw-server Crate Source: https://github.com/us/crw/blob/main/docs/crates/index.html Add the `crw-server` crate to build an Axum-based HTTP API server. This example shows how to build the application and start the server. ```rust cargo add crw-server ``` ```rust use crw_server::app; use crw_core::AppConfig; let config = AppConfig::load()?; let app = app::build_app(config).await; let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?; axum::serve(listener, app).await?; ``` -------------------------------- ### Automatic JS Rendering Setup Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Automatically sets up JavaScript rendering by downloading LightPanda and creating a configuration file. ```bash crw-server setup ``` -------------------------------- ### Scrape a URL with Python Source: https://github.com/us/crw/blob/main/docs/docs/sdk-examples.md This Python example demonstrates how to scrape a URL and get the content in markdown format using the 'requests' library. Replace 'YOUR_API_KEY' with your actual API key. ```python import requests res = requests.post( "https://fastcrw.com/api/v1/scrape", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, json={"url": "https://example.com", "formats": ["markdown"]}, ) res.raise_for_status() payload = res.json() print(payload["data"]["markdown"]) ``` -------------------------------- ### Example JSON-RPC Initialization Source: https://github.com/us/crw/blob/main/crates/crw-browse/README.md Demonstrates the initial JSON-RPC request to initialize the connection with the crw-browse server and the expected response. ```json → {"jsonrpc":"2.0","id":1,"method":"initialize",...} ← {"jsonrpc":"2.0","id":1,"result":{"serverInfo":{"name":"crw-browse",...}}} ``` -------------------------------- ### Example Markdown Output Source: https://github.com/us/crw/blob/main/README.md This is an example of the markdown output generated by CRW for the 'Example Domain' URL. ```markdown # Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination. ``` -------------------------------- ### Search with Go Source: https://github.com/us/crw/blob/main/docs/sdk-examples/index.html A Go example for performing a search. Make sure to use your correct API key and modify the search query and limit. ```Go body := `{"query":"web scraping tools 2026","limit":5}` req, _ := http.NewRequest("POST", "https://fastcrw.com/api/v1/search", strings.NewReader(body)) req.Header.Set("Authorization", "Bearer YOUR_API_KEY") req.Header.Set("Content-Type", "application/json") resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } def resp.Body.Close() ``` -------------------------------- ### Quick Start Pattern - Search Source: https://github.com/us/crw/blob/main/docs/docs/agent-onboarding.md Search the web and return results with content using the `/v1/search` endpoint. ```APIDOC 3. **Search** when you need to find relevant pages across the web: ```bash curl -X POST https://fastcrw.com/api/v1/search \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "your search query", "limit": 5}' ``` ``` -------------------------------- ### Install CrewAI and CRW Source: https://github.com/us/crw/blob/main/docs/docs/integrations.md Install the necessary packages for CrewAI integration. ```bash pip install crewai crewai-crw ``` -------------------------------- ### Self-Hosting CRW with LightPanda for JS Rendering Source: https://context7.com/us/crw/llms.txt Steps to set up and run CRW with LightPanda for JavaScript rendering, involving serving LightPanda separately and then starting the CRW server. ```bash # With JS rendering via LightPanda crw-server setup lightpanda serve --host 127.0.0.1 --port 9222 & crw-server ``` -------------------------------- ### Install CRW Skill for AI Agents Source: https://github.com/us/crw/blob/main/README.md Install the CRW skill to all detected AI agents using the npx command. Ensure your agent is restarted after installation for the changes to take effect. ```bash npx crw-mcp init --all ``` -------------------------------- ### Install LangChain CRW Source: https://github.com/us/crw/blob/main/docs/docs/integrations.md Install the Python package for LangChain integration with CRW. ```bash pip install langchain-crw ``` -------------------------------- ### Initialize CrwClient (Zero-Config) Source: https://github.com/us/crw/blob/main/python/README.md Initialize the CrwClient without any configuration. The client will automatically download the crw-mcp binary. ```python from crw import CrwClient # Zero-config (downloads crw-mcp binary automatically): client = CrwClient() result = client.scrape("https://example.com") print(result["markdown"]) ``` -------------------------------- ### Run Pre-built Docker Image Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Launches the crw service using a pre-built Docker image. Port 3000 is exposed. ```bash docker run -p 3000:3000 ghcr.io/us/crw:latest ``` -------------------------------- ### Install n8n CRW Node Source: https://github.com/us/crw/blob/main/docs/docs/integrations.md Install the n8n-nodes-crw community node for n8n workflows. ```bash docker run -e EXTRA_COMMUNITY_PACKAGES=n8n-nodes-crw n8nio/n8n ``` -------------------------------- ### Install CRW CLI (Homebrew) Source: https://github.com/us/crw/blob/main/README.md Install the CRW command-line interface using Homebrew on macOS. ```bash brew install us/crw/crw ``` -------------------------------- ### Configure crw-server with TOML Source: https://github.com/us/crw/blob/main/crates/crw-server/README.md Example TOML configuration file for crw-server, showing settings for the server, renderer, crawler, auth, and LLM extraction. ```toml [server] host = "0.0.0.0" port = 3000 request_timeout_secs = 120 rate_limit_rps = 10 # Max requests/second (global). 0 = unlimited. [renderer] mode = "auto" # auto | lightpanda | playwright | chrome | none # render_js_default = true # alias: force_js = true — force JS for every request that omits `renderJs` [crawler] max_concurrency = 10 requests_per_second = 10.0 respect_robots_txt = true [auth] # api_keys = ["fc-key-1234"] [extraction.llm] provider = "anthropic" # "anthropic" or "openai" # api_key = "sk-..." # or CRW_EXTRACTION__LLM__API_KEY env var ``` -------------------------------- ### Install crw-mcp using Cargo Source: https://github.com/us/crw/blob/main/crates/crw-mcp/README.md Install the crw-mcp binary using the Rust package manager. ```bash cargo install crw-mcp ``` -------------------------------- ### Basic HTTP Fetching with FallbackRenderer Source: https://github.com/us/crw/blob/main/crates/crw-renderer/README.md Demonstrates basic HTTP fetching using FallbackRenderer. Initializes the renderer with default configurations and fetches a URL, printing the status code and HTML length. ```rust use crw_core::config::{RendererConfig, StealthConfig}; use crw_renderer::FallbackRenderer; use std::collections::HashMap; #[tokio::main] async fn main() -> Result<(), Box> { let config = RendererConfig::default(); let stealth = StealthConfig::default(); let renderer = FallbackRenderer::new(&config, "my-app/1.0", None, &stealth); let result = renderer.fetch("https://example.com", &HashMap::new(), None, None, None).await?; println!("Status: {}", result.status_code); println!("HTML length: {}", result.html.len()); Ok(()) } ``` -------------------------------- ### Run crw-server with Docker Source: https://github.com/us/crw/blob/main/crates/crw-server/README.md Instructions for running the crw-server using a pre-built Docker image or with a Docker Compose setup for JS rendering. ```bash # Pre-built image docker run -p 3000:3000 ghcr.io/us/crw:latest # With JS rendering sidecar docker compose up ``` -------------------------------- ### Install CRW MCP Server (Homebrew) Source: https://github.com/us/crw/blob/main/README.md Install the CRW MCP server using Homebrew on macOS. ```bash brew install us/crw/crw-mcp # Homebrew ``` -------------------------------- ### crw-browse Installation and Integration Source: https://context7.com/us/crw/llms.txt Install crw-browse using cargo and integrate it with Claude Code by adding it as an MCP server. ```bash # Install and run cargo install crw-browse crw-browse ``` ```bash # Wire into Claude Code claude mcp add crw-browse -- crw-browse ``` -------------------------------- ### Scrape a URL with Go Source: https://github.com/us/crw/blob/main/docs/docs/sdk-examples.md A Go example for scraping a URL and retrieving content. This code sets up an HTTP POST request with the necessary headers and JSON body. ```go package main import ( "bytes" "fmt" "io" "net/http" ) func main() { body := []byte(`{"url":"https://example.com","formats":["markdown"]}`) req, _ := http.NewRequest("POST", "https://fastcrw.com/api/v1/scrape", bytes.NewBuffer(body)) req.Header.Set("Authorization", "Bearer YOUR_API_KEY") req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() b, _ := io.ReadAll(res.Body) fmt.Println(string(b)) ``` -------------------------------- ### Install CRW MCP Server (Cargo) Source: https://github.com/us/crw/blob/main/README.md Install the CRW MCP server using Cargo, the Rust package manager. ```bash cargo install crw-mcp # Cargo ``` -------------------------------- ### TOML Configuration Example Source: https://github.com/us/crw/blob/main/README.md Illustrates layered TOML configuration with environment variable overrides for server, renderer, crawler, and auth settings. Defaults are in config.default.toml, local overrides in config.local.toml, and environment variables with CRW_ prefix. ```toml [server] host = "0.0.0.0" port = 3000 rate_limit_rps = 10 [renderer] mode = "auto" # auto | lightpanda | playwright | chrome | none [crawler] max_concurrency = 10 requests_per_second = 10.0 respect_robots_txt = true [auth] # api_keys = ["fc-key-1234"] ``` -------------------------------- ### Verify MCP Installation Source: https://github.com/us/crw/blob/main/docs/mcp/index.html Use this command to verify that the crw-mcp client is installed and functioning correctly by sending an initialization request. ```bash echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"test"},"protocolVersion":"2024-11-05"}}' \ | crw-mcp 2>/dev/null ``` -------------------------------- ### Map Site with Node.js SDK Source: https://github.com/us/crw/blob/main/docs/docs/map.md This Node.js example demonstrates how to map a site using the Map API. It sends a POST request with the API key and a JSON body containing the target URL and discovery parameters. ```javascript const resp = await fetch("https://fastcrw.com/api/v1/map", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://example.com", maxDepth: 1, useSitemap: true }) }); const body = await resp.json(); console.log(body.data.links); ``` -------------------------------- ### Install CRW CLI Source: https://github.com/us/crw/blob/main/README.md Installs the CRW command-line interface using a curl script. CRW_BINARY can be set to customize the binary name. ```bash curl -fsSL https://raw.githubusercontent.com/us/crw/main/install.sh | CRW_BINARY=crw sh ``` -------------------------------- ### Install fastCRW Skill Source: https://github.com/us/crw/blob/main/npm/crw-mcp/skills/SKILL.md Installs the CRW skill and MCP server to detected AI agents. This command is executed in a bash environment. ```bash crw fastcrw.com ``` -------------------------------- ### Single-Page Scrape Example Source: https://github.com/us/crw/blob/main/crates/crw-crawl/README.md Fetches a URL, extracts content, and optionally performs LLM structured extraction. Ensure the necessary types and renderer are initialized. ```rust use crw_crawl::single::scrape_url; use crw_core::types::{ScrapeRequest, OutputFormat}; use crw_renderer::FallbackRenderer; use crw_core::config::{RendererConfig, StealthConfig}; use std::sync::Arc; #[tokio::main] async fn main() -> Result<(), Box> { let config = RendererConfig::default(); let stealth = StealthConfig::default(); let renderer = Arc::new(FallbackRenderer::new(&config, "my-crawler/1.0", None, &stealth)); let request = ScrapeRequest { url: "https://example.com".into(), formats: vec![OutputFormat::Markdown, OutputFormat::Links], ..Default::default() }; let result = scrape_url(&request, &renderer, None, "my-crawler/1.0", false).await?; println!("Title: {:?}", result.metadata.title); println!("Markdown: {}", result.markdown.unwrap_or_default()); Ok(()) } ``` -------------------------------- ### Build CLI Tool from Source Source: https://github.com/us/crw/blob/main/docs/docs/installation.md Builds the crw CLI tool from source using cargo. No server setup is needed. ```bash git clone https://github.com/us/crw.git cd crw # CLI tool (no server, no setup) cargo build --release --bin crw ```