Java captcha solver on «SolveCaptcha»

Java captcha solver

Solve and bypass Google reCAPTCHA, Image CAPTCHA, Arkose FunCaptcha, Cloudflare Turnstile, Cloudflare Challenge and any captcha with Java captcha solver.

  • No risk. Pay only for solved captchas
  • Fastest human-based Java captcha solving service
Start solve

How to automate solve and bypass any captcha with Java

  • Customer uploading a captcha to a service You send a captcha to the Java captcha solver.
  • Service generating and returning a captcha ID The server stores your captcha and returns the ID of your request.
  • Worker solving the captcha task The service completes the captcha solution and sends the answer back to the server.
  • Customer requesting the captcha solution using the ID You send a request to the server using the ID to retrieve the answer.
GitHub logo

Get started fast with open-source repository — available in Java for integration.

Java captcha solver
Java captcha solver on GitHub

Installation

You can install the library directly from GitHub using JitPack:

Step 1: Add the JitPack repository to your build.gradle:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

Step 2: Add the dependency:

dependencies {
    implementation 'com.github.solvercaptcha:solvecaptcha-java:1.0.0'
}

Replace 1.0.0 with the latest version tag from the releases.

We invite you to explore our GitHub repository where you can find libraries and SDK for easy integration with our API.

Configuration

Description of all the necessary parameters to configure the installed package

An instance of the SolveCaptcha  class can be created like this:

solvecaptcha solver = new solvecaptcha('YOUR_API_KEY');

You also have the ability to customize some of the options for the created instance:

solver.setHost("solvecaptcha.com");
solver.setDefaultTimeout(120);
solver.setRecaptchaTimeout(600);
solver.setPollingInterval(10);
solver.setExtendedResponse(1);
SolveCaptcha instance options
Option Default value Description
host solvecaptcha.com API server. You can set it to solvecaptcha.com if your account is registered there
defaultTimeout 120 Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the SDK tries to get the answer from res.php API endpoint
recaptchaTimeout 600 Polling timeout for reCAPTCHA in seconds. Defines how long the SDK tries to get the answer from res.php API endpoint
pollingInterval 10 Interval in seconds between requests to res.php API endpoint, setting values less than 5 seconds is not recommended
extendedResponse 0 Json or String format response from res.php API endpoint, json = 1 returns JSON format response

Solve captcha

When you submit any image-based captcha use can provide additional options to help solvecaptcha workers to solve it properly

Captcha options
Option Default value Description
numeric 0 Defines if captcha contains numeric or other symbols. See more info in the API docs
minLength 0 minimal answer length
maxLength 0 maximum answer length
phrase 0 defines if the answer contains multiple words or not
caseSensitive 0 defines if the answer is case sensitive
calc 0 defines captcha requires calculation
hintImg - an image with hint shown to workers with the captcha
hintText - hint or task text shown to workers with the captcha

Basic example

Example below shows a basic solver call example with error handling.

Normal captcha = new Normal();
captcha.setFile("path/to/captcha.jpg");
captcha.setMinLen(4);
captcha.setMaxLen(20);
captcha.setCaseSensitive(true);
captcha.setLang("en");
try {
    solver.solve(captcha);
    System.out.println("Captcha solved: " + captcha.getCode());
} catch (Exception e) {
    System.out.println("Error occurred: " + e.getMessage());
}

To bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.

Normal captcha = new Normal();
captcha.setFile("path/to/captcha.jpg");
captcha.setNumeric(4);
captcha.setMinLen(4);
captcha.setMaxLen(20);
captcha.setPhrase(true);
captcha.setCaseSensitive(true);
captcha.setCalc(false);
captcha.setLang("en");
captcha.setHintImg(new File("path/to/hint.jpg"));
captcha.setHintText("Type red symbols only");
  • «SolveCaptcha» has a good rating Best captcha solving service

    Service is ranked among the best captcha solving service, according to independent analytics by CaptchaTheCat website.

  • «SolveCaptcha» is a fast service Fast captcha solver

    Service is incredibly fast captcha solver, thanks to its integration of machine learning (ML) technology.

  • «SolveCaptcha» is a cheapest service Cheapest captcha solver

    Service is cheapest due to the use of machine learning (ML) technology, which automates CAPTCHA solving at scale, reducing the need for manual labor and allowing us to offer lower prices without sacrificing quality.

Use cases

Bypassing captcha enables to automate captcha solving interactions and is used to optimize tasks such as automated testing, web scraping, accessibility, and improving security.

  • Accesability with «SolveCaptcha» Accesability
  • Cybersecurity with «SolveCaptcha» Cybersecurity
  • Automated testing with «SolveCaptcha» Automated testing
  • Scarping with «SolveCaptcha» Scarping
API Code examples on «SolveCaptcha»

Captcha solver API

The API documentation contains examples of requests and responses. For the convenience of using the service, we have published libraries on GitHub for programming languages: Python, Java, C#, C++, Javascript, Ruby, PHP, and Go. We have also developed code examples for automatically solving reCAPTCHAs using tools like Selenium and Puppeteer.

Captcha solver API