A collection of demo projects showing how to use CapSolver API for solving various captchas. These examples help you quickly integrate captcha solving into your automation projects.
Ready-to-use code examples in Python and Node.js for:
- ReCaptcha V2, V3 (including Invisible & Enterprise variants)
- Cloudflare Turnstile & Challenge
- AWS WAF Captcha
- Geetest V3 & V4
- DataDome
- MtCaptcha
- Image Recognition (OCR, Classification, Slider/Rotate)
Sign up at CapSolver Dashboard and grab your API key.
Python:
cd python/recaptchav2
pip install -r requirements.txtNode.js:
cd nodejs/recaptchav2
npm installEdit the .env file in any demo folder:
CAPSOLVER_API_KEY=your_api_key_here
# Python
python main.py
# Node.js
node main.js| Captcha Type | Python | Node.js |
|---|---|---|
| ReCaptcha V2 | main.py | main.js |
| ReCaptcha V2 Invisible | recaptchav2_invisible.py | recaptchav2_invisible.js |
| ReCaptcha V2 Enterprise | recaptchav2_enterprise.py | recaptchav2_enterprise.js |
| ReCaptcha V3 | main.py | main.js |
| ReCaptcha V3 Enterprise | recaptchav3_enterprise.py | recaptchav3_enterprise.js |
| Captcha Type | Python | Node.js | Proxy Required |
|---|---|---|---|
| Geetest V3 | geetest_v3.py | geetest_v3.js | No |
| Geetest V4 | geetest_v4.py | geetest_v4.js | No |
| MtCaptcha | main.py | main.js | No |
| AWS WAF | main.py | main.js | No |
| DataDome | main.py | main.js | Yes |
| Cloudflare Turnstile | main.py | main.js | No |
| Cloudflare Challenge | main.py | main.js | Yes |
| Task Type | Python | Node.js |
|---|---|---|
| ImageToText (OCR) | image_to_text.py | image_to_text.js |
| ReCaptcha Classification | recaptcha_classification.py | recaptcha_classification.js |
| AWS WAF Classification | awswaf_classification.py | awswaf_classification.js |
| Vision Engine (Slider/Rotate) | vision_engine.py | vision_engine.js |
- Proxy required: DataDome and Cloudflare Challenge need your own proxy. Add it to
.env:PROXY=ip:port:user:pass - Image Recognition tasks return results immediately (no polling needed)
- Check the CapSolver Docs for full API reference
Found a bug or want to add a new example? PRs welcome!
MIT