@apify/n8n-nodes-apify

中文文档
0.9.0发布于 2026/10/22MITCommonJS零依赖构建来源已验证近 30 天下载 16.6万

n8n nodes for Apify

原始使用文档
文档目录29 节
  1. Table of contents
  2. Installation (self-hosted)
  3. Installation (n8n Cloud)
  4. Installation (development and contributing)
  5. ⚙️ Prerequisites
  6. 1. Clone and Install Dependencies
  7. 2. Build the Node Package
  8. 3. Start Development Server
  9. 🔁 Making changes
  10. Self-hosted n8n: Public webhook URL for triggers
  11. Operations
  12. Actors
  13. Actor tasks
  14. Actor runs
  15. Datasets
  16. Key-Value Stores
  17. Triggers
  18. AI Tools
  19. Credentials
  20. Compatibility
  21. Usage
  22. Resources
  23. Method 1: Using the GitHub Web UI (Recommended for ease of …
  24. Method 2: Fully CLI-Driven Release
  25. Post-Release: Automated Workflow & Verification (Common to …
  26. Version history
  27. Troubleshooting
  28. Common issues
  29. Getting help

n8n Nodes - Apify integration

This is an n8n community node that integrates Apify with your n8n workflows, so you can run Apify Actors, extract structured data from websites, and automate complex web scraping tasks.

Apify is a platform for developers to build, deploy, and publish web automation tools, while n8n is a fair-code licensed tool for AI workflow automation that allows you to connect various services.

Table of contents

Installation (self-hosted)

To install the Apify community node directly from the n8n Editor UI:

  1. Open your n8n instance.
  2. Go to Settings > Community Nodes
  3. Select Install.
  4. Enter the npm package name: @apify/n8n-nodes-apify to install the latest version. To install a specific version (e.g 0.6.4) enter @apify/[email protected]. All versions are available here
  5. Agree to the risks of using community nodes and select Install
  6. The node is now available to use in your workflows.

Installation (n8n Cloud)

If you're using n8n Cloud, installing community nodes is even simpler:

  1. Go to the Canvas and open the nodes panel.
  2. Search for Apify in the community node registry.
  3. Click Install node to add the Apify node to your instance.

On n8n cloud users can choose not to show verified community nodes. Instance owners can toggle this in the Cloud Admin Panel. To install the Apify node, make sure the installation of verified community nodes is enabled.

Installation (development and contributing)

⚙️ Prerequisites

  • Node.js: 22.x or higher (required)
  • npm: 10.8.2 or higher (required)

Verify your versions:

node --version  # Should be v22.x.x or higher
npm --version   # Should be 10.8.2 or higher

If you use nvm, the project includes a .nvmrc file. Simply run:

nvm use

1. Clone and Install Dependencies

Clone the repository and install dependencies:

git clone https://github.com/apify/n8n-nodes-apify.git
cd n8n-nodes-apify
npm install

2. Build the Node Package

npm run build

3. Start Development Server

Start the n8n development server with your node linked:

npm run dev

🔁 Making changes

If you make any changes to your custom node locally, remember to rebuild and restart:

npm run build

Self-hosted n8n: Public webhook URL for triggers

This configuration is required for our service's trigger functionality to work correctly.

By default, when running locally n8n generates webhook URLs using localhost, which external services cannot reach. To fix this:

  1. Set your webhook URL
    In the same shell or Docker environment where n8n runs, export the WEBHOOK_URL to a publicly-accessible address. For example:
export WEBHOOK_URL="https://your-tunnel.local"
  1. Restart n8n
npm run dev

Operations

This node supports a wide range of Apify operations, organized by resource type:

Actors

  • Run Actor: Execute an Actor with optional input parameters
    • Default behavior: Uses predefined input values
    • Custom input: Provide JSON object to override any or all default parameters
    • Configurable timeout and memory limits
    • Build version selection
  • Run Actor and get dataset items: Execute an Actor, wait for it to finish, and return the dataset items
  • Web Fetch: Fetch a single URL and get its content in exactly the requested formats (markdown, text, HTML, links, or raw), with optional custom headers
  • Scrape Single URL (deprecated): Quick scraping of a single URL - use Web Fetch instead
  • Get Last Run: Retrieve information about the most recent Actor run

Actor tasks

  • Run Task: Execute a predefined Actor task
    • Supports custom input JSON
    • Configurable timeout
    • Task-specific settings
  • Run task and get dataset items: Execute a task, wait for it to finish, and return the dataset items

Actor runs

  • Get User Runs List: List all runs for a user
    • Pagination support
    • Sorting options
    • Status filtering
  • Get run: Retrieve detailed information about a specific run

Datasets

  • Get Items: Fetch items from a dataset

Key-Value Stores

  • Get Key-Value Store Record: Retrieve a specific record by key

Triggers

Automatically start an n8n workflow whenever an Actor or task finishes execution

  • Can be configured to trigger on success, failure, abort, timeout or any combination of these states
  • Includes run metadata in the output
  • Available triggers:
    • Actor Run Finished: Start a workflow when an Actor run completes
    • Task Run Finished: Start a workflow when a task run completes

AI Tools

All Apify node operations can be combined with n8n's AI tools to create powerful workflows. For example, you can scrape data from a website using an Actor and then use an AI model to analyze or summarize the extracted information.

Credentials

The node supports two authentication methods:

  1. API key authentication

    • Configure your Apify API key in the n8n credentials section under apifyApi
  2. OAuth2 authentication (available only in n8n cloud)

    • Configure OAuth2 credentials in the n8n credentials section under apifyOAuth2Api

auth

Compatibility

  • n8n: Version 1.57.0 and higher
  • Node.js: 22.x or higher
  • npm: 10.8.2 or higher

Usage

  1. Create an Actor: Set up a new Actor on Apify.
  2. Set up a workflow: Create a new workflow in n8n.
  3. Add the Apify node: Insert the Apify node into your workflow.
  4. Configure credentials: Enter your Apify API key and Actor ID.
  5. Select an operation: Choose the desired operation for the node.
  6. Execute the workflow: Run the workflow to execute the Apify operation.

workflow

Resources

Releasing a New Version

This project uses a GitHub Actions workflow to automate the release process, including publishing to npm. Here's how to trigger a new release.

Prerequisites (for all methods):

  • Ensure your target branch on GitHub is up-to-date with all changes you want to include in the release.
  • Decide on the new version number, following semantic versioning (e.g., vX.Y.Z).
  • Prepare your release notes detailing the changes.
  • If you're using CLI to release, make sure you have the GitHub CLI (gh) installed and authenticated (gh auth login).

  1. Navigate to GitHub Releases:

    • Go to your repository's "Releases" tab
  2. Draft a New Release:

    • Click the "Draft a new release" button.
  3. Create or Choose a Tag:

    • In the "Choose a tag" dropdown:
      • Type your new tag name (e.g., v1.2.3).
      • If the tag doesn't exist, GitHub will prompt you with an option like "Create new tag: v1.2.3 on publish." Click this.
      • Ensure the target branch selected for creating the new tag is correct. This tag will point to the latest commit on this target branch.
  4. Set Release Title and Notes:

    • Set the "Release title" (e.g., vX.Y.Z or a more descriptive title).
    • For the release notes in the description field, you have a few options:
      • Write your prepared release notes.
      • Click the "Generate release notes" button: GitHub will attempt to automatically create release notes based on merged pull requests since the last release. You can then review and edit these auto-generated notes.
  5. Publish the Release:

    • Click the "Publish release" button.

      Upon publishing, GitHub creates the tag from your specified branch and then creates the release. This "published" release event triggers the automated workflow.


Method 2: Fully CLI-Driven Release

This method uses the GitHub CLI (gh) for all steps, including tag creation.

  1. Ensure your local target branch is synced and changes are pushed: bash git checkout master git pull origin master

  2. Create the Release (which also creates and pushes the tag): Replace vX.Y.Z with your desired tag/version. The command will create this tag from the latest commit of your specified --target branch (defaults to repository's default branch, if --target is omitted and the branch is up to date).

    gh release create vX.Y.Z \
        --target master \
        --title "vX.Y.Z" \
        --notes "Your detailed release notes here.
        - Feature X
        - Bugfix Y"
    
    # Or, to use notes from a file:
    gh release create vX.Y.Z \
        --target master \
        --title "vX.Y.Z" \
        --notes-file ./RELEASE_NOTES.md
    
    # Or, to generate notes from pull requests (commits must follow conventional commit format for best results):
    gh release create vX.Y.Z \
        --target master \
        --title "vX.Y.Z"
        --generate-notes
    
- `vX.Y.Z`: The tag and release name.
- `--target <branch>`: Specifies which branch the tag should be created from (e.g., `master`). If the tag `vX.Y.Z` doesn't exist, `gh` will create it based on the HEAD of this target branch and push it.
- `--title "<title>"`: The title for your release.
- `--notes "<notes>"` or `--notes-file <filepath>` or `--generate-notes`: Your release notes.

  _This command will create the tag, push it to GitHub, and then publish the release. This "published" release event triggers the automated workflow._

Post-Release: Automated Workflow & Verification (Common to all methods)

Regardless of how you create and publish the GitHub Release:

  1. Automated Workflow Execution:

    • The "Release & Publish" GitHub Actions workflow will automatically trigger.
    • It will perform:
      1. Code checkout.
      2. Version extraction (X.Y.Z) from the release tag.
      3. Build and test processes.
      4. Update package.json and package-lock.json to version X.Y.Z.
      5. Commit these version changes back to the branch the release was targeted from with a message like chore(release): set version to X.Y.Z [skip ci].
      6. Publish the package @apify/[email protected] to npm.
  2. Verify the Package on npm: After the workflow successfully completes (check the "Actions" tab in your GitHub repository): - Verify the new version on npm: bash npm view @apify/n8n-nodes-apify version This should print X.Y.Z.

Version history

Track changes and updates to the node here.

Troubleshooting

Common issues

  1. Authentication errors

    • Verify your API key is correct
  2. Resource Not Found

    • Verify the resource ID format
    • Check if the resource exists in your Apify account
    • Ensure you have access to the resource
  3. Operation failures

    • Check the input parameters
    • Verify resource limits (memory, timeout)
    • Review Apify Console for detailed error messages

Getting help

If you encounter issues:

  1. Check the Apify API documentation
  2. Review the n8n Community Nodes documentation
  3. Open an issue in the GitHub repository

版本与发布记录

@apify/n8n-nodes-apify 共发布 29 个版本,首次发布于 2025/05/26;过去 12 个月发布了 8 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.9.0latest2026/10/2215 天前
0.8.12026/10/1224 天前
0.8.02026/09/221 个月前
0.7.02026/08/112 个月前
0.6.102026/06/164 个月前
0.6.92026/05/115 个月前

关于 @apify/n8n-nodes-apify 的常见问题

@apify/n8n-nodes-apify 是什么?

n8n nodes for Apify

如何安装 @apify/n8n-nodes-apify?

在项目目录运行 npm install @apify/n8n-nodes-apify,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:n8n-workflow(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@apify/n8n-nodes-apify 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/apify__n8n-nodes-apify 是否存在。

@apify/n8n-nodes-apify 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@apify/n8n-nodes-apify 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@apify/n8n-nodes-apify 可以商用吗?

@apify/n8n-nodes-apify 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@apify/n8n-nodes-apify 的下载量有多少?

根据 npm 官方下载统计,@apify/n8n-nodes-apify 在 2026/10/06 – 2026/11/04 这 30 天内被下载 166,469 次,日均约 5,549 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apify/n8n-nodes-apify 还在维护吗?

最新版本 0.9.0 发布于 2026/10/22(15 天前);至今共发布 29 个版本,其中过去 12 个月发布了 8 个;首次发布于 2025/05/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。