Install
openclaw skills install apify-runnerRun any Apify Actor to scrape web data (Instagram, TikTok, Reddit, Twitter, etc). Handles Actor discovery, quality filtering, probe testing, batched execution, and result collection. Use when user asks to scrape/crawl/extract data from websites or social media platforms, or mentions Apify directly.
openclaw skills install apify-runnerRun any Apify Actor through a standardized workflow: search → validate → execute → collect results.
APIFY_TOKEN env var, or a config.json with tokens (copy config.json.example)requests installedExtract from the user's request:
If user specifies a token name or the task maps to a specific account, use that. Otherwise use default.
Token can be provided via:
--token flag (highest priority)config.json tokens map (by --token-name)APIFY_TOKEN env var (fallback)Run the search script:
python3 scripts/search_actor.py "instagram scraper" --top 3
Output: ranked candidates with score, success rate, rating, pricing model.
Quality filters (built into script):
notice = NONE (not deprecated)Pick the top-ranked candidate. If user has a preference or prior experience with a specific Actor, skip search.
Fetch the Actor's documentation:
web_fetch https://apify.com/{actor_id}.md
Read the input schema section. Construct run_input JSON based on:
Do NOT ask the user to write JSON. Build it from their natural language request.
Test with minimal input before committing to full run:
python3 scripts/apify_runner.py {actor_id} \
--input '{...}' \
--token {token} \
--probe-only \
--list-key {key}
The probe automatically uses the first 2 items from the list field.
Checks:
If probe fails → try next candidate Actor. If all 3 fail → report to user with Actor URLs for manual activation.
python3 scripts/apify_runner.py {actor_id} \
--input '{...}' \
--token {token} \
--output /path/to/results.json \
--list-key {key} \
--batch-size 50 \
--probe
Key flags:
| Flag | Purpose | Default |
|---|---|---|
--list-key | Field in run_input containing the list to batch | None (no batching) |
--batch-size | Items per batch | 50 |
--timeout | Per-batch timeout (seconds) | 600 |
--probe | Run probe before full execution | Off |
--output | Save results to JSON file | Stdout |
--config | Path to config.json for token lookup | None |
--token-name | Which token to use from config | "default" |
Batching rules:
| Platform | Typical Actor | list_key | Example input |
|---|---|---|---|
apify/instagram-scraper | directUrls | {"directUrls": ["https://instagram.com/user/"], "resultsType": "posts", "resultsLimit": 3} | |
| TikTok | clockworks/tiktok-scraper | hashtags | {"hashtags": ["cooking"], "resultsPerPage": 50} |
trudax/reddit-scraper-lite | startUrls | {"startUrls": [{"url": "https://reddit.com/r/cooking/top/?t=month"}], "maxItems": 30} | |
apidojo/tweet-scraper | — | Check .md for current schema |
These are starting points. Always verify with the Actor's .md page for current schema.