Resources · n8n integration

Apify n8n integrationAutomate Apify with n8n.

The Apify n8n integration turns a scraping run into an ordinary workflow step. The node covers 12 operations across 5 resources, from starting an Actor to reading the dataset it filled, and the Apify Trigger listens to 5 run events across the run lifecycle.

Community node This node is not shipped with n8n: it is a community package (@apify/n8n-nodes-apify) you install from Settings › Community nodes on a self-hosted instance. npm

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Apify n8n integration actually give you?

Apify runs cloud programs called Actors that crawl sites and hand back structured data. The n8n node drives that platform from inside a workflow: it starts an Actor or a saved task, optionally holds the execution until the run ends, then reads the dataset or the key-value store record the run produced. The Apify Trigger works the other way around, waking a workflow once a run reaches a terminal state.

Take a weekly price watch. A schedule starts Actors.Run actor and get dataset, the rows come back in the same execution, and a Google Sheets node appends them to a tracking tab. Nothing waits for a human to open the Apify console.

Second pattern, the long crawl. Some Actors run for far longer than a workflow should sit idle, so you fire them with Actors.Run actor and let go. The Apify Trigger picks the run back up on ACTOR.RUN.SUCCEEDED, a second workflow reads the dataset, and a Slack message tells the team the file is ready. Failures land on the same trigger under ACTOR.RUN.FAILED, which is where alerting belongs.

Third pattern, one page at a time. Actors.Scrape single URL pulls a single address through the Website Content Crawler Actor and returns markdown, HTML or plain text. That is the shape you want when an AI step reads the page afterwards, or when you are enriching rows that already live in Postgres.

The node stops at 12 operations. Anything else on the Apify API, and there is plenty, goes through the HTTP Request node, which reuses the same credential through predefined authentication so you do not store the key twice.

Two limits worth knowing before you build. Waiting inside the node is capped by the workflow timeout set in your n8n configuration, so Wait for Finish is not a substitute for the trigger on slow crawls. And listing operations return a page of results at a time, with Offset and Limit deciding how much comes back. If you are still weighing platforms before writing any of this, the n8n review goes through the trade-offs.

Connect

How do you connect Apify to n8n?

  1. 01

    Install the community node package

    Apify is not bundled with n8n. On a self-hosted instance, open Settings, then Community nodes, and install the npm package @apify/n8n-nodes-apify (version 0.7.0). Once the install finishes, both Apify and Apify Trigger show up in the node panel and behave like any other node in the canvas.

  2. 02

    Create the Apify credential

    A credential is the stored login n8n reuses across workflows, and you create it once from the Credentials menu. Apify accepts two methods here: API Key, listed as apifyApi, or OAuth2, listed as apifyOAuth2Api. Pick one, fill it in, and the same entry serves every Apify node in every workflow on that instance.

  3. 03

    Point the node at the credential

    Drop an Apify node on the canvas and choose the credential from the dropdown at the top of the node. Then pick the resource and the operation, for instance Actor and Run an Actor. The Apify Trigger asks for the same credential, and it needs it before it can register its webhook URL with Apify when you activate the workflow.

Triggers

What can start a workflow from Apify ?

Apify Trigger is the node that starts a workflow when something happens in Apify. It listens to 5 events, listed below by family. Pick one or several, activate the workflow: n8n registers the webhook on your Apify account.

What you see in n8n

Every event, by family

One row per object, one chip per action. The event to tick in the node is object.action; hover a chip to read exactly when it fires.

ACTOR.*4
  • ACTOR.RUN.
    • ABORTED
    • FAILED
    • SUCCEEDED
    • TIMED_OUT
any.*1
  • any.
    • any

Configuration notes

01Set up the Apify TriggerA trigger is the node that starts a workflow. The Apify Trigger works by webhook, meaning n8n hands Apify a URL and Apify calls it: registration happens when you activate the workflow, and each event lands in n8n within seconds. Nothing runs on a timer.

A trigger is the node that starts a workflow. The Apify Trigger works by webhook, meaning n8n hands Apify a URL and Apify calls it: registration happens when you activate the workflow, and each event lands in n8n within seconds. Nothing runs on a timer.

