Apify icon

Apify

Apify API

Overview

This node allows users to run an Apify actor task synchronously using a GET 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 and processing the output data within an n8n workflow.

Use Case Examples

  1. Run a web scraping actor task by specifying its task ID and retrieve the scraped data directly.
  2. Execute an automation task with custom memory and timeout settings to optimize performance.

Properties

Name Meaning
Actor Task ID The ID or a tilde-separated owner's username and task's name to identify the actor task to run.
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 build number.
Output Record Key Key of the record from the run's default key-value store to be returned in the response.
Webhooks Base64-encoded JSON array defining optional webhooks for notifications on actor run events.
Use Custom Body Flag to indicate whether to use a custom request body.

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 returned by the actor run, typically from the specified output record key.
  • memory - Memory used during the actor run.
  • timeout - Timeout setting used for the actor run.

Dependencies

  • Apify API key credential for authentication

Troubleshooting

  • Ensure the Actor Task ID is valid and correctly formatted; invalid IDs will cause errors.
  • Timeouts may occur if the specified timeout is too short for the task to complete; increase the timeout if needed.
  • Memory limits must be powers of 2 and at least 128 MB; setting invalid memory values will cause the run to fail.
  • Webhooks must be properly Base64-encoded JSON arrays; malformed webhook data will cause errors.

Links

Discussion