Docs/API reference

CLI reference

Every current command and flag from src/bin/crawlingo.rs, with input/output and failure behavior.

Download .md
Developers2 min read7 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Build and inspect

On Windows use target/release/crawlingo.exe. Run commands from a working directory with access to input and output paths. Logs go to stderr; command output uses stdout.

cargo build --locked --release --features cli
./target/release/crawlingo --help
./target/release/crawlingo dataset --help
shell3 lines · copy-ready

Global options

Precedence is defaults, config file, environment overrides, then explicit CLI options. Shared configuration validation runs before execution.

FlagValueBehavior
--configTOML/JSON pathLoads shared session configuration; CRAWLINGO_CONFIG can supply the path.
--proxyProxy URLOverrides config; CRAWLINGO_PROXY is also supported.
--rate-limit-rpsNumberPer-host request rate; overrides config.
--timeoutWhole secondsPer-attempt timeout; overrides config.
--help / -hNoneShow help for this command.
--version / -VNoneShow compiled package version.

dataset <job>

Read a JobConfig JSON file, generate/resume shards and print the report. The CLI handles Ctrl+C and Unix SIGTERM by requesting cancellation and waiting for cleanup.

Exit 0 means successful completion without rejected rows or failed pages. Exit 2 signals incomplete/cancelled work or quality failures. Fatal setup/run errors exit 1. Keep state and committed shards together for resume.

crawlingo --rate-limit-rps 2 dataset job.json
shell1 lines · copy-ready

fetch <url>

crawlingo fetch https://example.com/ --markdown
shell1 lines · copy-ready
OptionBehavior
--markdownPrint the parsed page as Markdown instead of HTML.
--stealthyUse HTTP TLS/browser-profile emulation; this does not execute page JavaScript.

crawl <url>

This collects a bounded crawl result in memory. It does not create DatasetJob shards or its checkpoint format. Review per-page failures in logs.

crawlingo crawl https://example.com/ --limit 10 --depth 1 --field title:h1 --output json
shell1 lines · copy-ready
OptionDefaultBehavior
--followaCSS link selector.
--limit10Maximum pages.
--depth3Maximum link-hop depth.
--concurrency2Crawl workers.
--delay0Pacing delay in seconds.
--field NAME:SELECTORNoneRepeatable named CSS extraction field.
--outputjsonjson or csv stdout format.
--resumeNonePersistent frontier directory.

sitemap <url>

Inspect the discovered URLs before using them as a dataset input. URL discovery does not guarantee successful fetching or a shared record schema.

crawlingo sitemap https://example.com/sitemap.xml --urls-only > urls.txt
shell1 lines · copy-ready
OptionDefaultBehavior
--urls-onlyfalsePrint loc URLs one per line.
--max-depth5Maximum index nesting depth.

download <url>

crawlingo download https://example.com/ --output page.html --max-bytes 1048576
shell1 lines · copy-ready
OptionDefaultBehavior
--output / -oRequiredDestination file.
--no-resumefalseRestart instead of attempting a range request.
--max-bytesNo explicit retained-byte limitLimit bytes saved; the transport still has a response-body cap.