Apify
The robomotion apify CLI runs actors on the Apify platform for web scraping, crawling, and data extraction at scale. It handles actor execution with configurable timeouts, run status monitoring, and paginated dataset retrieval.
When to use
- Run pre-built or custom Apify actors for web scraping
- Monitor actor run status and retrieve results
- Extract paginated datasets from completed actor runs
Prerequisites
robomotionCLI installed- Package installed:
robomotion install apify - Apify API token 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 apify - Connect with session:
robomotion apify apify_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion apify run_actor --client-id "<client-id>" --actor-id <actor> --input <json> --session-id "<session-id>" --output json - Disconnect when done:
robomotion apify apify_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion apify apify_connect --session --output jsonConnects to Apify and returns a client ID for subsequent operationsrobomotion apify apify_disconnect --client-id --session-id "<session-id>" --output jsonCloses the Apify connection and releases resourcesrobomotion apify run_actor --client-id --actor-id --input [--300] --session-id "<session-id>" --output jsonRuns an Apify Actor and optionally waits for completionrobomotion apify get_run --client-id --run-id --session-id "<session-id>" --output jsonGets details of an Actor run including status,dataset ID,and usage statisticsrobomotion apify get_dataset_items --client-id --dataset-id [--100] [--0] [--format] --session-id "<session-id>" --output jsonRetrieves items from an Apify dataset with optional pagination
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)