octoparse detect opens the Octoparse extension browser, inspects the page, and generates a local task file. Use it when you want to create a task from a URL without the Octoparse desktop app.
Three modes are available:
| Mode | When to use |
|---|---|
--auto | You want the CLI to pick the best data region automatically |
--manual | You need to log in, dismiss a paywall, or select the region yourself |
AI agent (--agent) | An LLM or automation tool is driving the workflow |
detect requires a valid Octoparse account and credentials. Local Chrome is also required. detect does not support Linux arm64. See Installation for platform requirements.Automatic mode
The CLI picks the best candidate data region and generates a task file:--json for a structured response:
--output is omitted, a detected_<host>.json file is created automatically.
Manual mode
Manual mode opens a browser overlay where you can complete login, dismiss popups, and select the data region yourself:--save-session to store cookies for sites that require login, so future local runs can replay the session:
Cookie sessions do not cover every site, especially pages that require localStorage, device binding, or fresh verification.
Validate the generated task
After generating a task file, validate it before running:AI agent workflow
For LLM-driven or automated workflows, use the agent contract instead of--auto. Start by reading the capabilities:
machineContract.recipes.createTaskFromUrlWithAgent — the recommended workflow for agents.
One-shot (fastest)
Use--agent with a trusted local runner that can read a context file and write a plan:
Auditable step-by-step
For audit or repair scenarios, use the prepare / preview / apply sequence instead of generating the task in one step.Prepare agent context
Export webpage context for agent planning.This generates
context.json with candidate data regions, field samples, visual screenshots, and a decisionSummary.Write a plan
Create a
plan.json based on context.json.Use the octopus.detect.agent-plan.v1 schema. Open the annotated screenshot path in context.visualArtifacts.annotatedScreenshotPath before choosing fields, and include visualReview evidence in the plan.Preview the plan
Validate the plan before generating the final task file.If
data.pass is false, revise the plan before applying it.Troubleshooting detect
| Issue | What to check |
|---|---|
| Chrome fails to launch | Run octoparse doctor and check the chrome entry. Try --chrome-path /path/to/chrome |
LINUX_ARM64_UNSUPPORTED | Switch to a Linux x64 environment or use cloud extraction |
LOGIN_SESSION_REQUIRED | Use --manual to log in and --save-session to store the session |
Plan preview returns pass: false | Revise candidateId or field selection in plan.json and re-run preview |
| Task produces empty or wrong results | Check context.resultValidationPolicy in the agent context; isolated missing fields in ads or heterogeneous rows are often normal |
What’s next
Run your first task
Run a generated task locally, check status, and export results.
Command cheatsheet
Full reference for detect, run, cloud, data, and auth commands.