Phantombuster
The robomotion phantombuster CLI connects to Phantombuster for automated web scraping and data extraction. It launches and manages Phantoms (pre-built automation scripts), tracks execution status, retrieves results, and manages Phantom configuration.
When to use
- Launch Phantombuster Phantoms for LinkedIn, Twitter, and web scraping
- Monitor Phantom execution status and retrieve output data
- Manage Phantom configurations and schedules
Prerequisites
robomotionCLI installed- Package installed:
robomotion install phantombuster - Phantombuster API key configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install phantombuster - Connect with session:
robomotion phantombuster phantombuster_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion phantombuster phantombuster_launch --client-id "<client-id>" --phantom-id <phantom> --session-id "<session-id>" --output json - Disconnect when done:
robomotion phantombuster phantombuster_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion phantombuster phantombuster_connect --session --output jsonConnects to Phantombuster API and returns a client IDrobomotion phantombuster phantombuster_disconnect --client-id --session-id "<session-id>" --output jsonCloses the Phantombuster connection and releases resourcesrobomotion phantombuster launch_agent --client-id --agent-id --argument [--60] --session-id "<session-id>" --output jsonAdds a Phantombuster agent (Phantom) to the launch queuerobomotion phantombuster get_agent --client-id --agent-id --session-id "<session-id>" --output jsonGets a Phantombuster agent (Phantom) by IDrobomotion phantombuster list_agents --client-id [--0] --session-id "<session-id>" --output jsonLists all Phantombuster agents (Phantoms) in your organizationrobomotion phantombuster get_output --client-id --agent-id [--previous-container-id] --session-id "<session-id>" --output jsonGets the output of the most recent container of a Phantombuster agentrobomotion phantombuster stop_agent --client-id --agent-id --session-id "<session-id>" --output jsonStops a running Phantombuster agentrobomotion phantombuster delete_agent --client-id --agent-id --session-id "<session-id>" --output jsonDeletes a Phantombuster agent by IDrobomotion phantombuster get_container_result --client-id --container-id --session-id "<session-id>" --output jsonGets the result object of a Phantombuster container
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)