Apify icon

Apify

Access Apify tools for web scraping, data extraction, and automation.

Overview

This node integrates with Apify, a platform for web scraping, data extraction, and automation. Specifically, the "Actor Task" resource with the "Run Task and Get Dataset" operation allows users to trigger an Apify actor task run and retrieve its resulting dataset in one step.

Typical use cases include:

  • Automating the execution of predefined scraping or automation tasks hosted on Apify.
  • Running a task with custom input parameters or resource constraints (memory, timeout).
  • Fetching the output dataset immediately after the task completes, enabling downstream processing or analysis within n8n workflows.

For example, you might run a web scraper actor task that collects product prices from an e-commerce site and then process the returned dataset to update your inventory system.

Properties

Name Meaning
Actor Task Select the Apify actor task to run. You can choose from a list, provide a direct URL to the task, or enter the task ID manually.
Use Custom Body Boolean flag to specify whether to send a custom JSON body as input to the actor task instead of the default input.
Input (JSON) The custom JSON input to send to the actor task if "Use Custom Body" is enabled.
Timeout Optional timeout in seconds for the actor task run. Overrides the default timeout set in the task settings.
Memory Memory limit for the actor task run in megabytes. Options range from 128 MB up to 32 GB. Defaults to 1024 MB (1 GB).
Build Specify which build of the actor to run by tag or build number. Defaults to the build configured in the task settings (usually the latest).
Authentication Choose the authentication method to connect to Apify: either an API key credential or OAuth2.

Output

The node outputs the dataset produced by the executed actor task run in the json field of the output items. This dataset typically contains structured data extracted or generated by the actor task.

If the actor task produces binary data, it would be included in the binary output fields, but this node primarily focuses on JSON dataset retrieval.

Dependencies

  • Requires an active Apify account with access to the specified actor tasks.
  • Requires configuration of either an API key credential or OAuth2 authentication in n8n to authorize requests to Apify.
  • Network connectivity to Apify's API endpoints.

Troubleshooting

  • Invalid Actor Task ID or URL: Ensure the provided task identifier or URL matches the expected format. The node validates URLs against a regex pattern; incorrect URLs will cause validation errors.
  • Authentication Errors: Verify that the API key or OAuth2 credentials are correctly configured and have sufficient permissions.
  • Timeouts: If the actor task takes longer than the specified timeout, the run may be aborted. Adjust the timeout property accordingly or leave it unset to use the task's default.
  • Memory Limits: Setting memory too low may cause the actor to fail due to insufficient resources. Increase the memory option if runs fail unexpectedly.
  • Custom Input Issues: When using a custom JSON body, ensure the input matches the expected schema of the actor task to avoid runtime errors.

Links and References

Discussion