

Java captcha solver: Bypass reCAPTCHA, Cloudflare, Amazon and More
Use the Java captcha solver to automatically bypass any captcha โ including reCAPTCHA v2, Invisible, v3, Enterprise, Cloudflare Turnstile, GeeTest sliders, Amazon AWS WAF, FunCaptcha, and both image and text-based captchas.
โ
Supported captcha solvers
To get started quickly, check out the captcha solver API documentation.
Helpful links:
๐ ๏ธ Features
- Fast and fully automated captcha solving
- Native support for Java 8+
- Works with HttpURLConnection, Apache HttpClient, OkHttp, or - Spring WebClient
- Easily integrates into Spring Boot, Jakarta EE, or standalone - Java apps
- Async-friendly architecture using Futures, - CompletableFutures, or reactive streams
- Pay only for successful solves
- 99.9% uptime
- 24/7 developer support
๐ฆ Use cases
- Accessibility
- Web scraping behind protected pages
- Automating form submissions in enterprise Java applications
- Background captcha solving in scheduled jobs or microservices
- QA pipelines with captcha bypass
- Security testing and anti-bot evaluation
Need help integrating with your Go project? Open an issue or fork this repo to contribute.
Installation
(Coming soon) solveaptcha-java artifact is available in Maven Central
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.
Configuration
solvecaptcha instance can be created like this:
solvecaptcha solver = new solvecaptcha('YOUR_API_KEY');
Also there are few options that can be configured:
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 module tries to get the answer from res.php API endpoint |
| recaptchaTimeout |
600 |
Polling timeout for ReCaptcha in seconds. Defines how long the module 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, extendedResponse = 1 returns JSON format response |
To get the answer manually use getResult method
[!TIP]
Use the extendedResponse(1) setting to obtain an extended response for the captcha. When using extendedResponse(1), the response will be presented as a JSON string. Utilizing the extended response extendedResponse(1) will be helpful when solving captchas such as ClickCaptcha.
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 lenght |
| 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 |
| lang |
- |
defines the captcha language, see the list of supported languages |
| hintImg |
- |
an image with hint shown to workers with the captcha |
| hintText |
- |
hint or task text shown to workers with the captcha |
Below you can find basic examples for every captcha type. Check out examples directory to find more examples with all available options.
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());
}
Normal Captcha
API method description.
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");
Text Captcha
API method description.
This method can be used to bypass a captcha that requires to answer a question provided in clear text.
Text captcha = new Text();
captcha.setText("If tomorrow is Saturday, what day is today?");
captcha.setLang("en");
ReCaptcha v2
API method description.
Use this method to solve ReCaptcha V2 and obtain a token to bypass the protection.
ReCaptcha captcha = new ReCaptcha();
captcha.setSiteKey("6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-");
captcha.setUrl("https://mysite.com/page/with/recaptcha");
captcha.setInvisible(true);
captcha.setEnterprise(true);
captcha.setAction("verify");
captcha.setProxy("HTTPS", "login:password@IP_address:PORT");
ReCaptcha v3
API method description.
This method provides ReCaptcha V3 solver and returns a token.
ReCaptcha captcha = new ReCaptcha();
captcha.setSiteKey("6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-");
captcha.setUrl("https://mysite.com/page/with/recaptcha");
captcha.setVersion("v3");
captcha.setEnterprise(false);
captcha.setAction("verify");
captcha.setScore(0.3);
captcha.setProxy("HTTPS", "login:password@IP_address:PORT");
FunCaptcha
API method description.
FunCaptcha (Arkoselabs) solving method. Returns a token.
FunCaptcha captcha = new FunCaptcha();
captcha.setSiteKey("69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC");
captcha.setUrl("https://mysite.com/page/with/funcaptcha");
captcha.setSUrl("https://client-api.arkoselabs.com");
captcha.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36");
captcha.setData("anyKey", "anyValue");
captcha.setProxy("HTTPS", "login:password@IP_address:PORT");
GeeTest