产品集成资源文档定价
立即开始

© 2026 CapSolver. All rights reserved.

联系我们

Slack: lola@capsolver.com

产品

  • reCAPTCHA v2
  • reCAPTCHA v3
  • Cloudflare Turnstile
  • Cloudflare Challenge
  • AWS WAF
  • 浏览器插件
  • 更多验证码类型

集成

  • Selenium
  • Playwright
  • Puppeteer
  • n8n
  • 合作伙伴
  • 查看所有集成

资源

  • 推荐返佣系统
  • 官方文档
  • API 参考
  • 博客
  • 常见问题 (FAQ)
  • 术语表
  • 系统状态

法律声明

  • 服务条款
  • 隐私政策
  • 退款政策
  • 请勿出售我的信息
博客/Web Scraping/如何使用 CapSolver 和 n8n 解决 reCAPTCHA v2/v3
Mar09, 2026

如何使用 CapSolver 和 n8n 解决 reCAPTCHA v2/v3

Ethan Collins

Ethan Collins

Pattern Recognition Specialist

如果你曾尝试自动化网页交互,你几乎肯定遇到过 reCAPTCHA —— 谷歌的挑战系统,用于阻止机器人访问网站。无论你是在构建爬虫、测试网页应用,还是自动化重复任务,reCAPTCHA 都可能让你的整个工作流程停滞不前。

如果你能在 n8n 工作流中自动解决 reCAPTCHA —— 无论是构建可复用的解码 API,爬取受验证码保护的网站,还是自动化登录表单 —— 而且无需编写一行传统代码,该多好?

在本指南中,你将学习如何结合 n8n(一个可视化工作流自动化工具)和 CapSolver(一个 AI 驱动的验证码解决服务)按需解决 reCAPTCHA v2、v2 Invisible 和 v3 挑战 —— 无论是作为独立的 API 端点,还是作为任何自动化工作流中的一步。

你将构建的内容:

解码 API —— 你的其他工具可以调用的可复用端点:

  • 一个 reCAPTCHA 解码 API(支持 v2、v2 Invisible 和 v3 —— 只需更改 CapSolver 节点中的操作)

直接使用的工作流 —— 将 CapSolver 嵌入更大自动化中的一步:

  • 一个价格和产品爬虫,解决 reCAPTCHA,抓取受保护页面,并在价格变动时发出警报
  • 一个账户登录自动化,在提交凭据前解决 reCAPTCHA

什么是 reCAPTCHA?

reCAPTCHA 是谷歌的机器人检测系统,被数百万网站使用。你会遇到三种主要版本:

reCAPTCHA v2 — 复选框(“我不是机器人”)+ 图片挑战
reCAPTCHA v2 Invisible — 无可见复选框,自动在后台触发
reCAPTCHA v3 — 完全隐形,根据行为赋予分数(0.0–1.0)

了解网站使用的是哪个版本至关重要 —— 每种版本在解决时需要略微不同的参数。


前提条件

开始之前,请确保你拥有以下内容:

  1. 一个 n8n 实例 —— 可以是自托管或n8n Cloud
  2. 一个 CapSolver 账户 —— 在这里注册并获取你的 API 密钥
  3. CapSolver n8n 节点 —— 已作为官方节点内置于 n8n(无需安装)
  4. CapSolver 浏览器扩展(可选但推荐)—— 用于识别目标网站上的验证码参数

重要提示: 请确保你的 CapSolver 账户余额充足。reCAPTCHA 解决任务根据验证码类型消耗积分。


在 n8n 中设置 CapSolver

CapSolver 作为 n8n 的官方集成提供 —— 无需安装社区节点。你可以在构建工作流时直接在节点面板中找到它。

由于它是官方集成,你需要在 n8n 中创建凭据,以便 CapSolver 节点能使用你的账户进行认证。

第一步:打开凭据页面

进入你的 n8n 实例,导航至 设置 → 凭据。这里会显示你所有配置的凭据。

n8n credentials page showing CapSolver account

第二步:创建 CapSolver 凭据

  1. 点击右上角的 创建凭据
  2. 搜索 "CapSolver" 并选择 CapSolver API
  3. 输入你的 API 密钥 —— 直接从 CapSolver 控制台复制
  4. 保持 允许的 HTTP 请求域 设置为 All(默认)
  5. 点击 保存

n8n 会自动测试连接。你应该会看到绿色的 “连接测试成功” 横幅,确认你的 API 密钥有效。

CapSolver credential configuration with successful connection test

重要提示: 你工作流中的每个 CapSolver 节点都会引用此凭据。你只需创建一次 —— 所有解码工作流将共享同一凭据。

现在你可以开始构建你的 reCAPTCHA 解码工作流了!


如何识别 reCAPTCHA 参数

在解决 reCAPTCHA 之前,你需要知道它的参数 —— 特别是 websiteURL 和 websiteKey(也称为站点密钥)。最简单的方法是使用 CapSolver 浏览器扩展。

第一步:安装 CapSolver 扩展

从 Chrome 网上应用店 或 Firefox 附加组件 下载并安装 CapSolver 扩展。

第二步:打开验证码检测器

  1. 访问目标网站
  2. 按 F12 打开开发者工具
  3. 找到开发者工具中的 “CapSolver Captcha Detector” 标签页
CapSolver Captcha Detector tab in DevTools

第三步:触发验证码

打开检测器面板后,与你的页面交互以触发 reCAPTCHA。扩展会自动检测并显示所有相关参数:

  • 网站 URL —— 托管验证码的页面 URL
  • 网站密钥(站点密钥) —— 验证码的公钥标识符
  • pageAction —— 被验证的具体动作(v3)
  • isInvisible —— 是否为隐形 reCAPTCHA
  • isEnterprise —— 是否使用 reCAPTCHA Enterprise
  • apiDomain —— 使用的 API 端点(例如 recaptcha.net)
Detected reCAPTCHA parameters in CapSolver extension

提示: 扩展会生成一个 JSON 输出,准确显示如何格式化这些参数用于你的解码请求。这让你无需手动检查页面源码。

有关识别验证码参数的详细指南,请查看 官方 CapSolver 文档。


工作流:reCAPTCHA 解码 API

此工作流创建一个 POST 端点,接受 reCAPTCHA 参数并返回已解决的令牌。相同的 4 节点结构适用于所有 reCAPTCHA 类型 —— 只需更改 CapSolver 节点中的操作。

reCAPTCHA v2 solver workflow in n8n