Key parameters

  • Resource to Watch: whether the trigger fires when an Actor run finishes or when a task run finishes. It decides which of the next two fields you fill in.
  • Actor Source: choose between your recently used Actors and browsing Apify Store, which changes what the Actor dropdown offers.
  • Actor: required, the Actor ID or a tilde-separated username and Actor name.
  • Actor Task: the saved Apify task to monitor for runs, picked from the list or set with an expression, the n8n syntax that reads a value instead of typing it.
  • eventType: the events you tick. There is no wildcard value on this trigger, so select the ones you want.
When to use it
any time the work happens on Apify's side and n8n only needs to know when it is done.
02Actor run eventsFour of the five events describe how a run ended, and they map onto four different reactions. Split them across branches rather than piling them into one workflow, because the useful part is what happens next.

Four of the five events describe how a run ended, and they map onto four different reactions. Split them across branches rather than piling them into one workflow, because the useful part is what happens next.

Key parameters

  • ACTOR.RUN.SUCCEEDED: the run completed successfully. This is the one that feeds Get dataset items and whatever consumes the rows.
  • ACTOR.RUN.FAILED: the run failed. Worth routing to an alert, since a silent scraping failure looks exactly like a slow week of data.
  • ACTOR.RUN.TIMED_OUT: the run hit its time limit. Usually a sign the Timeout or the input scope needs adjusting rather than a broken Actor.
  • ACTOR.RUN.ABORTED: someone or something stopped the run, including a cost ceiling being reached.
Use cases
one workflow reacts to success and moves the data, a second watches the three failure paths and reports them in one place.
03Any terminal eventThe second event family holds a single value that covers every ending at once. Use it when the routing happens later in the workflow rather than at the trigger, for example when a later node reads the run status and decides what to do. It is the only value in its family, and it sits alongside the four named endings rather than replacing them.

The second event family holds a single value that covers every ending at once. Use it when the routing happens later in the workflow rather than at the trigger, for example when a later node reads the run status and decides what to do. It is the only value in its family, and it sits alongside the four named endings rather than replacing them.

Key parameters

  • any: fires on any terminal event, so success, failure, timeout and abort all arrive on the same output. It saves ticking four boxes when you want all four anyway.
When to use it
a single audit workflow that logs every run of a given Actor, whatever the outcome, and only splits the path once it has the run details in hand.
Actions

What can the Apify node do in a workflow?

The Apify node exposes 12 operations across 5 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceAbort runGet ItemsGet Key-Value Store RecordGet Last RunGet runGet runsGet User Runs ListRun an ActorRun an Actor and Get DatasetRun TaskRun Task and Get DatasetScrape Single URL
Actor✓✓✓✓
Actor Task✓✓
Actor Run✓✓✓✓
Dataset✓
Key-Value Store✓

Actor

4 operations
01

Run an Actor

Actors.Run actor

What you see in n8n

Notes & use cases

Starts an Actor and returns the run, without necessarily waiting for it. The fire-and-forget half of the node, paired with the trigger for long crawls.

Key parameters

  • Actor: required, in the format username~actor-name or as a plain Actor ID.
  • Input JSON: overrides the prefilled input. For web scrapers, common fields are startUrls, maxCrawlPages and proxyConfiguration; pass {} for the Actor defaults.
  • Wait for Finish: holds the execution until the run ends, capped by your workflow timeout setting.
  • Maximum Cost per Run (USD): aborts the run once the amount is reached, on Actors priced per event or per result.
Use cases
kicking off a full site crawl from a form submission and letting the trigger handle the rest.
02

Run an Actor and get dataset

Actors.Run actor and get dataset

What you see in n8n

Notes & use cases

One node, three steps: it starts the Actor, waits for it to finish, and returns the dataset items. The rows arrive on the output, so the next node works on real data instead of a run ID.

Key parameters

  • Actor: required, the Actor to run, browsable in Apify Store.
  • Input JSON: the run input, whose structure depends on the Actor. The exact schema lives in Apify Console.
  • Timeout: a run timeout in seconds, replacing the Actor's default run configuration.
  • Memory: the memory limit in megabytes, from 128 up to 32768.
Use cases
a short crawl inside a single execution, where waiting a moment beats building a second workflow around the trigger.
03

Scrape single URL

Actors.Scrape single URL

What you see in n8n

Notes & use cases

Runs one page through the Website Content Crawler Actor and gives back its content as text, markdown and HTML. No Actor ID to look up, which makes it the quickest way to read a page from a workflow.

