A collection of examples for interacting with the Captcha Solver service using Node.js.
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/js-examples.git
cd js-examples
Install the required dependencies:
npm install
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:
require('dotenv').config();
const apiKey = process.env.CAPTCHA_API_KEY;The repository contains ready-to-run scripts.
examples/
├── recaptcha_v2.js
├── recaptcha_v3.js
├── turnstile.js
└── get_balance.js
Run an example:
node examples/recaptcha_v2.js
Use your API key to access service methods.
Example request structure for solving reCAPTCHA v2:
const axios = require('axios');
const response = await axios.post("https://api.captcha-solver.com/createTask", {
"clientKey": "YOUR_API_KEY",
"task": {
"type": "RecaptchaV2TaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
});
const taskId = response.data.taskId;- Request examples using the Axios library.
- Working with an API key.
- Automation of task status polling using async/await.
- Support for both proxyless and proxy tasks.
- Examples for reCAPTCHA v2, reCAPTCHA v3, and Cloudflare Turnstile.
- Node.js 16+.
- Minimal dependencies.
| CAPTCHA Type | Proxyless | Proxy |
|---|---|---|
| reCAPTCHA v2 | ✅ | ✅ |
| reCAPTCHA v3 | ✅ | ❌ |
| Cloudflare Turnstile | ✅ | ✅ |
- Node.js 16+.
- 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.