工作原理

  1. Webhook —— 接收带有验证码参数的 POST 请求
  2. CapSolver —— 使用配置的操作解决挑战
  3. CapSolver 错误? —— IF 节点,根据是否解决失败($json.error 非空)分支
  4. 响应 Webhook —— 成功时返回解决方案,失败时返回 {"error": "..."}

选择你的 reCAPTCHA 类型

类型 选择的操作 额外参数
v2 标准 reCAPTCHA v2 —
v2 Invisible reCAPTCHA v2 在节点中将 Is Invisible 设置为 true
v3 reCAPTCHA v3 添加 pageAction —— 必须与目标站点配置的动作匹配(例如 login、submit)

下面的工作流默认使用 reCAPTCHA v2。打开 CapSolver 节点,切换 操作 下拉菜单即可更换类型。无需其他结构更改。

节点配置

1. Webhook 节点

设置 值
HTTP 方法 POST
路径 solver-recaptcha
响应 Response Node

这会创建一个端点:https://your-n8n-instance.com/webhook/solver-recaptcha

2. CapSolver 节点

参数 值 描述
操作 reCAPTCHA v2 v3 选择 reCAPTCHA v3;v2 Invisible 保持 reCAPTCHA v2 并将 Is Invisible 设为 true
网站 URL ={{ $json.body.websiteURL }} 含验证码的页面 URL
网站密钥 ={{ $json.body.websiteKey }} reCAPTCHA 站点密钥
页面动作 ={{ $json.body.pageAction || '' }} v3 必填 —— 必须匹配站点配置的动作
是否隐形 ={{ $json.body.isInvisible || false }} v2 Invisible 设为 true
API 域名 ={{ $json.body.apiDomain || '' }} 可选 —— 自定义 API 域名(例如 recaptcha.net)
企业负载 ={{ $json.body.enterprisePayload || '' }} 可选 —— reCAPTCHA Enterprise 的额外负载
是否会话 ={{ $json.body.isSession || false }} 可选 —— 启用基于会话的解码
任务类型 ={{ $json.body.taskType || 'ReCaptchaV2TaskProxyLess' }} CapSolver 任务类型 —— 参考下表。默认 ReCaptchaV2TaskProxyLess
代理 ={{ $json.body.proxy || '' }} 仅当所选任务类型需要代理(非 ProxyLess 类型)时使用。ProxyLess 类型留空或省略。格式:ip:port:user:pass

还需在节点中选择你的 CapSolver 凭据。

reCAPTCHA 任务类型参考:

任务类型 是否需要代理 备注
ReCaptchaV2TaskProxyLess 否 v2 默认
ReCaptchaV2Task 是 v2 需要代理
ReCaptchaV2EnterpriseTaskProxyLess 否 企业版 v2,无需代理
ReCaptchaV2EnterpriseTask 是 企业版 v2,需要代理
ReCaptchaV3TaskProxyLess 否 v3 默认
ReCaptchaV3Task 是 v3 需要代理
ReCaptchaV3EnterpriseTaskProxyLess 否 企业版 v3,无需代理
ReCaptchaV3EnterpriseTask 是 企业版 v3,需要代理

代理: 仅适用于非 ProxyLess 任务类型(例如 ReCaptchaV2Task、ReCaptchaV3EnterpriseTask)。使用 ProxyLess 类型时,代理字段会被忽略 —— CapSolver 使用自己的基础设施。使用非 ProxyLess 类型时,必须提供代理。

3. CapSolver 错误?节点(IF)

设置 值
条件 ={{ $json.error }} 非空
真分支 路由到 错误 响应 Webhook 节点
假分支 路由到 成功 响应 Webhook 节点

这使错误路径在画布上显式可见。CapSolver 节点在错误时继续输出(onError: continueRegularOutput),因此失败会以 { "error": "..." } 形式到达这里,而不会导致工作流崩溃。你可以在真分支附加额外节点(日志、警报、重试),而不影响成功路径。

4. 响应 Webhook 节点

成功分支(CapSolver 错误?的假输出):

设置 值
响应类型 JSON
响应体 ={{ JSON.stringify($json.data) }}

测试它

向你的 webhook 端点发送 POST 请求:bash curl -X POST https://your-n8n-instance.com/webhook/solver-recaptcha \ -H "Content-Type: application/json" \ -d '{ "websiteURL": "https://example.com/login", "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "taskType": "ReCaptchaV2TaskProxyLess" }' > 任务类型必须与节点的操作相匹配。 每个已部署的工作流通过 CapSolver 节点中的 Operation 字段配置为特定的 reCAPTCHA 版本(reCAPTCHA v2 或 reCAPTCHA v3)。只有该版本的任务类型才有效——将 v3 任务类型发送到 v2 工作流(或反之)将无法工作。注意:v2 隐形与标准 v2 使用相同的 reCAPTCHA v2 操作——区别在于 isInvisible 参数,而不是操作。

对于 reCAPTCHA v3,还需在请求体中添加 "pageAction": "login"(或网站使用的其他操作),并使用 v3 任务类型(例如,"taskType": "ReCaptchaV3TaskProxyLess")。

