Proxies
Some captchas are tied to the IP address that loads them. For those types you can (or, for some, must) give the proxy the solver should use. Each task type page says whether a proxy is optional, required or not used.
Native API (v1)
Section titled “Native API (v1)”Add proxy to params:
| Field | |
|---|---|
type |
http, https, socks4 or socks5 |
host |
IP address or host name; private and loopback addresses are rejected |
port |
1–65535 |
login, password |
optional |
export NOPTCHA_KEY=nop_test_... # your test or live keycurl -s -X POST "https://api.noptcha.com/v1/tasks" \ -H "Authorization: Bearer $NOPTCHA_KEY" \ -H 'Content-Type: application/json' \ -d @- <<EOF{ "type": "recaptcha.v2", "params": { "website_url": "https://example.com/login", "website_key": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "proxy": { "type": "http", "host": "203.0.113.7", "port": 8080, "login": "proxyuser", "password": "proxypass" } }}EOFimport os
import requests
API = "https://api.noptcha.com"KEY = os.environ["NOPTCHA_KEY"]
r = requests.post( f"{API}/v1/tasks", headers={ "Authorization": f"Bearer {KEY}", }, json={ "type": "recaptcha.v2", "params": { "website_url": "https://example.com/login", "website_key": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "proxy": { "type": "http", "host": "203.0.113.7", "port": 8080, "login": "proxyuser", "password": "proxypass", }, }, }, timeout=30,)print(r.status_code, r.json())const API = 'https://api.noptcha.com';const KEY = process.env.NOPTCHA_KEY;
const res = await fetch(`${API}/v1/tasks`, { method: 'POST', headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ type: "recaptcha.v2", params: { website_url: "https://example.com/login", website_key: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", proxy: { type: "http", host: "203.0.113.7", port: 8080, login: "proxyuser", password: "proxypass", }, }, }),});console.log(res.status, await res.json());A task with proxy uses the type’s proxy variant, which can have a different price (GET /v1/types lists the price
of each variant).
Compatibility API
Section titled “Compatibility API”Use the name without Proxyless (for example RecaptchaV2Task instead of RecaptchaV2TaskProxyless) and add
proxyType, proxyAddress, proxyPort and optionally proxyLogin and proxyPassword. proxyPort may be a
number or a string. Names ending in Proxyless ignore proxy fields.
export NOPTCHA_KEY=nop_test_... # your test or live keycurl -s -X POST "https://api.noptcha.com/createTask" \ -H 'Content-Type: application/json' \ -d @- <<EOF{ "clientKey": "$NOPTCHA_KEY", "task": { "type": "RecaptchaV2Task", "websiteURL": "https://example.com/login", "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "proxyType": "http", "proxyAddress": "203.0.113.7", "proxyPort": 8080, "proxyLogin": "proxyuser", "proxyPassword": "proxypass" }}EOFimport os
import requests
API = "https://api.noptcha.com"KEY = os.environ["NOPTCHA_KEY"]
r = requests.post( f"{API}/createTask", json={ "clientKey": KEY, "task": { "type": "RecaptchaV2Task", "websiteURL": "https://example.com/login", "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "proxyType": "http", "proxyAddress": "203.0.113.7", "proxyPort": 8080, "proxyLogin": "proxyuser", "proxyPassword": "proxypass", }, }, timeout=30,)print(r.status_code, r.json())const API = 'https://api.noptcha.com';const KEY = process.env.NOPTCHA_KEY;
const res = await fetch(`${API}/createTask`, { method: 'POST', headers: { "Content-Type": "application/json", }, body: JSON.stringify({ clientKey: KEY, task: { type: "RecaptchaV2Task", websiteURL: "https://example.com/login", websiteKey: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", proxyType: "http", proxyAddress: "203.0.113.7", proxyPort: 8080, proxyLogin: "proxyuser", proxyPassword: "proxypass", }, }),});console.log(res.status, await res.json());2captcha legacy API
Section titled “2captcha legacy API”proxy=login:password@host:port (or host:port) and proxytype=HTTP|HTTPS|SOCKS4|SOCKS5.
Credentials
Section titled “Credentials”Proxy logins and passwords are used in memory only: they are never stored, logged or returned. Task responses show
params without them.
Proxy errors
Section titled “Proxy errors”If the solver cannot use the proxy, the task fails with proxy_error (v1), ERROR_PROXY_CONNECT_REFUSED or another
ERROR_PROXY_… code (compatibility API), or ERROR_PROXY_CONNECTION_FAILED (2captcha legacy API). Failed tasks are not
charged. Check that the proxy is reachable from the internet and accepts the credentials.