Key parameters

  • URL: the address to scrape. It has to start with http:// or https:// and be a valid URL.
  • Crawler Type: cheerio, jsdom, playwright:adaptive or playwright:firefox, depending on how much the page relies on scripts.
  • Output Format: markdown for AI agents and language models, html for programmatic processing, text for plain content.
Use cases
reading a competitor's pricing page on a schedule and handing the markdown to a summarising step.
04

Get last run

Actors.Get last run

What you see in n8n

Notes & use cases

Fetches the most recent run of an Actor, with its status and its storages, without you having to know a run ID first. Handy when the workflow starts somewhere other than Apify.

Key parameters

  • Actor: required, the Actor ID or a tilde-separated username and Actor name.
  • Status: narrows the answer to runs in one state, among READY, RUNNING, SUCCEEDED, FAILED, ABORTING, ABORTED, TIMING-OUT and TIMED-OUT.
Use cases
a morning check that asks for the last successful run of a crawler and pulls its dataset ID for the day's report.

Actor Task

2 operations
05

Run task

Actor tasks.Run task

What you see in n8n

Notes & use cases

Tasks are Actor configurations saved in Apify Console, so this operation runs one by name and returns all its details. The input lives on the Apify side, which keeps the n8n node short.

Key parameters

  • Actor Task: required, as username~task-name or a plain task ID.
  • Use Custom Body: switch it on to override the input saved in the task.
  • Input (JSON): the override itself, following the input schema of the Actor behind the task.
  • Build Tag: the build to run, instead of the one set in the task settings.
Use cases
one saved task per market, run from a loop, with the task holding the URLs and the workflow holding the schedule.
06

Run task and get dataset

Actor tasks.Run task and get dataset

What you see in n8n

Notes & use cases

Same saved task, but the node waits and hands back the dataset items directly. It removes the second hop when the task finishes quickly enough to sit inside one execution.

Key parameters

  • Actor Task: required, the task to run, managed in Apify Console.
  • Use Custom Body: whether the saved input gets replaced for this run.
  • Timeout: a run timeout in seconds, overriding the task settings.
  • Maximum Cost per Run (USD): the ceiling in USD past which the run is aborted. Leave it empty for no limit.
Use cases
a recurring lead list where the same task runs every morning and the rows go straight into the next node.

Actor Run

4 operations
07

Get user runs list

Actor runs.Get user runs list

What you see in n8n

Notes & use cases

Returns the run history of the whole account, not of one Actor. It is the operation behind any reporting on what actually ran, and it takes no required field at all.

Key parameters

  • Limit: how many runs come back at most.
  • Offset: how many entries to skip at the start, 0 by default, which is how you walk through a long history.
  • Desc: flips the startedAt sort to descending, so the latest runs come first.
  • Status: keeps only runs in one terminal state, among SUCCEEDED, FAILED, TIMED-OUT and ABORTED.
Use cases
a weekly digest counting how many runs failed across every Actor on the account.
08

Get run

Actor runs.Get run

What you see in n8n

Notes & use cases

Looks up one run by its ID and returns its metadata, its status and its storages. Most workflows use it right after a trigger event, to turn a bare run reference into something worth reading.

Key parameters

  • Run ID: required, and typically an expression such as {{ $json.id }} pointing at the run that just ended. A required field left empty stops the node from executing.
Use cases
after ACTOR.RUN.FAILED, fetching the run so the alert carries the status and the dataset reference rather than an ID on its own.
09

Get runs

Actor runs.Get runs

What you see in n8n

Notes & use cases

Lists the runs of one specific Actor, which is the difference with the account-wide history. Use it to look at a single crawler over time.

Key parameters

  • Actor: required, the Actor whose history you want, as an ID or a tilde-separated username and Actor name.
  • Status: filters the list, and here an empty value stands for All alongside the individual states.
  • Desc: reverses the default ascending sort on startedAt.
  • Limit: the maximum number of results, paired with Offset to page through them.
Use cases
spotting that a scraper has been timing out three mornings in a row before anyone notices the missing rows.
10

Abort an Actor run

Actor runs.Abort run

What you see in n8n

Notes & use cases

Stops a run that is still going. The only operation on this node that changes something rather than reading it, which is worth remembering when you wire it behind anything automatic.

Key parameters

  • Run ID: required, the ID of the run to abort, usually carried in from a previous node.
  • Graceful: gives the Actor time to finish its current task before it stops. Switched off, the run is killed immediately.
