Skip to content
Documentation menu

Documentation

Getting started

Install Scorch with Nix or build it from source, start the local API, and connect the CLI or any HTTP client.

Local-first: Scorch listens on 127.0.0.1:33000 by default and has no built-in authentication. Keep it on loopback while following this guide.

What you will run

A release build creates two executables with a strict process boundary:

scorchd

The long-running HTTP service. It owns metasearch, direct fetch, browser rendering, extraction, mapping, and crawl jobs.

scorch

The lightweight HTTP client. It exposes CLI commands, API benchmarking, and an MCP stdio adapter.

You do not need PostgreSQL, Redis, a message broker, a separate browser service, or worker processes. Crawl state is held in bounded memory and disappears when scorchd restarts.

Install

Option A: Nix flake

Run either released executable without cloning the repository:

nix run github:Fractal-Tess/scorch/v0.1.3#scorch -- --help
nix run github:Fractal-Tess/scorch/v0.1.3#scorchd -- --help

For a declarative NixOS service and client installation, continue to the Nix installation guide.

Option B: reproducible development environment

The repository includes devenv.nix with Rust, CMake, Clang, libclang, pkg-config, Chromium, Git, and Jujutsu. Install devenv, then run:

git clone https://github.com/Fractal-Tess/scorch.git
cd scorch
devenv shell
cargo build --release --workspace

Option C: native toolchain

Install stable Rust plus the native tools needed by embedded Obscura:

  • Rust stable with Cargo, Clippy, and rustfmt
  • CMake, Clang, libclang, and pkg-config
  • Git
  • Chromium only if you intend to enable the optional compatibility backend

If libclang is not discovered automatically, point LIBCLANG_PATH at the directory containing the shared library before building.

export LIBCLANG_PATH=/path/to/libclang/lib
cargo build --release --workspace

The optimized binaries are written to:

target/release/scorchd
target/release/scorch

Install them somewhere on your PATH if desired:

install -Dm755 target/release/scorchd ~/.local/bin/scorchd
install -Dm755 target/release/scorch ~/.local/bin/scorch

Start the API

scorchd

At startup the service prints operational logs to stderr. Verify liveness and readiness from another terminal:

curl -sS http://127.0.0.1:33000/health
curl -sS http://127.0.0.1:33000/ready | jq

/ready reports the default and allowed browser backends, Obscura stealth setting, global concurrency, search provider, and enabled search engines.

Browser startup: Obscura is embedded and requires no executable or sidecar. Chromium starts lazily only when it is compiled, allowed, selected, and needed.

Connect a client

The scorch client defaults to http://127.0.0.1:33000. Set one environment variable to use a different service:

export SCORCH_API_URL=https://scorch.internal.example
scorch search "rust async runtime" --limit 5

Every command also accepts --api-url:

scorch --api-url http://127.0.0.1:33000 search "web extraction"

SCORCH_API_URL configures only the client and MCP adapter. SCORCH_BIND controls where the service listens. They are intentionally separate settings.

Make a request

With the CLI

scorch scrape https://example.com --format markdown,links
scorch search "rust async runtime" --limit 5
scorch map https://example.com --limit 100
scorch crawl https://example.com --limit 20 --max-depth 2 --wait

With HTTP

curl -sS http://127.0.0.1:33000/v1/scrape \
  -H 'content-type: application/json' \
  -d '{
    "url": "https://example.com",
    "options": {
      "formats": ["markdown", "links"],
      "render": "auto"
    }
  }' | jq

With render: "auto", Scorch starts with a guarded direct fetch and escalates to a browser only when the content appears JavaScript-dependent or a screenshot requires rendering.

Production notes

  • Put authentication and TLS at the edge. Scorch does not provide either itself.
  • Do not treat crawl jobs as durable data. Poll and export results before their TTL or a service restart.
  • Keep the browser allowlist narrow. Requests cannot select a backend outside SCORCH_ALLOWED_BROWSERS.
  • Watch stderr. Protocol and result output stays on stdout; structured operational logs stay on stderr.
  • Build with release mode. Production profiles use thin LTO, one codegen unit, stripped symbols, and overflow checks.
SCORCH_LOG_FORMAT=json \
RUST_LOG=scorch=info \
SCORCH_BIND=127.0.0.1:33000 \
scorchd