A collection of examples for interacting with the Captcha Solver service.
This project demonstrates how to send HTTP requests to the API for solving CAPTCHA challenges. You will find examples for reCAPTCHA v2, reCAPTCHA v3, and Cloudflare Turnstile. The code helps automate task creation, status polling, and result retrieval.
Clone the repository:
git clone https://github.com/captcha-solver-api/python-examples.git
cd your-repo-name
Install the required dependencies:
pip install -r requirements.txt
Use environment variables to store keys. Create a .env file in the root directory:
CAPTCHA_API_KEY=your_api_key
Then load it in your code:
import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv("CAPTCHA_API_KEY")The repository contains ready-to-run scripts.
examples/
├── recaptcha_v2.py
├── recaptcha_v2_proxy.py
├── recaptcha_v3.py
├── turnstile.py
└── get_balance.py
Run an example:
python examples/recaptcha_v2.py
Use your API key to access service methods.
Example request structure for solving reCAPTCHA v2:
import requests
response = requests.post("https://api.captcha-solver.com/createTask", json={
"clientKey": "YOUR_API_KEY",
"task": {
"type": "RecaptchaV2TaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
})
task_id = response.json().get("taskId")- Request examples using the requests library.
- Working with an API key.
- Automation of task status polling.
- Support for both proxyless and proxy tasks.
- Examples for reCAPTCHA v2, reCAPTCHA v3, and Cloudflare Turnstile.
- Python 3.8+.
- Minimal dependencies.
| CAPTCHA Type | Proxyless | Proxy |
|---|---|---|
| reCAPTCHA v2 | ✅ | ✅ |
| reCAPTCHA v3 | ✅ | ❌ |
| Cloudflare Turnstile | ✅ | ✅ |
- Python 3.8+.
- Captcha Solver account.
- Valid API key.
- Internet connection.
See the official service documentation for full descriptions of task parameters and endpoints.
Submit a Pull Request with improvements or open an Issue if you find errors.
This project is licensed under the MIT License.
