See llms.txt for all machine-readable content.

Back to Templates

Get reCAPTCHA and Turnstile tokens with Cap.Guru

Quick overview

This workflow generates reCAPTCHA v2/v3 or Cloudflare Turnstile solution tokens by creating a task in Cap.Guru via its API, polling for completion, and returning the solved token for use in protected form submissions.

How it works

  1. Runs manually with preset test inputs or is triggered by another workflow with type, sitekey, pageurl, and optional action.
  2. Validates the inputs and builds the correct Cap.Guru API payload for reCAPTCHA v2, reCAPTCHA v3, or Cloudflare Turnstile.
  3. Sends the task to the Cap.Guru in.php endpoint and extracts the returned task ID.
  4. Waits 10 seconds and then polls the Cap.Guru res.php endpoint for the solution status.
  5. Repeats the poll every 10 seconds until a token is ready or a 3-minute timeout/error occurs.
  6. Returns the solved token (and the task ID) to the calling workflow or the manual test run.

Setup

  1. Create a Cap.Guru account, add funds if needed, and obtain an API key.
  2. In n8n, create an HTTP Query Auth credential that sends your API key as a query parameter (name key, value your Cap.Guru API key).
  3. Select this HTTP Query Auth credential in both Cap.Guru HTTP requests (in.php and res.php).
  4. When calling this workflow from another workflow, pass type (recaptcha_v2, recaptcha_v3, or turnstile), sitekey, pageurl, and for v3 also set action.
  5. If you are in Russia, update the API base URL to use https://api.cap.guru instead of https://api2.cap.guru.

Requirements

  • A Cap.Guru account with an API key and a positive balance (get one at cap.guru)

Customization

  • Change the Wait interval or the 3-minute limit, or call this workflow from your own workflows with Execute Workflow

Additional info

Tokens expire quickly (about 2 minutes for reCAPTCHA, 5 minutes for Turnstile), so use them right away. From Russia, use https://api.cap.guru. Docs: https://docs.cap.guru/en/