Apify
Run Apify Actors and read bounded run, log, dataset, and key-value results from a Swarmz project
Connect Apify when a project needs a maintained web crawler, browser automation, or data-extraction Actor. The AI starts a named Actor with explicit input, then follows the returned run and storage IDs instead of guessing where the output lives.
Apify uses a shared project connection. Published app users act through the same Apify account and can run any Actor that its token can reach.
Availability
A Swarmz administrator must show Apify under Platform config > Integrations. Apify does not require a Swarmz OAuth application. A workspace member supplies an Apify API token when they add the connection.
Connect Apify
- In Apify Console, open Settings > Integrations and copy an API token. Apify explains API authentication and token handling.
- In the Swarmz project, open Settings > Integrations and select Apify.
- Select Add connection, paste the token into API key, and select Save connection.
Use a dedicated token whose account can reach only the Actors and storage you intend to expose. Swarmz checks the token against the Apify account endpoint, encrypts it, and keeps it behind the connector gateway.
Available operations
| Operation | What it does | Limit per minute |
|---|---|---|
run_actor | Starts one Actor with bounded JSON input and optional memory, timeout, wait, and item limits | 5 |
get_run | Reads one Actor run and its current status | 30 |
get_run_log | Reads a bounded run log | 20 |
get_dataset_items | Reads a paginated dataset slice | 20 |
get_key_value_record | Reads one bounded key-value store record | 20 |
run_actor is asynchronous by default. Use the run ID from its response with get_run. When the run finishes, use its defaultDatasetId or defaultKeyValueStoreId rather than an ID copied from another run.
Ask the AI to use Apify
- “Run the
apify/web-scraperActor against these three public URLs and show the first 20 results.” - “Build a crawl monitor that starts this Actor, polls its run ID, and shows the latest bounded log.”
- “Load the dataset returned by this finished Actor into a searchable results table.”
The AI requests the Apify connection as soon as the feature needs a real Actor. Starting a run is a write and requires allow-once approval; reading its status and output does not.
Verify Apify
- Run a low-cost Actor with a unique test input and
max_itemsset to a small number. - Confirm the run appears in Apify Console.
- Poll the returned run ID until it reaches a terminal status.
- Read its dataset, log, or key-value output and compare one known value.
Troubleshoot and recover
If setup is rejected, create a fresh token and confirm its Apify account opens the required Actor. If a run succeeds but no data appears, inspect the run's storage IDs; an Actor can finish without writing to its default dataset.
To rotate the token, create its replacement in Apify, edit the Swarmz connection, and verify get_run before revoking the previous token. To remove access, select Remove in Swarmz and revoke the token in Apify.