Mynacol/decaptcha
1
0
Fork
You've already forked decaptcha
0
A captcha solving service with multiple solution strategies
  • Python 76%
  • Nix 24%
2026年01月09日 17:36:51 +00:00
.forgejo/workflows Switch to self-hosted CI runner 2025年12月27日 17:33:00 +00:00
src feat: Add program to run local solver 2025年11月23日 20:39:00 +00:00
.gitignore chore: gitignore more files 2025年11月23日 20:41:00 +00:00
botright.nix chore: Cleanup unused argument 2025年11月23日 21:02:00 +00:00
flake.lock flake.lock: Update 2026年01月09日 17:36:51 +00:00
flake.nix nix: Update to nixos-unstable 2025年11月23日 20:32:00 +00:00
LICENSE Initial commit 2024年07月27日 15:01:15 +02:00
package.nix Cleanup function arguments 2025年11月20日 09:32:00 +00:00
pyproject.toml feat: Add program to run local solver 2025年11月23日 20:39:00 +00:00
README.md README: Document test commands 2024年09月08日 18:31:21 +02:00
service.nix service.nix: Don't restrict address families 2024年10月08日 23:47:16 +02:00

DeCaptcha captcha solving service

Have you been annoyed by CAPTCHAs in automated tasks? This program supports multiple approaches to solve your captcha, running as a web application, providing an API compatible with anti-captcha.com (to directly support JDownloader).

The service listens by default on localhost:5000. The list of solvers to use can be set as a comma-separated list to the environment variable SOLVERS, for example SOLVERS=Local,AntiCaptcha,Nopecha,Nocaptcha. Some of the solvers may need additional credentials, as outlined in their sections.

Supported Approaches

Local Solving

By using the wonderful Botright project, we can locally solve ReCaptcha V2 challenges with an image classification network and by leveraging the Playwright browser automation software. It theoretically supports solving HCaptcha with hcaptcha_challenger, but that support broke with changes to the challenges. The ReCaptcha V2 solving success rate is at 50 % - 80 %. Multiple tries should eventually lead to success.

The neural networks and local headless browsers require a significant amount of storage and RAM. Calculate with 2-4 GB of RAM and about 2,5 GB of storage.

To easily integrate this library is the reason why this project is in Python.

Captcha Solving as a service

Because some captcha services (HCaptcha) change their challenges quite frequently, it can be hard for public solutions without much manpower to continue supporting them. Paid captcha solving services don't have this problem by being properly funded, providing an always working solution.

Anti-Captcha.com

Anti-Captcha.com is by today's standards an expensive captcha solving service supporting a lot of captcha challenges (ReCaptcha V2+3, HCaptcha, Turnstile and more). It provided the API definition for this project and was therefore easy to integrate into DeCaptcha.

The required API key is received from the client in the clientKey field and forwarded to anti-captcha.com.

If you want to support my work, you can register at Anti-Captcha with my referral link.

NopeCHA

NopeCHA advertises a free plan for hobby projects. However, this is only true for the image recognition API, not the currently implemented token API. Additionally, the free API tokens require starring the GitHub project and expire after some days, causing regular efforts to keep it running. Other than that it supports all the popular captcha challenges (ReCaptcha V2+3, HCaptcha, Turnstile). Pricing is primarily done as subscription, not by usage, and has a reasonable price to performance ratio.

The required API key is entered by setting the environment variable NOPECHA_APIKEY to the path of a file that contains the API key.

noCaptcha Ai

noCaptcha Ai also advertises a free plan that is twofold. Upon registering, you get a one-time balance of 200 credits and each day 200 additional credits. However, while the one-time credits can be spent on any API endpoint, including the token API, the daily credits are apparently only for the image recognition API again. More worrisome, this free offering (currently) requires making advertisement for noCaptcha Ai on at least 3 social media and similar places before you get it. The token API only supports HCaptcha, the recognition API also supports ReCaptcha V2 and some others. Paying can be done either as subscription or by usage. The subscription prices are similar to NopeCHA while offering some more daily solves, the pay per usage are very competitive, only matched by Hard Captcha.

The required API key is entered by setting the environment variable NOCAPTCHA_APIKEY to the path of a file that contains the API key.

If you want to support my work, you can register at noCaptcha Ai with my referral link.

Table overview

This table gives an overview which solving approach supports which captcha type. Cell content describes whether the token or recognition API are supported, in the form Token/Recognition.

ReCaptcha V2 HCaptcha
Local ✔️ 1
Anti-Captcha ✔️/ ✔️/
NopeCHA ✔️/✔️ ✔️/✔️
noCaptcha Ai /2 ✔️/2

1: This worked previously, but is broken due to a change from HCaptcha. 2: This service is offered but not implemented in DeCaptcha.

Test commands

Test decaptcha with curl instead of a client.

ReCaptcha

curl -i -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 -X POST -d '{
 "task" : {
 "websiteURL" : "https://patrickhlauke.github.io/recaptcha/",
 "websiteKey" : "6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5",
 "type" : "RecaptchaV2TaskProxyless"
 },
 "clientKey" : "[AntiCaptcha API Key]",
 "softId" : 0
}' http://localhost:5000/createTask

HCaptcha

curl -i -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 -X POST -d '{
 "task" : {
 "websiteURL" : "https://accounts.hcaptcha.com/demo",
 "websiteKey" : "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2",
 "type" : "HCaptchaTaskProxyless"
 },
 "clientKey" : "[AntiCaptcha API Key]",
 "softId" : 0
}' http://localhost:5000/createTask

Task Result

curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
 "clientKey":"[AntiCaptcha API Key]",
 "taskId":1
}' http://localhost:5000/getTaskResult