Use cases
a guard workflow that lists running crawls, checks how long they have been going, and aborts the ones that are clearly stuck.

Dataset

1 operation
11

Get dataset items

Datasets.Get items

What you see in n8n

Notes & use cases

Reads the rows out of a dataset, which is where an Actor puts what it collected. This is the operation that turns a finished run into items your other nodes can work on.

Key parameters

  • Dataset ID: required, either the ID or username~dataset-name.
  • Limit: the maximum number of items returned, with Offset skipping the first ones so a large dataset comes back in slices.
  • Fields: a comma-separated list of the only fields to keep, which keeps wide scraping results manageable.
  • Omit: the mirror image, dropping fields; a field in both lists is excluded.
Use cases
pulling product rows after a crawl and writing only name, price and URL to a sheet.

Key-Value Store

1 operation
12

Get key-value store record

Key-Value Stores.Get Key-Value Store Record

What you see in n8n

Notes & use cases

Key-value stores hold the single artefacts a run produces, a screenshot or a summary file rather than a table of rows. This operation reads one of them by key.

Key parameters

  • Key-Value Store ID: required, the store to read from, usually the one attached to the run you just fetched.
  • Key-Value Store Record Key: required, the key of the record itself. Both are resource locators, so you can pick from a list or set them with an expression.
Use cases
retrieving the record an Actor wrote under a known key at the end of a run and attaching it to the notification instead of re-reading the whole dataset.
Need help

Need help automating Apify with n8n?

A person reads every message.

FAQ

Apify and n8n, the usual questions

01Is the Apify n8n integration free to use?
Yes on the n8n side, with one condition. Apify is a community node, which means it does not ship with n8n: it is the npm package @apify/n8n-nodes-apify, version 0.7.0, and you install it yourself from Settings, then Community nodes, on a self-hosted instance. n8n Cloud only accepts verified community nodes, so check that before you plan around it there. Once installed, the node costs nothing extra in n8n, whether you run in Docker, through npm or on n8n Cloud. A workflow built on one is identical on the other. What Apify itself charges is a separate question and not one this page answers.
02What credentials do you need for the Apify node in n8n?
Two methods are available: API Key, listed in n8n as apifyApi, and OAuth2, listed as apifyOAuth2Api. Pick whichever suits how your team manages access. A credential in n8n is created once from the Credentials menu and then reused everywhere, so every Apify node and every Apify Trigger in every workflow picks the same entry from its dropdown. That also matters for the HTTP Request node, which can reuse the credential through predefined authentication when you call an endpoint the node does not cover. The trigger needs the credential before it can register its webhook with Apify at activation.
03What are the limits of the Apify node in n8n?
The node exposes 12 operations over 5 resources: Actors, Actor tasks, Actor runs, datasets and key-value stores. That covers running things and reading results, and not much else. Anything beyond it goes through the HTTP Request node against the Apify API, reusing the same credential. Two behaviours are worth planning for. Listing operations return a page at a time, controlled by Limit and Offset, so an export loops rather than arriving in one item. And waiting inside a node with Wait for Finish is bounded by the workflow timeout in your n8n configuration, which is why long crawls belong with the trigger.
04Does the Apify Trigger react in real time?
Yes. The Apify Trigger works by webhook, a URL that Apify calls when something happens rather than n8n asking on a schedule. n8n registers that URL with Apify when you activate the workflow, and each event lands within seconds of the run ending. There are 5 events in 2 families: ACTOR.RUN.SUCCEEDED, ACTOR.RUN.FAILED, ACTOR.RUN.TIMED_OUT and ACTOR.RUN.ABORTED on one side, and the catch-all any on the other. There is no wildcard value beyond that last one, so tick the specific events you care about. Resource to Watch decides whether you are listening to Actor runs or task runs.
05n8n or Make for automating Apify?
It depends on three things. Hosting first: n8n runs on your own servers through Docker or npm, or on n8n Cloud, while Make is hosted only, with no self-hosting option. That decision drives the second one, data control, which matters when scraped datasets contain anything you would rather keep on your own infrastructure. Cost model is the third: Make bills per operation, so a crawl that returns thousands of rows is priced differently than on a self-hosted n8n. Both build workflows visually. The catch on this specific node is that Apify is a community node, so a self-hosted n8n is where it installs cleanly.