See llms.txt for all machine-readable content.

Back to Templates

Recognize text captchas from images with Cap.Guru

Quick overview

This workflow takes a captcha image URL or Base64 payload, submits it to the Cap.Guru API for text recognition, polls for the result, and returns the solved text (optionally evaluating arithmetic captchas).

How it works

  1. Starts manually or is called from another workflow with imageUrl or imageBase64 (and optional vernet).
  2. Validates inputs and, if only a URL is provided, downloads the image and converts it to a Base64 string.
  3. Sends the Base64 image to Cap.Guru (in.php) to create a recognition task.
  4. Waits 5 seconds and polls Cap.Guru (res.php) repeatedly until a result is ready or a 2-minute timeout is reached.
  5. If the recognized text is an arithmetic expression, calculates the numeric answer.
  6. Outputs the solved text (plus expression when applicable) along with the Cap.Guru taskId.

Setup

  1. Create a Cap.Guru account and API key.
  2. In n8n, create an HTTP Query Auth credential that sends your API key as a query parameter named key, and select it in both Cap.Guru HTTP Request steps.
  3. Provide an imageUrl or imageBase64 when running the workflow (optionally set vernet, such as 22 for arithmetic captchas).

Requirements

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

Customization

  • Pass vernet for a specific captcha kind (22 for arithmetic), or change the API address to https://api.cap.guru from Russia

Additional info

Use the answer right away: many sites show a new captcha on every page load. Case usually does not matter, so k7m4p and K7M4P are both correct. Docs: https://docs.cap.guru/en/apiclick/text.html