Actions36
- Actors Actions
- Actor tasks Actions
- Datasets Actions
Overview
This node allows users to run an Apify actor task synchronously via a POST request. It is useful for executing predefined tasks on the Apify platform and retrieving their results immediately. Common scenarios include running web scraping or automation tasks with specific configurations such as timeout, memory, and maximum items to return. For example, a user can trigger a data extraction task and get the output directly in their workflow.
Use Case Examples
- Run a web scraping actor task by specifying the task ID and custom timeout to get the scraped data immediately.
- Execute an automation task with a memory limit and maximum items to control resource usage and cost.
- Use webhooks to get notified when the actor task finishes or fails.
Properties
| Name | Meaning |
|---|---|
| Actor Task ID | The ID or a tilde-separated owner's username and task's name to identify which actor task to run. It supports selection from a list, URL, or direct ID input. |
| Timeout | Optional timeout for the run in seconds, overriding the task's default timeout. |
| Memory | Memory limit for the run in megabytes, overriding the task's default memory setting. |
| Max Items | Maximum number of items the task run should return, useful for limiting pay-per-result costs. |
| Build | Specifies the actor build to run, either by build tag or number, defaulting to the task's configured build. |
| Output Record Key | Key of the record from the run's default key-value store to return in the response, default is 'OUTPUT'. |
| Webhooks | Base64-encoded JSON array defining optional webhooks for notifications on actor run events like finish or failure. |
| Use Custom Body | Boolean flag to indicate whether to send a custom JSON body in the request. |
| Custom Body | Custom JSON body to send with the request if 'Use Custom Body' is true. |
Output
JSON
runId- The unique identifier of the actor run.status- The status of the actor run (e.g., SUCCEEDED, FAILED).output- The output data from the actor run, typically the content of the specified output record key.metadata- Additional metadata about the run, such as start time, end time, and resource usage.
Dependencies
- Apify API key credential
Troubleshooting
- Ensure the Actor Task ID is valid and accessible with the provided API credentials.
- Timeout errors may occur if the specified timeout is too short for the task to complete; increase the timeout value if needed.
- Memory limit errors can happen if the specified memory is below the minimum required by the actor; use a power of 2 megabytes with a minimum of 128 MB.
- Invalid custom body JSON will cause request failures; ensure the JSON is correctly formatted.
- Webhooks must be Base64-encoded JSON arrays; incorrect encoding or format will cause webhook registration errors.
Links
- Apify Webhooks Documentation - Details on how to configure and use webhooks with Apify actor runs.