预期响应:```json
{
"taskId": "abc123...",
"solution": {
"gRecaptchaResponse": "03AGdBq24PBCb..."
},
"status": "ready"
}

### 导入此工作流 Copy
复制下面的 JSON 并通过 **菜单** → **从 JSON 导入** 将其导入到 n8n 中。然后在 CapSolver 节点中将 **操作** 更改为您目标的 reCAPTCHA 类型。

<details>
<summary>点击展开工作流 JSON(reCAPTCHA v2 — 其他类型请更改操作)</summary>```json
{
  "nodes": [
    {
      "parameters": {
        "content": "## reCAPTCHA Solver API\n\n### How it works\n\n1. A webhook receives the reCAPTCHA solver request.\n2. The request is passed to the solver node to resolve the reCAPTCHA.\n3. The system checks if the solver encountered an error.\n4. If an error occurred, a response is sent indicating the failure.\n5. If successful, a response is sent with the result.\n\n### Setup steps\n\n- [ ] Configure webhook endpoint to receive solver requests.\n- [ ] Set up CapSolver credentials if necessary.\n\n### Customization\n\nAdjust the solver node settings depending on reCAPTCHA type or difficulty.",
        "width": 480,
        "height": 592
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        -240
      ],
      "id": "497d295f-4668-48ff-8eaa-97773cfd1c89",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Receive request and solve\n\nHandles incoming requests and solves reCAPTCHA.",
        "width": 496,
        "height": 272,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -240,
        -112
      ],
      "id": "cb4b7a54-ae67-458e-bbef-18e3f6d242bb",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Evaluate and respond\n\nChecks for errors and sends appropriate webhook responses.",
        "width": 560,
        "height": 432,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        464,
        -240
      ],
      "id": "fc9430f0-b899-45ce-b5cf-de9a1b10fbe2",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "solver-recaptcha",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "rc-api-001",
      "name": "Receive Solver Request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -192,
        0
      ],
      "webhookId": "solver-recaptcha"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.body.websiteURL }}",
        "websiteKey": "={{ $json.body.websiteKey }}",
        "optional": {}
      },
      "id": "rc-api-002",
      "name": "Solve reCAPTCHA",
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        112,
        0
      ],
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      },
      "continueOnFail": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "version": 2,
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1",
              "operator": {
                "type": "string",
                "operation": "isNotEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.error }}",
              "rightValue": ""
            }
          ]
        },
        "options": {}
      },
      "id": "rc-api-003",
      "name": "CapSolver Error?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        512,
        -32
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ error: $json.error }) }}",
        "options": {}
      },
      "id": "rc-api-004",
      "name": "Respond to Webhook (Error)",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        880,
        -128
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json.data) }}",
        "options": {}
      },
      "id": "rc-api-005",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        880,
        32
      ]
    }
  ],
  "connections": {
    "Receive Solver Request": {
      "main": [
        [
          {
            "node": "Solve reCAPTCHA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solve reCAPTCHA": {
      "main": [
        [
          {
            "node": "CapSolver Error?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CapSolver Error?": {
      "main": [
        [
          {
            "node": "Respond to Webhook (Error)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "962ff0267b713be0344b866fa54daae28de8ed2144e2e6867da355dae193ea1f"
  }
}
```</details>
---

## 工作流程:向网站提交令牌

到目前为止,上述 API 工作流程展示了如何**获取**已解决的验证码令牌。但你实际上**做什么**呢?

在现实的自动化中,解决验证码只是工作的一半。你需要像浏览器一样**提交令牌**到目标网站,以解锁验证码背后的数据或操作。

一般模式如下:

1. **解决验证码** → 从 CapSolver 获取 `gRecaptchaResponse` 令牌
2. **提交令牌** → 通过 HTTP 请求将其发送到目标网站(通常作为 `g-recaptcha-response` 表单字段或 URL 参数)
3. **验证响应** → 检查网站是否接受了令牌并返回了预期数据
4. **处理结果** → 提取你需要的数据

### 示例:解决并提交 reCAPTCHA v2

**示例:** [example.com](https://example.com)

![n8n 中的 reCAPTCHA v2 抓取工作流程](https://assets.capsolver.com/prod/posts/how-to-solve-recaptcha-n8n/d5PwlG9NjvBb-d2b5ca33bd970f64a6301fa75ae2eb22.png)

#### 工作流程流程```
Manual Trigger → CapSolver reCAPTCHA v2 → HTTP POST Request → IF (check success) → Valid / Invalid
```#### 工作原理

1. **手动触发** — 手动启动工作流(点击“执行工作流”)。你可以用任何触发器替换它——Webhook、定时任务、应用事件等。
2. **CapSolver reCAPTCHA v2** — 为演示页面解决验证码:
   - 网站 URL:`https://example.com`
   - 网站密钥:`YOUR_SITE_KEY`
3. **HTTP POST 请求** — 将解决后的令牌作为表单 POST 提交到相同的 URL:
   - 令牌通过 `g-recaptcha-response` 表单字段发送
   - 这正是浏览器在你点击“提交”后解决验证码时所做的操作
4. **IF 节点** — 检查响应的 HTML 是否包含 `"recaptcha-success"`,表示验证码被接受
5. **有效 / 无效** — IF 节点在成功时路由到 **有效** 分支(在这里你可以提取所需数据,例如使用 **HTML 节点** 获取产品列表、表单结果等),失败时路由到 **无效** 分支(在这里处理错误)

> **关键概念:** 每个网站处理令牌提交的方式不同。在此演示中,令牌通过 POST 以 `g-recaptcha-response` 表单字段发送——但其他网站可能期望它作为 URL 参数、JSON 请求体,或通过完全不同的端点发送。务必使用开发者工具的网络标签检查网站的实际表单提交,准确了解令牌需要如何发送。

<details>
<summary>点击展开工作流 JSON</summary>```json
{
  "nodes": [
    {
      "parameters": {
        "content": "## reCAPTCHA v2 \u2014 All Triggers\n\n### How it works\n\n1. Receives solver requests through a webhook.\n2. Processes these requests using CapSolver and returns the results.\n3. Regularly triggers checks every hour using a schedule.\n4. Executes the scheduled process and checks the status of tasks.\n5. Allows manual testing of CapSolver through a manual trigger.\n\n### Setup steps\n\n- [ ] Set up webhook credentials for 'Receive Solver Request'.\n- [ ] Configure CapSolver with necessary keys for all CapSolver nodes.\n- [ ] Assign necessary permissions for HTTP request to reCAPTCHA endpoint.\n- [ ] Review and adjust the schedule in 'Schedule Trigger'.\n- [ ] Test manual execution with 'Manual Trigger'.\n",
        "width": 480,
        "height": 896
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -816,
        -128
      ],
      "id": "68e8c344-ce45-4e9f-859b-ca005db7c73e",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Receive and handle requests\n\nStarts with receiving a solver request via webhook, processes it, and returns the solver result.",
        "width": 800,
        "height": 304,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -256,
        -128
      ],
      "id": "c26741c7-e0e6-4a4e-9fbf-2a623df014c8",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Scheduled recurrent process\n\nInitiates the process on an hourly schedule, sets target parameters, and sends them to CapSolver.",
        "width": 800,
        "height": 304,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -256,
        224
      ],
      "id": "4b879cbf-e269-4260-9596-740b95df628a",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Process and validate token\n\nPosts to the reCAPTCHA validation endpoint and checks results, branching into pass or fail paths.",
        "width": 736,
        "height": 464,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        656,
        96
      ],
      "id": "7c860b53-f4a7-4d0b-8537-5253eec5a043",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Manual testing process\n\nAllows manual trigger testing with CapSolver and formats the result for review.",
        "width": 800,
        "height": 272,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -256,
        576
      ],
      "id": "8936a2df-c5b5-4c63-a0d5-afd190553a57",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "solve-recaptcha-v2",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -208,
        0
      ],
      "id": "11111111-1111-1111-1111-111111111101",
      "name": "Receive Solver Request",
      "webhookId": "a1b2c3d4-e5f6-7890-abcd-ef1234567801",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "type": "={{ $json.body.taskType || 'ReCaptchaV2TaskProxyLess' }}",
        "proxy": "={{ $json.body.proxy || '' }}",
        "websiteURL": "={{ $json.body.websiteURL }}",
        "websiteKey": "={{ $json.body.websiteKey }}",
        "optional": {
          "pageAction": "={{ $json.body.pageAction || '' }}",
          "isInvisible": "={{ $json.body.isInvisible || false }}",
          "apiDomain": "={{ $json.body.apiDomain || '' }}",
          "enterprisePayload": "={{ $json.body.enterprisePayload || '' }}",
          "isSession": "={{ $json.body.isSession || false }}"
        }
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        112,
        0
      ],
      "id": "11111111-1111-1111-1111-111111111102",
      "name": "CapSolver [Webhook]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json.data) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        400,
        0
      ],
      "id": "11111111-1111-1111-1111-111111111103",
      "name": "Return Solver Result"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -208,
        352
      ],
      "id": "11111111-1111-1111-1111-111111111104",
      "name": "Schedule Trigger (Every 1h)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "sa-001",
              "name": "websiteURL",
              "value": "https://www.google.com/recaptcha/api2/demo",
              "type": "string"
            },
            {
              "id": "sa-002",
              "name": "websiteKey",
              "value": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        112,
        352
      ],
      "id": "11111111-1111-1111-1111-111111111105",
      "name": "Set Target Params"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.websiteURL }}",
        "websiteKey": "={{ $json.websiteKey }}",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        400,
        352
      ],
      "id": "11111111-1111-1111-1111-111111111106",
      "name": "CapSolver [Schedule]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.google.com/recaptcha/api2/demo",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "content-type",
              "value": "application/x-www-form-urlencoded"
            },
            {
              "name": "user-agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "g-recaptcha-response",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        704,
        352
      ],
      "id": "11111111-1111-1111-1111-111111111107",
      "name": "Submit Token"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "if-001",
              "leftValue": "={{ $json.data }}",
              "rightValue": "recaptcha-success",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        1008,
        352
      ],
      "id": "11111111-1111-1111-1111-111111111108",
      "name": "Check Result"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "sp-001",
              "name": "status",
              "value": "passed",
              "type": "string"
            },
            {
              "id": "sp-002",
              "name": "message",
              "value": "reCAPTCHA v2 monitor passed successfully",
              "type": "string"
            },
            {
              "id": "sp-003",
              "name": "timestamp",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1248,
        224
      ],
      "id": "11111111-1111-1111-1111-111111111109",
      "name": "Monitor Passed"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "sf-001",
              "name": "status",
              "value": "failed",
              "type": "string"
            },
            {
              "id": "sf-002",
              "name": "message",
              "value": "reCAPTCHA v2 monitor FAILED \u2014 token rejected",
              "type": "string"
            },
            {
              "id": "sf-003",
              "name": "timestamp",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1248,
        384
      ],
      "id": "11111111-1111-1111-1111-111111111110",
      "name": "Monitor Failed"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -208,
        688
      ],
      "id": "11111111-1111-1111-1111-111111111111",
      "name": "Manual Trigger (Test)"
    },
    {
      "parameters": {
        "websiteURL": "https://www.google.com/recaptcha/api2/demo",
        "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        112,
        688
      ],
      "id": "11111111-1111-1111-1111-111111111112",
      "name": "CapSolver [Manual]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "mr-001",
              "name": "token",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}",
              "type": "string"
            },
            {
              "id": "mr-002",
              "name": "taskId",
              "value": "={{ $json.data.taskId }}",
              "type": "string"
            },
            {
              "id": "mr-003",
              "name": "status",
              "value": "solved",
              "type": "string"
            },
            {
              "id": "mr-004",
              "name": "solvedAt",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        400,
        688
      ],
      "id": "11111111-1111-1111-1111-111111111113",
      "name": "Format Result"
    }
  ],
  "connections": {
    "Receive Solver Request": {
      "main": [
        [
          {
            "node": "CapSolver [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CapSolver [Webhook]": {
      "main": [
        [
          {
            "node": "Return Solver Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger (Every 1h)": {
      "main": [
        [
          {
            "node": "Set Target Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Target Params": {
      "main": [
        [
          {
            "node": "CapSolver [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CapSolver [Schedule]": {
      "main": [
        [
          {
            "node": "Submit Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Token": {
      "main": [
        [
          {
            "node": "Check Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Result": {
      "main": [
        [
          {
            "node": "Monitor Passed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Monitor Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger (Test)": {
      "main": [
        [
          {
            "node": "CapSolver [Manual]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CapSolver [Manual]": {
      "main": [
        [
          {
            "node": "Format Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "962ff0267b713be0344b866fa54daae28de8ed2144e2e6867da355dae193ea1f"
  }
}
```</details>

> **适配其他 reCAPTCHA 类型:** 同样的模式适用于 **v2 Invisible** 和 **v3**。对于 v2 Invisible,在 CapSolver 节点中设置 `isInvisible: true`。对于 v3,将操作更改为 `reCAPTCHA v3` 并添加 `pageAction` 参数。HTTP 请求提交步骤因网站而异——始终在开发者工具中检查实际的表单提交。

---

## 工作流程:用例示例

上述求解器 API 和爬取示例展示了核心模式:解决验证码、提交令牌、处理结果。以下工作流程将此模式扩展到 **生产就绪的用例**——每个都具有双重触发器(定时 + webhook)、持久状态跟踪和结构化输出。

| 工作流程 | 目的 |
|---|---|
| `reCAPTCHA Scraping — Price & Product Details — CapSolver + Schedule + Webhook` | 每 6 小时抓取价格和产品名称,与存储在 `staticData` 中的先前值比较,发生变化时发出警报 |
| `reCAPTCHA Account Login — CapSolver + Schedule + Webhook` | 通过先解决验证码,再使用令牌 POST 凭据,登录您自己在验证码保护网站上的账户 |

### 示例 1:爬取 — 价格和产品详情

此工作流程每 6 小时(定时)或按需(webhook)抓取产品页面,使用 HTML 节点提取价格,并与之前存储的值进行比较。

**定时路径:**```
Every 6 Hours → Solve reCAPTCHA v3 → Fetch Product Page → Extract Data
  → Compare Data → Data Changed? → Build Alert / No Change
```> **错误处理:** 如果 CapSolver 失败,执行将停止并在 n8n 中标记为失败。请检查 **Executions** 查看错误,或配置 n8n 的 [错误工作流](https://docs.n8n.io/flow-logic/error-handling/) 以自动接收通知。

关键行为:
- 使用带有 `pageAction` 参数(可配置)的 **reCAPTCHA v3**
- 令牌作为 `x-recaptcha-token` 头发送(根据您的网站预期格式调整)
- **HTML 节点** 通过 CSS 选择器(`.product-price`,`h1`)提取价格和产品名称
- `$workflow.staticData.lastPrice` 跨执行持久保存上一次价格
- 价格比较检测 **下降**(严重性:`deal`)和 **上涨**(严重性:`info`)
- 任务类型为 `ReCaptchaV3TaskProxyLess`(硬编码)— 直接编辑 Solve reCAPTCHA v3 节点以更改任务类型或代理

<details>
<summary>点击展开完整工作流 JSON(17 个节点)</summary>```json
{
  "nodes": [
    {
      "parameters": {
        "content": "## reCAPTCHA Scraping \u2014 Price & Product Monitor\n\n### How it works\n\n1. Triggers the workflow every 6 hours or via webhook.\n2. Configures target website URL and key for scraping.\n3. Solves reCAPTCHA to access the webpage.\n4. Fetches and extracts product data from the webpage.\n5. Compares current data with previous data to check for changes.\n6. Builds alert or updates status based on data changes.\n\n### Setup steps\n\n- [ ] Configure the 'Every 6 Hours' trigger to set the appropriate time schedule.\n- [ ] Set up the target website URL and key parameters in the 'Set Target Config [Schedule]' node.\n- [ ] Ensure the 'Solve reCAPTCHA' and 'Solve reCAPTCHA [Webhook]' nodes are configured with the correct CAPTCHA services.\n- [ ] Set up webhook endpoint in the 'Webhook Trigger' node.\n- [ ] Configure the 'Respond to Webhook' node for handling webhook responses.\n\n### Customization\n\nAdjust the 'Compare Data' and 'Compare Data [Webhook]' code to fit specific data comparison logic or data formats.",
        "height": 896,
        "width": 480
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1312,
        -352
      ],
      "id": "871c5a60-20b4-4cc0-a357-d5cecb8a322a",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Scheduled trigger setup\n\nTriggers every 6 hours and sets the target config for scraping.",
        "height": 304,
        "width": 496,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -752,
        -128
      ],
      "id": "43acb039-cfcd-47c3-892e-e13da011b721",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Scheduled CAPTCHA solving and page fetch\n\nSolves the CAPTCHA and fetches the product page based on schedule.",
        "height": 304,
        "width": 496,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -144,
        -128
      ],
      "id": "68fc53a6-181e-4ca8-bf7d-f3f8e9b12f9d",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Scheduled data extraction and comparison\n\nExtracts and compares data from the fetched page.",
        "height": 272,
        "width": 784,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        464,
        -112
      ],
      "id": "155fc92b-721a-40bf-80e6-6dd2082b126a",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Scheduled alert or status update\n\nHandles response based on data comparison for scheduled runs.",
        "height": 560,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1296,
        -352
      ],
      "id": "ee2c8c8e-d21d-42aa-b261-49a6fffb3d11",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Webhook trigger setup\n\nInitiates the workflow via a webhook request.",
        "height": 368,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -752,
        304
      ],
      "id": "6957473e-81a0-4afd-a0ea-e6f61c3be715",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "## Webhook CAPTCHA solving and page fetch\n\nSolves the CAPTCHA and fetches the product page via webhook.",
        "height": 304,
        "width": 496,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -144,
        304
      ],
      "id": "48990176-a5b5-48db-ac09-bcc207318f0a",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "## Webhook data extraction and comparison\n\nProcesses data fetched from the page and checks for changes via webhook.",
        "height": 272,
        "width": 784,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        464,
        320
      ],
      "id": "844166d1-75f7-4192-8bfb-3a1381fb6235",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "content": "## Webhook alert or status update\n\nResponds to webhook trigger with alert or status update.",
        "height": 544,
        "width": 384,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1328,
        240
      ],
      "id": "c1926a60-dfb3-4520-a530-82aa40c6341c",
      "name": "Sticky Note8"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -704,
        0
      ],
      "id": "rc-s-901",
      "name": "Every 6 Hours"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cfg-001",
              "name": "websiteURL",
              "value": "https://YOUR-TARGET-SITE.com/product-page",
              "type": "string"
            },
            {
              "id": "cfg-002",
              "name": "websiteKey",
              "value": "YOUR_SITE_KEY_HERE",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -400,
        0
      ],
      "id": "rc-s-900",
      "name": "Set Target Config [Schedule]"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.websiteURL }}",
        "websiteKey": "={{ $json.websiteKey }}",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        -96,
        0
      ],
      "id": "rc-s-902",
      "name": "Solve reCAPTCHA",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Set Target Config [Schedule]').first().json.websiteURL }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "user-agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "g-recaptcha-response",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        208,
        0
      ],
      "id": "rc-s-903",
      "name": "Fetch Product Page"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "price",
              "cssSelector": ".product-price, [data-price], .price"
            },
            {
              "key": "productName",
              "cssSelector": "h1, .product-title"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.html",
      "typeVersion": 1.2,
      "position": [
        512,
        0
      ],
      "id": "rc-s-904",
      "name": "Extract Data"
    },
    {
      "parameters": {
        "jsCode": "const staticData = $workflow.staticData;\nconst currentPrice = $input.first().json.price;\nconst previousPrice = staticData.lastPrice;\nconst productName = $input.first().json.productName || 'Product';\nconst parsePrice = (str) => { if (!str) return null; const match = str.match(/[\\d]+\\.?\\d*/); return match ? parseFloat(match[0].replace(',', '')) : null; };\nconst currentNum = parsePrice(currentPrice);\nconst previousNum = parsePrice(previousPrice);\nstaticData.lastPrice = currentPrice;\nstaticData.lastChecked = new Date().toISOString();\nconst changed = previousNum !== null && currentNum !== null && currentNum !== previousNum;\nconst direction = changed ? (currentNum < previousNum ? 'dropped' : 'increased') : 'unchanged';\nconst diff = changed ? Math.abs(currentNum - previousNum).toFixed(2) : '0';\nreturn [{ json: { productName, currentPrice, previousPrice: previousPrice || 'first check', changed, direction, diff: changed ? `$${diff}` : null, checkedAt: new Date().toISOString() } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        800,
        0
      ],
      "id": "rc-s-905",
      "name": "Compare Data"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "if-1",
              "leftValue": "={{ $json.changed }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1104,
        0
      ],
      "id": "rc-s-906",
      "name": "Data Changed?"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "alert",
              "value": "=Price {{ $json.direction }} for {{ $json.productName }}: {{ $json.previousPrice }} \u2192 {{ $json.currentPrice }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "severity",
              "value": "={{ $json.direction === 'dropped' ? 'deal' : 'info' }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "checkedAt",
              "value": "={{ $json.checkedAt }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1344,
        -160
      ],
      "id": "rc-s-907",
      "name": "Build Alert"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "n1",
              "name": "status",
              "value": "no_change",
              "type": "string"
            },
            {
              "id": "n2",
              "name": "currentPrice",
              "value": "={{ $json.currentPrice }}",
              "type": "string"
            },
            {
              "id": "n3",
              "name": "checkedAt",
              "value": "={{ $json.checkedAt }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1344,
        48
      ],
      "id": "rc-s-908",
      "name": "No Change"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "price-monitor-recaptcha",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -704,
        480
      ],
      "id": "rc-s-909",
      "name": "Webhook Trigger",
      "webhookId": "rc-s-909-webhook",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.body.websiteURL }}",
        "websiteKey": "={{ $json.body.websiteKey }}",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        -96,
        432
      ],
      "id": "rc-s-910",
      "name": "Solve reCAPTCHA [Webhook]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Webhook Trigger').item.json.body.websiteURL }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "user-agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "g-recaptcha-response",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        208,
        432
      ],
      "id": "rc-s-911",
      "name": "Fetch Product Page [Webhook]"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "price",
              "cssSelector": ".product-price, [data-price], .price"
            },
            {
              "key": "productName",
              "cssSelector": "h1, .product-title"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.html",
      "typeVersion": 1.2,
      "position": [
        512,
        432
      ],
      "id": "rc-s-912",
      "name": "Extract Data [Webhook]"
    },
    {
      "parameters": {
        "jsCode": "const staticData = $workflow.staticData;\nconst currentPrice = $input.first().json.price;\nconst previousPrice = staticData.lastPrice;\nconst productName = $input.first().json.productName || 'Product';\nconst parsePrice = (str) => { if (!str) return null; const match = str.match(/[\\d]+\\.?\\d*/); return match ? parseFloat(match[0].replace(',', '')) : null; };\nconst currentNum = parsePrice(currentPrice);\nconst previousNum = parsePrice(previousPrice);\nstaticData.lastPrice = currentPrice;\nstaticData.lastChecked = new Date().toISOString();\nconst changed = previousNum !== null && currentNum !== null && currentNum !== previousNum;\nconst direction = changed ? (currentNum < previousNum ? 'dropped' : 'increased') : 'unchanged';\nconst diff = changed ? Math.abs(currentNum - previousNum).toFixed(2) : '0';\nreturn [{ json: { productName, currentPrice, previousPrice: previousPrice || 'first check', changed, direction, diff: changed ? `$${diff}` : null, checkedAt: new Date().toISOString() } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        800,
        432
      ],
      "id": "rc-s-913",
      "name": "Compare Data [Webhook]"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "if-2",
              "leftValue": "={{ $json.changed }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1104,
        432
      ],
      "id": "rc-s-914",
      "name": "Data Changed? [Webhook]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a4",
              "name": "alert",
              "value": "=Price {{ $json.direction }} for {{ $json.productName }}: {{ $json.previousPrice }} \u2192 {{ $json.currentPrice }}",
              "type": "string"
            },
            {
              "id": "a5",
              "name": "severity",
              "value": "={{ $json.direction === 'dropped' ? 'deal' : 'info' }}",
              "type": "string"
            },
            {
              "id": "a6",
              "name": "checkedAt",
              "value": "={{ $json.checkedAt }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1376,
        368
      ],
      "id": "rc-s-915",
      "name": "Build Alert [Webhook]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "n4",
              "name": "status",
              "value": "no_change",
              "type": "string"
            },
            {
              "id": "n5",
              "name": "currentPrice",
              "value": "={{ $json.currentPrice }}",
              "type": "string"
            },
            {
              "id": "n6",
              "name": "checkedAt",
              "value": "={{ $json.checkedAt }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1392,
        608
      ],
      "id": "rc-s-916",
      "name": "No Change [Webhook]"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1568,
        512
      ],
      "id": "rc-s-917",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Every 6 Hours": {
      "main": [
        [
          {
            "node": "Set Target Config [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Target Config [Schedule]": {
      "main": [
        [
          {
            "node": "Solve reCAPTCHA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solve reCAPTCHA": {
      "main": [
        [
          {
            "node": "Fetch Product Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Page": {
      "main": [
        [
          {
            "node": "Extract Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data": {
      "main": [
        [
          {
            "node": "Compare Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Data": {
      "main": [
        [
          {
            "node": "Data Changed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Changed?": {
      "main": [
        [
          {
            "node": "Build Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Change",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Solve reCAPTCHA [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solve reCAPTCHA [Webhook]": {
      "main": [
        [
          {
            "node": "Fetch Product Page [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Page [Webhook]": {
      "main": [
        [
          {
            "node": "Extract Data [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data [Webhook]": {
      "main": [
        [
          {
            "node": "Compare Data [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Data [Webhook]": {
      "main": [
        [
          {
            "node": "Data Changed? [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Changed? [Webhook]": {
      "main": [
        [
          {
            "node": "Build Alert [Webhook]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Change [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Alert [Webhook]": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Change [Webhook]": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "962ff0267b713be0344b866fa54daae28de8ed2144e2e6867da355dae193ea1f"
  }
}
```</details>

### 示例 2:账户登录

此工作流自动登录到受验证码保护的网站。一个 **Set Login Config** 节点集中管理所有参数 — **[Schedule]** 用于定时路径,**[Webhook]** 用于按需 webhook 路径。编辑相应的配置节点以配置每个路径。

**定时路径:**```
Every 24 Hours → Set Login Config → Solve Captcha → Submit Login
  → Login Successful? → Mark Login Success / Mark Login Failed
```> **错误处理:** 如果 CapSolver 失败,执行将停止并在 n8n 中标记为失败。请检查 **Executions** 查看错误,或配置 n8n 的 [错误工作流](https://docs.n8n.io/flow-logic/error-handling/) 以自动接收通知。

关键行为:
- 默认使用 **reCAPTCHA v2** (`ReCaptchaV2TaskProxyLess`) — 在 **Set Login Config [Schedule]** 或 **Set Login Config [Webhook]** 中更改 `taskType` 以适应相应路径;如果在 v2 和 v3 之间切换,请更改 Solve Captcha 节点中的 `Operation`
- 表单字段硬编码为 `email`、`password` 和 `g-recaptcha-response` — 直接编辑 **Submit Login** 节点以匹配目标网站的字段名称
- **Login Successful?** 检查同时评估 `statusCode < 400` 和响应正文中可配置的 `successMarker` 的存在
- **Webhook 路径** 使用 **Set Login Config [Webhook]**,同样带有硬编码的占位符值 — 编辑该节点以配置按需的 webhook 路径
- Webhook 路径通过 **Respond to Webhook** 返回 JSON 格式的结果

<details>
<summary>点击展开完整工作流 JSON(15 个节点)</summary>```json
{
  "nodes": [
    {
      "parameters": {
        "content": "## reCAPTCHA Account Login\n\n### How it works\n\n1. The workflow triggers every 24 hours to initiate a login process.\n2. It solves reCAPTCHA challenges for login attempts.\n3. Submits login credentials via HTTP requests.\n4. Checks if login is successful and records the outcome.\n5. A webhook can trigger the login process manually.\n6. Responds to webhook calls with login status.\n\n### Setup steps\n\n- [ ] Configure the schedule trigger for desired intervals.\n- [ ] Set up the webhook URL for manual login attempts.\n- [ ] Ensure that credentials for solving reCAPTCHA are valid.\n- [ ] Configure the HTTP request nodes with the correct login endpoint.\n- [ ] Confirm that response nodes are set with the correct output format.\n\n### Customization\n\nCustomizable time intervals for automated login attempts and custom webhook endpoints can be configured.",
        "width": 480,
        "height": 896
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1248,
        -352
      ],
      "id": "b76c0299-05e6-4d65-ba90-63a8148242af",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Scheduled login initialization\n\nTriggers login attempts every 24 hours and configures necessary parameters.",
        "width": 1408,
        "height": 272,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -688,
        -112
      ],
      "id": "0610b8c8-fce5-4efd-b3d2-1eeeb6eba648",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Scheduled login results\n\nDetermines and marks the results of scheduled login attempts.",
        "width": 240,
        "height": 528,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        816,
        -352
      ],
      "id": "73eec9f0-dbe8-43a5-bff7-2308b4cac998",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Webhook login initialization\n\nManual login attempts triggered by webhook, solving reCAPTCHA.",
        "width": 1408,
        "height": 272,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -688,
        320
      ],
      "id": "0680f603-0a47-429f-81cb-69ff7741a9bd",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Webhook login results and response\n\nRecords results of webhook login attempts and sends response.",
        "width": 512,
        "height": 496,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        816,
        208
      ],
      "id": "4f244d27-03e3-4670-8e6f-67ed6264ac8d",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -640,
        0
      ],
      "id": "rc-l-921",
      "name": "Every 24 Hours"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "l1",
              "name": "websiteURL",
              "value": "https://YOUR-LOGIN-PAGE.com",
              "type": "string"
            },
            {
              "id": "l2",
              "name": "websiteKey",
              "value": "YOUR_SITE_KEY_HERE",
              "type": "string"
            },
            {
              "id": "l3",
              "name": "successMarker",
              "value": "account-dashboard",
              "type": "string"
            },
            {
              "id": "l4",
              "name": "userAgent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -336,
        0
      ],
      "id": "rc-l-922",
      "name": "Set Login Config [Schedule]"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.websiteURL }}",
        "websiteKey": "={{ $json.websiteKey }}",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        -32,
        0
      ],
      "id": "rc-l-923",
      "name": "Solve Captcha [Schedule]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Set Login Config [Schedule]').item.json.websiteURL }}/login",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "content-type",
              "value": "application/x-www-form-urlencoded"
            },
            {
              "name": "user-agent",
              "value": "={{ $('Set Login Config [Schedule]').item.json.userAgent }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "your-email@example.com"
            },
            {
              "name": "password",
              "value": "YOUR_ACCOUNT_PASSWORD"
            },
            {
              "name": "g-recaptcha-response",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        272,
        0
      ],
      "id": "rc-l-924",
      "name": "Submit Login [Schedule]"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "lif1",
              "leftValue": "={{ $json.statusCode < 400 && String($json.body || $json.data || '').includes($('Set Login Config [Schedule]').item.json.successMarker) }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        576,
        0
      ],
      "id": "rc-l-925",
      "name": "Login Successful? [Schedule]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "action",
              "value": "account_login",
              "type": "string"
            },
            {
              "id": "s2",
              "name": "status",
              "value": "success",
              "type": "string"
            },
            {
              "id": "s3",
              "name": "message",
              "value": "Configured account login flow succeeded",
              "type": "string"
            },
            {
              "id": "s4",
              "name": "checkedAt",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        864,
        -192
      ],
      "id": "rc-l-926",
      "name": "Mark Login Success [Schedule]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f1",
              "name": "action",
              "value": "account_login",
              "type": "string"
            },
            {
              "id": "f2",
              "name": "status",
              "value": "failed",
              "type": "string"
            },
            {
              "id": "f3",
              "name": "statusCode",
              "value": "={{ $json.statusCode }}",
              "type": "number"
            },
            {
              "id": "f4",
              "name": "message",
              "value": "Login response did not match the configured success marker",
              "type": "string"
            },
            {
              "id": "f5",
              "name": "checkedAt",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        864,
        16
      ],
      "id": "rc-l-927",
      "name": "Mark Login Failed [Schedule]"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "account-login-recaptcha",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -640,
        432
      ],
      "id": "rc-l-928",
      "name": "Webhook Trigger",
      "webhookId": "rc-l-928-webhook",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "websiteURL": "={{ $json.body.websiteURL }}",
        "websiteKey": "={{ $json.body.websiteKey }}",
        "optional": {}
      },
      "type": "n8n-nodes-capsolver.capSolver",
      "typeVersion": 1,
      "position": [
        -32,
        432
      ],
      "id": "rc-l-929",
      "name": "Solve Captcha [Webhook]",
      "credentials": {
        "capSolverApi": {
          "id": "BeBFMAsySMsMGeE9",
          "name": "CapSolver account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Webhook Trigger').item.json.body.loginActionURL }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "content-type",
              "value": "application/x-www-form-urlencoded"
            },
            {
              "name": "user-agent",
              "value": "={{ $('Webhook Trigger').item.json.body.userAgent || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "={{ $('Webhook Trigger').item.json.body.usernameField || 'email' }}",
              "value": "={{ $('Webhook Trigger').item.json.body.usernameValue }}"
            },
            {
              "name": "={{ $('Webhook Trigger').item.json.body.passwordField || 'password' }}",
              "value": "={{ $('Webhook Trigger').item.json.body.passwordValue }}"
            },
            {
              "name": "g-recaptcha-response",
              "value": "={{ $json.data.solution.gRecaptchaResponse }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        272,
        432
      ],
      "id": "rc-l-930",
      "name": "Submit Login [Webhook]"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "lif2",
              "leftValue": "={{ $json.statusCode < 400 && String($json.body || $json.data || '').includes($('Webhook Trigger').item.json.body.successMarker) }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        576,
        432
      ],
      "id": "rc-l-931",
      "name": "Login Successful? [Webhook]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "ws1",
              "name": "action",
              "value": "account_login",
              "type": "string"
            },
            {
              "id": "ws2",
              "name": "status",
              "value": "success",
              "type": "string"
            },
            {
              "id": "ws3",
              "name": "message",
              "value": "Configured account login flow succeeded",
              "type": "string"
            },
            {
              "id": "ws4",
              "name": "checkedAt",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        864,
        336
      ],
      "id": "rc-l-932",
      "name": "Mark Login Success [Webhook]"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "wf1",
              "name": "action",
              "value": "account_login",
              "type": "string"
            },
            {
              "id": "wf2",
              "name": "status",
              "value": "failed",
              "type": "string"
            },
            {
              "id": "wf3",
              "name": "statusCode",
              "value": "={{ $json.statusCode }}",
              "type": "number"
            },
            {
              "id": "wf4",
              "name": "message",
              "value": "Login response did not match the configured success marker",
              "type": "string"
            },
            {
              "id": "wf5",
              "name": "checkedAt",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        880,
        528
      ],
      "id": "rc-l-933",
      "name": "Mark Login Failed [Webhook]"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1184,
        496
      ],
      "id": "rc-l-934",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Every 24 Hours": {
      "main": [
        [
          {
            "node": "Set Login Config [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Login Config [Schedule]": {
      "main": [
        [
          {
            "node": "Solve Captcha [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solve Captcha [Schedule]": {
      "main": [
        [
          {
            "node": "Submit Login [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Login [Schedule]": {
      "main": [
        [
          {
            "node": "Login Successful? [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Login Successful? [Schedule]": {
      "main": [
        [
          {
            "node": "Mark Login Success [Schedule]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark Login Failed [Schedule]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Solve Captcha [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Solve Captcha [Webhook]": {
      "main": [
        [
          {
            "node": "Submit Login [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Login [Webhook]": {
      "main": [
        [
          {
            "node": "Login Successful? [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Login Successful? [Webhook]": {
      "main": [
        [
          {
            "node": "Mark Login Success [Webhook]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark Login Failed [Webhook]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Login Success [Webhook]": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Login Failed [Webhook]": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "962ff0267b713be0344b866fa54daae28de8ed2144e2e6867da355dae193ea1f"
  }
}
```</details>

结论

你已经学会了如何使用 n8n 和 CapSolver 构建reCAPTCHA 解决 API和生产级爬取工作流——无需传统编码。

本指南涵盖了:

  • 基于 webhook 工作流的 reCAPTCHA v2、v2 隐形和 v3 的API 解决端点
  • 使用案例示例——爬取和账户登录——展示如何提交已解决的令牌并处理受保护的数据
  • 如何使用 CapSolver 浏览器扩展识别验证码参数
  • 令牌处理、错误管理和生产使用的最佳实践

关键要点:解决验证码只是完成任务的一半——你还需要将令牌提交给目标网站以解锁受保护的数据。

提示: 这些工作流使用了 Schedule + Webhook 触发器,但你可以将触发节点替换为任何 n8n 触发器——手动、应用事件、表单提交等。获取数据后,使用 n8n 内置节点将结果保存到 Google Sheets、数据库、云存储,或通过 Telegram/Slack/Email 发送提醒。


准备好开始了吗? 注册 CapSolver,并使用优惠码 n8n,首次充值可额外获得 8% 奖励!

CapSolver bonus code banner

常见问题解答

解决一个 reCAPTCHA 需要多少钱?

价格因验证码类型而异。reCAPTCHA v2 通常约为每 1000 次解决 1-3 美元。请查看 CapSolver 价格页面 获取最新价格。

解决一个 reCAPTCHA 需要多长时间?

大多数 reCAPTCHA v2 挑战在5-20 秒内解决。reCAPTCHA v3 通常更快,因为没有图像挑战。

我可以在 n8n Cloud 上使用这些工作流吗?

可以!这些工作流适用于自托管的 n8n 和 n8n Cloud。CapSolver 节点已作为官方集成提供——只需添加你的 API 凭证即可。

如何找到网站的 reCAPTCHA 网站密钥?

最简单的方法是使用CapSolver 浏览器扩展——打开开发者工具,切换到“CapSolver Captcha Detector”标签页,然后触发验证码。扩展会自动显示所有参数。或者,你也可以在页面源码中搜索 data-sitekey 或 reCAPTCHA 脚本 URL 中的 render=。

reCAPTCHA v2 和 v2 隐形有什么区别?

两者使用相同的底层技术,但v2 显示一个可见的复选框(“我不是机器人”),而v2 隐形在后台运行,没有任何可见控件。解决时唯一的区别是设置 isInvisible: true。

CapSolver 返回了令牌,但网站仍然拒绝——为什么?

可能有几个原因。首先,令牌有效期很短——确保你立即提交令牌。其次,确认你将令牌发送到了正确的位置:检查浏览器提交表单时的实际网络请求(开发者工具 → 网络标签),确认字段名、请求方法和端点与你在 n8n 中配置的完全匹配。第三,一些网站需要额外参数,如 enterprisePayload 或特定的 Cookie 和请求头——使用 CapSolver 扩展检查是否适用。如果令牌仍被拒绝,联系 CapSolver 支持 获取针对具体网站的帮助。

查看更多

Web ScrapingApr 22, 2026

Rust网络爬虫架构:可扩展的数据提取

学习可扩展的Rust网络爬虫架构,包括reqwest、scraper、异步爬取、无头浏览器爬取、代理轮换以及符合规范的验证码处理。

Ethan Collins
Ethan Collins
Web ScrapingMar 02, 2026

面向开发者的浏览器自动化:2026年掌握Selenium与验证码

通过这份2026年指南,掌握浏览器自动化开发。学习Selenium WebDriver Java、Actions接口以及如何使用CapSolver解决验证码。

Sora Fujimoto

目录

Sora Fujimoto
Web ScrapingFeb 17, 2026

如何在Nanobot中使用CapSolver解决验证码

使用 Nanobot 和 CapSolver 自动化验证码解决。使用 Playwright 自主解决 reCAPTCHA 和 Cloudflare。

Anh Tuan
Anh Tuan
Web ScrapingFeb 10, 2026

数据即服务(DaaS):它是什么以及为何在2026年重要

了解2026年的数据即服务(DaaS)。探索其优势、应用场景以及如何通过实时洞察和可扩展性改变企业。

Rajinder Singh
Rajinder Singh