Octoparse CLI supports human-readable output for terminal use and machine-readable output for automation. Use this page when you are calling Octoparse CLI from scripts, agents, CI jobs, or other automation environments.Documentation Index
Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
JSON output
Use--json when you need one stable JSON response.
ok: true and a data field.
For example, octoparse task list --json may return:
ok: false and an error field.
A typical error response includes a code and message:
data structure depends on the command. Use the command-specific output as the source of truth when writing scripts.
JSONL event streams
Use--jsonl for long-running local run events.
stdout and stderr
In human mode:| Stream | Purpose |
|---|---|
| stdout | Requested data or command output |
| stderr | Diagnostics, warnings, and failures |
--json and --jsonl mode, structured output is written to stdout. Errors are still written to stderr as plain text or returned as a JSON error envelope, depending on the command and failure type.
This separation helps automation tools pipe requested output without mixing it with diagnostic logs.
Exit codes
| Exit code | Meaning | Typical triggers |
|---|---|---|
| 0 | Success | Command completed as requested |
| 1 | Operation failed | Authentication failure, task not found, export error |
| 2 | Runtime or environment failure | Node.js version mismatch, Chrome not available, engine initialization failure |
| 3 | Unsupported task definition | Task uses kernel browser or legacy workflow not supported by CLI v1 |
Automation recommendations
- Use
--jsonfor scripts that need a single structured response. - Use
--jsonlfor long-running task execution. - Treat non-zero exit codes as failed automation steps.
- Capture stderr separately when debugging.
- Do not expose API keys in logs.
For AI agents and automation environments, prefer
--json or --jsonl over human-readable output.