Skip to main content

Infatica CLI

Infatica CLI documentation

Infatica CLI is a command-line tool for batch data collection. It is distributed as a single binary and does not require additional runtime dependencies.

Installation

Linux / macOS

curl -sSL https://dataplatform.infatica.io/install/install-cli.sh | sh

The installer detects your OS and architecture, downloads the latest binary, and installs it to /usr/local/bin/infatica. If that location is not writable, it falls back to ~/.local/bin/.

Windows PowerShell

irm https://dataplatform.infatica.io/install/install-cli.ps1 | iex

The installer downloads infatica.exe to %LOCALAPPDATA%\infatica\ and adds it to your PATH.

Manual installation

Download the binary for your platform from GitHub Releases, make it executable, and move it to a directory in your PATH.

chmod +x infatica
sudo mv infatica /usr/local/bin/infatica

Quick start

  1. Generate a Personal Access Token in Settings -> Personal Access Tokens.
  2. Log in with the CLI:
infatica login

You will be prompted to enter your token:

Enter your Personal Access Token: ********
Token verified - logged in as you@example.com
  1. Start using the CLI:
# Check your account
infatica me

# List recent runs
infatica run list

# Create a scraper run
infatica run create --type scraper --name "my-run" --items "https://example.com"

# Create a run with items from a file
infatica run create --type serp --name "search" --items @queries.txt

# Get run details
infatica run get RUN_ID

# Export results
infatica run export RUN_ID --format csv -o results.csv

Commands

CommandDescription
infatica loginAuthenticate with a Personal Access Token.
infatica meShow email, balance, and token info.
infatica logoutRemove saved credentials.
infatica run listList runs with filters: --type, --status, --q.
infatica run createCreate a new run with --type, --name, and --items.
infatica run get IDGet run details and item statuses.
infatica run cancel IDCancel a running run.
infatica run retry IDRetry failed items.
infatica run export IDDownload results in json, csv, md, or html format.
infatica run statsShow aggregate run statistics.
infatica config setUpdate CLI config, for example --api-url.
infatica config showPrint the current config.
infatica updateSelf-update by downloading the latest CLI binary.
infatica versionPrint the CLI version.
infatica helpShow help. Works at any command level.

Run types and config schemas

Every infatica run create command takes a --type and an optional --config JSON string. Each run type accepts a different set of config keys.

scraper - URL fetch and JavaScript rendering

Items are URLs. Set mode to render to render JavaScript. Omit mode for a plain fetch.

infatica run create --type scraper --name "Test scrape" \
--items "https://example.com,https://example.org" \
--config '{
"country": "US",
"language": "en",
"mode": "render",
"return_html": false,
"device": "desktop",
"browser": "chrome",
"proxy_type": "residential",
"method": "GET",
"headers": {"Accept-Language": "en-US"},
"request_body": "{}",
"referer": "https://google.com",
"session_id": "abc123"
}'

serp - Google SERP for a query

Items are search queries. The results parameter caps the row count returned per query.

infatica run create --type serp --name "Laptop search" \
--items "best laptops 2026" \
--config '{
"country": "US",
"language": "en",
"results": 10,
"pages": "1",
"mode": "render",
"timeout": 2000,
"screenshot": false,
"return_html": false,
"device": "desktop",
"headers": {}
}'

Items are questions or search queries. The provider field selects the underlying model. Supported values are chatgpt, gemini, and perplexity. The default provider is chatgpt.

infatica run create --type ai_search --name "AI summary" \
--items "what is the Rust borrow checker" \
--config '{
"provider": "chatgpt",
"prompt": "Summarize in 3 bullets",
"return_html": false
}'

ai_extract - structured extraction

Items are freeform task descriptions, for example a URL plus the data you want to extract from it. The --config value is currently ignored, so pass {} or omit it.

infatica run create --type ai_extract --name "Products" \
--items @urls.txt

Status values

Use these values with infatica run list --status STATUS.

StatusDescription
createdAccepted by the API, not yet queued.
queuedIn the work queue waiting for an adapter.
runningAt least one adapter is processing items.
processingPost-processing or aggregation phase.
completedAll items finished successfully.
partial_completedSome items succeeded and some failed.
failedThe run failed before producing useful output.
cancelledCancelled by the user via infatica run cancel.

Global flags

FlagDescription
--tokenOverride the Personal Access Token from config. Useful for CI.
--api-urlOverride the API URL from config.
--jsonOutput raw JSON. Useful when piping to tools like jq.
--quietOutput IDs only. Useful for scripting.
--no-colorDisable colored output.

Composable scripting

Retry all failed runs:

infatica run list --status failed --quiet | xargs -I{} infatica run retry {}

Export run details as JSON and filter failed items with jq:

infatica run get RUN_ID --json | jq '.items[] | select(.status == "failed")'

Phase 2

More commands for bulk runs, analysis, and schedules are coming in Phase 2. Watch GitHub Releases for updates.