Apify é uma plataforma poderosa para construir, implantar e executar atores de automação web e web scraping em escala. A Apify permite que você extraia dados úteis de qualquer site, automatize fluxos de trabalho e conecte suas pipelines de dados perfeitamente.
Com a Apify, você pode:
- Executar atores prontos ou personalizados: Integre atores públicos ou desenvolva os seus próprios, automatizando uma ampla gama de extrações de dados da web e tarefas do navegador.
- Recuperar conjuntos de dados: Acesse e gerencie conjuntos de dados estruturados coletados por atores em tempo real.
- Escalar a automação web: Utilize a infraestrutura em nuvem para executar tarefas de forma confiável, assíncrona ou síncrona, com tratamento robusto de erros.
Na Zoen, a integração com a Apify permite que seus agentes executem operações básicas da Apify de forma programática:
- Executar Atores (Síncrono): Use
apify_run_actor_syncpara lançar um ator da Apify e aguardar sua conclusão, recuperando os resultados assim que a execução terminar. - Executar Atores (Assíncrono): Use
apify_run_actor_asyncpara iniciar um ator em segundo plano e sondá-lo periodicamente por resultados, adequado para tarefas mais longas ou complexas.
Essas operações equipam seus agentes para automatizar, raspar e orquestrar tarefas de coleta de dados ou automação de navegador diretamente dentro de fluxos de trabalho — tudo com configuração flexível e tratamento de resultados, sem a necessidade de execuções manuais ou ferramentas externas. Integre a Apify como um motor dinâmico de automação e extração de dados que alimenta seus fluxos de trabalho em escala web de forma programática.
Usage Instructions
Integrate Apify into your workflow. Run any Apify actor or saved task with custom input, fetch dataset items, and check run status. Supports both synchronous and asynchronous execution with automatic dataset fetching.
Actions
apify_run_actor_sync
Run an APIFY actor synchronously and get results (max 5 minutes)
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | APIFY API token from console.apify.com/account#/integrations |
actorId | string | Yes | Actor ID or username/actor-name. Examples: "apify/web-scraper", "janedoe/my-actor", "moJRLRc85AitArpNN" |
input | string | No | Actor input as JSON string. Example: {"startUrls": [{"url": "https://example.com"\}\], "maxPages": 10} |
memory | number | No | Memory in megabytes allocated for the actor run (128-32768). Example: 1024 for 1GB, 2048 for 2GB |
timeout | number | No | Timeout in seconds for the actor run. Example: 300 for 5 minutes, 3600 for 1 hour |
build | string | No | Actor build to run. Examples: "latest", "beta", "1.2.3", "build-tag-name" |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the actor run succeeded |
runId | string | APIFY run ID |
status | string | Run status (SUCCEEDED, FAILED, etc.) |
items | array | Dataset items (if completed) |
apify_run_actor_async
Run an APIFY actor asynchronously with polling for long-running tasks
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | APIFY API token from console.apify.com/account#/integrations |
actorId | string | Yes | Actor ID or username/actor-name. Examples: "apify/web-scraper", "janedoe/my-actor", "moJRLRc85AitArpNN" |
input | string | No | Actor input as JSON string. Example: {"startUrls": [{"url": "https://example.com"\}\], "maxPages": 10} |
waitForFinish | number | No | Initial wait time in seconds (0-60) before polling starts. Example: 30 |
itemLimit | number | No | Max dataset items to fetch (1-250000). Default: 100. Example: 500 |
memory | number | No | Memory in megabytes allocated for the actor run (128-32768). Example: 1024 for 1GB, 2048 for 2GB |
timeout | number | No | Timeout in seconds for the actor run. Example: 300 for 5 minutes, 3600 for 1 hour |
build | string | No | Actor build to run. Examples: "latest", "beta", "1.2.3", "build-tag-name" |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the actor run succeeded |
runId | string | APIFY run ID |
status | string | Run status (SUCCEEDED, FAILED, etc.) |
datasetId | string | Dataset ID containing results |
items | array | Dataset items (if completed) |
apify_run_task
Run a saved APIFY actor task synchronously and get dataset items (max 5 minutes)
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | APIFY API token from console.apify.com/account#/integrations |
taskId | string | Yes | Task ID or username/task-name. Examples: "janedoe/my-task", "moJRLRc85AitArpNN" |
input | string | No | JSON string that overrides the task's saved input. Example: {"startUrls": [{"url": "https://example.com"\}\]\} |
itemLimit | number | No | Max dataset items to return (1-250000). Example: 500 |
memory | number | No | Memory in megabytes allocated for the run (128-32768). Example: 1024 for 1GB |
timeout | number | No | Timeout in seconds for the run. Example: 300 for 5 minutes |
build | string | No | Actor build to run. Examples: "latest", "beta", "1.2.3" |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the task run succeeded |
status | string | Run status (SUCCEEDED, FAILED, etc.) |
items | array | Dataset items produced by the run |
apify_get_dataset_items
Retrieve items stored in an APIFY dataset
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | APIFY API token from console.apify.com/account#/integrations |
datasetId | string | Yes | Dataset ID to read items from. Example: "9RnD3Pql2vGZkc5H5" |
itemLimit | number | No | Max items to return (1-250000). Default: all items. Example: 500 |
offset | number | No | Number of items to skip at the start. Default: 0 |
fields | string | No | Comma-separated list of fields to include. Example: "title,url,price" |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the items were retrieved |
datasetId | string | Dataset ID the items were read from |
items | array | Items stored in the dataset |
count | number | Number of items returned |
apify_get_run
Get the status and details of an APIFY actor run
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | APIFY API token from console.apify.com/account#/integrations |
runId | string | Yes | Actor run ID to fetch. Example: "HG7ML7M8z78YcAPEB" |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the run was found |
runId | string | APIFY run ID |
status | string | Run status (READY, RUNNING, SUCCEEDED, FAILED, etc.) |
startedAt | string | When the run started (ISO timestamp) |
finishedAt | string | When the run finished (ISO timestamp) |
datasetId | string | Default dataset ID for the run |
keyValueStoreId | string | Default key-value store ID for the run |
stats | json | Run statistics (memory, CPU, duration) |