CLI
The superscraper CLI runs scrapes and extractions from the terminal. Use it in shell scripts, CI pipelines and one-off jobs without writing code.
Not published. @superscraper/cli does not exist on npm, and the bare name superscraper on
npm is an unrelated third-party package, so neither npm install -g nor npx will get you this
CLI.
Every command maps 1:1 to a REST endpoint, so curl against
https://api.superscraper.dev does the same work today:
curl -sX POST https://api.superscraper.dev/v1/scrape \
-H "x-api-key: $SUPERSCRAPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Install
The CLI is not on npm yet. It is available on request: contact support@superscraper.dev. It installs two equivalent
commands, superscraper and leadsnap. Examples below use superscraper.
You need a SuperScraper API key. Get one free at app.superscraper.dev (opens in a new tab)
or mint one with POST /v1/keys/provision.
Authentication
Auth is resolved in this order:
SUPERSCRAPER_API_KEYenvironment variable~/.leadsnap/config.jsonwritten bysuperscraper init(the config path is still the legacy name in source)
Set the environment variable directly:
export SUPERSCRAPER_API_KEY=ss_live_xxxxxxxxxxxxxxxxxxxxOr run superscraper init to save credentials to the config file (recommended for interactive use).
Set SUPERSCRAPER_API_URL to point at a self-hosted instance (defaults to https://api.superscraper.dev).
Commands
init
Save your API key and base URL to ~/.leadsnap/config.json. Runs interactively by default; pass flags to skip the prompts.
superscraper init [options]| Option | Description |
|---|---|
--api-key <key> | API key (skip the interactive prompt) |
--api-url <url> | Base URL (default: https://api.superscraper.dev) |
Examples:
# Interactive, prompts for key and URL
superscraper init
# Non-interactive, write key directly
superscraper init --api-key ss_live_xxxxxxxxxxxxxxxxxxxxThe config file is written with mode 0600 (owner-read-only). An existing key is never echoed back; leave the prompt blank to keep it.
scrape
Scrape a single URL and return its content.
superscraper scrape <url> [options]| Option | Default | Description |
|---|---|---|
--format markdown|html|json | markdown | Output format |
--force-playwright | false | Use headless browser (skip plain fetch) |
--wait-for <ms> | 0 | Extra milliseconds to wait after page load |
--json, -j | false | Output the full raw API response as JSON |
Examples:
# Print markdown (default)
superscraper scrape https://northside-roasters.example
# Return structured listing JSON
superscraper scrape https://northside-roasters.example --format json
# Force headless browser with extra wait, raw API response
superscraper scrape https://react-app.com --force-playwright --wait-for 2000 --jsonextract
Extract structured data from a URL. Without --schema, uses the free JSON-LD cascade. With --schema, calls the LLM-powered extraction endpoint.
superscraper extract <url> [options]| Option | Description |
|---|---|
--schema <file.json> | Path to a JSON schema file; enables LLM extraction |
--json, -j | Output the full raw API response as JSON |
Examples:
# Free JSON-LD cascade (no schema required)
superscraper extract https://northside-roasters.example
# LLM-powered extraction with a schema file
superscraper extract https://northside-roasters.example --schema ./contact-schema.jsonThe source also contains pull, connectors and chat commands. They call endpoints that are not part of the public API, so they are not documented here and return 404.
Global options
These flags work on every command:
| Flag | Description |
|---|---|
--json, -j | Emit the raw API response as JSON (machine-readable) |
--help, -h | Show help |
--version, -V | Print version |
Environment variables
| Variable | Description |
|---|---|
SUPERSCRAPER_API_KEY | API key; overrides ~/.leadsnap/config.json |
SUPERSCRAPER_API_URL | Base URL; overrides ~/.leadsnap/config.json |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Error (API error, invalid arguments, authentication failure) |
Further reading
- API Reference: underlying REST endpoints
- MCP Server guide: use SuperScraper from Claude Desktop / Claude Code