Apify icon

Apify

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

Overview

This node integrates with the Apify platform, specifically focusing on the "Actor" resource and the "Get Last Run" operation. It retrieves information about the most recent run of a specified Actor on Apify. This is useful for monitoring or automating workflows based on the status or results of an Actor's execution.

Common scenarios include:

  • Checking the latest run status of a web scraping or automation task.
  • Triggering downstream processes only if the last run succeeded.
  • Auditing or logging Actor executions programmatically.

Example: You have an Actor that scrapes product prices daily. Using this node, you can fetch the last run details to verify it completed successfully before processing the scraped data.

Properties

Name Meaning
Actor The Actor to query. Can be selected from a list, provided as a URL, or entered as an ID. The URL must match the pattern https://console.apify.com/actors/{actorId}. The ID is an alphanumeric string identifying the Actor.
Status Filter runs by their status. Options include: ABORTED, ABORTING, FAILED, READY, RUNNING, SUCCEEDED, TIMED-OUT, TIMING-OUT. Defaults to "SUCCEEDED".
Authentication Choose the authentication method to access Apify: either an API key credential or OAuth2.

Output

The node outputs JSON data representing the last run of the specified Actor filtered by the chosen status. The output typically includes details such as:

  • Run ID
  • Status
  • Start and finish timestamps
  • Input and output data references
  • Metadata about the run environment

If the Actor produces binary data, it would be referenced accordingly, but this node primarily returns structured JSON about the run itself.

Dependencies

  • Requires an active connection to the Apify platform.
  • Needs either an API key credential or OAuth2 authentication configured in n8n.
  • Internet access to call Apify's REST API endpoints.

Troubleshooting

  • Invalid Actor URL or ID: Ensure the Actor identifier matches the expected format. URLs must start with https://console.apify.com/actors/ followed by a valid Actor ID.
  • Authentication errors: Verify that the API key or OAuth2 credentials are correctly set up and have sufficient permissions.
  • No runs found: If no runs match the specified status, the output may be empty or null. Try broadening the status filter.
  • Network issues: Check internet connectivity and Apify service availability.

Links and References

Discussion