Solving Captchas

How to solve captchas with Airtop

Overview

From time to time, you may encounter captchas during web automation, but Airtop has you covered. Airtop can solve Captchas in 2 ways:

  1. Using a built-in Captcha solver
    • Very simple to use, but less flexible
  2. Using a Chrome extension
    • Provides a lot more flexibility, but requires a bit more setup

Built-in Captcha Solver

The built-in Captcha solver is simple to use. When you create a new session, simply pass the solveCaptcha flag in the session configuration.

1const session = await client.sessions.create({
2 configuration: {
3 solveCaptcha: true,
4 }
5});

You can also experiment with the captcha solver in the studio by enabling the option in the session configuration.

Captcha Solver Option

With this option enabled, every time a Captcha is detected, Airtop will automatically solve it using the built-in solver.

Captcha Events

You can subscribe to the onCaptchaEvent event to get notified when a Captcha is detected and solved.

1const unsubscribe = await client.sessions.onCaptchaEvent(sessionId, (event) => {
2 console.log(`captcha event: ${JSON.stringify(event)}`);
3});

Each event contains the following information:

  • duration: Time taken to solve the Captcha (in milliseconds).
  • eventTime: Date and Time of the event
  • id: Captcha job ID
  • retryCount: Retry count
  • status: Captcha solving status (processing, completed, failed)
  • type: Captcha type (recaptcha, hcaptcha, etc.)
  • url: URL of the page containing the captcha challenge.
  • windowId: Window ID

You can also unsubscribe from the event by calling the unsubscribe function.

1unsubscribe();

Chrome Extension

If you want more flexibility, instead of using the built-in Captcha solver, you can use a Chrome extension to solve Captchas. There are several commercial Captcha solving extensions available. We recommend using the following:

All these products offer a Chrome extension that can be used to solve Captchas and can be configured to be used with Airtop’s Chrome extension integration.

NopeCHA Demo

We built a demo of using NopeCHA to solve a Captcha, which can be found here. To use it, follow these steps:

  1. Clone the repository
  2. Create an account on NopeCHA and get an API key
  3. Install the dependencies
    $npm install
  4. Create a .env file and add your Airtop API key
  5. Run the demo
    $npm run dev
  6. Select the option to configure the Chrome extension
  7. Open the Live View and open the extension menu to configure the NopeCHA extension with the API key
  8. Finish the Chrome extension setup in the command line
  9. Select the option to Solve the Captcha
  10. Click on the Live View URL to see the Captcha being solved and the form submitted.