Bright Data (formerly Luminati) provides the largest proxy network — 72M+ residential IPs across 195 countries. Combined with CaptchaAI, you get clean IPs for browsing plus automated CAPTCHA solving when challenges appear.
Architecture
Your Script ──▶ Bright Data Proxy ──▶ Target Site
│
CAPTCHA appears
│
CaptchaAI API ──▶ Solved token
│
Inject token ◀─┘
CaptchaAI doesn't route through your proxy — it solves server-side using its own infrastructure. Your proxy handles the browsing; CaptchaAI handles the CAPTCHAs.
Bright Data Proxy Types
| Type | IPs | Speed | Cost | CAPTCHA Rate |
|---|---|---|---|---|
| Datacenter | 770K+ | Fast | Low | Higher |
| Residential | 72M+ | Medium | Medium | Lower |
| ISP | 700K+ | Fast | High | Lowest |
| Mobile | 7M+ | Slow | High | Very low |
Python Integration
Requests + Bright Data + CaptchaAI
import requests
import time
CAPTCHAAI_KEY = "YOUR_API_KEY"
CAPTCHAAI_URL = "https://ocr.captchaai.com"
# Bright Data proxy credentials
BRIGHT_DATA_PROXY = {
"http": "http://brd-customer-CUSTOMER_ID-zone-ZONE:PASSWORD@brd.superproxy.io:22225",
"https": "http://brd-customer-CUSTOMER_ID-zone-ZONE:PASSWORD@brd.superproxy.io:22225",
}
def fetch_with_proxy(url):
"""Fetch a page through Bright Data proxy."""
resp = requests.get(
url,
proxies=BRIGHT_DATA_PROXY,
headers={
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/126.0.0.0 Safari/537.36"
},
timeout=30,
)
return resp
def solve_recaptcha(site_url, sitekey):
"""Solve reCAPTCHA v2 via CaptchaAI."""
resp = requests.post(f"{CAPTCHAAI_URL}/in.php", data={
"key": CAPTCHAAI_KEY,
"method": "userrecaptcha",
"googlekey": sitekey,
"pageurl": site_url,
"json": 1,
})
data = resp.json()
if data["status"] != 1:
raise Exception(f"Submit: {data['request']}")
task_id = data["request"]
for _ in range(60):
time.sleep(5)
resp = requests.get(f"{CAPTCHAAI_URL}/res.php", params={
"key": CAPTCHAAI_KEY,
"action": "get",
"id": task_id,
"json": 1,
})
data = resp.json()
if data["request"] == "CAPCHA_NOT_READY":
continue
if data["status"] == 1:
return data["request"]
raise Exception(f"Solve: {data['request']}")
raise TimeoutError("Solve timeout")
def solve_turnstile(site_url, sitekey):
"""Solve Cloudflare Turnstile via CaptchaAI."""
resp = requests.post(f"{CAPTCHAAI_URL}/in.php", data={
"key": CAPTCHAAI_KEY,
"method": "turnstile",
"sitekey": sitekey,
"pageurl": site_url,
"json": 1,
})
data = resp.json()
task_id = data["request"]
for _ in range(60):
time.sleep(5)
resp = requests.get(f"{CAPTCHAAI_URL}/res.php", params={
"key": CAPTCHAAI_KEY,
"action": "get",
"id": task_id,
"json": 1,
})
data = resp.json()
if data["request"] != "CAPCHA_NOT_READY":
return data["request"]
raise TimeoutError("Solve timeout")
Selenium + Bright Data + CaptchaAI
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
BRIGHT_DATA_HOST = "brd.superproxy.io"
BRIGHT_DATA_PORT = 22225
BRIGHT_DATA_USER = "brd-customer-CUSTOMER_ID-zone-residential"
BRIGHT_DATA_PASS = "PASSWORD"
def create_driver_with_proxy():
options = webdriver.ChromeOptions()
options.add_argument(
f"--proxy-server=http://{BRIGHT_DATA_HOST}:{BRIGHT_DATA_PORT}"
)
options.add_argument("--disable-blink-features=AutomationControlled")
options.add_argument("--window-size=1920,1080")
driver = webdriver.Chrome(options=options)
return driver
def scrape_with_captcha_solving(url, sitekey=None):
driver = create_driver_with_proxy()
try:
driver.get(url)
time.sleep(3)
# Auto-detect sitekey if not provided
if not sitekey:
sitekey = driver.execute_script(
"return document.querySelector('[data-sitekey]')"
"?.getAttribute('data-sitekey')"
)
if sitekey:
token = solve_recaptcha(url, sitekey)
driver.execute_script(f"""
document.querySelector('#g-recaptcha-response').value = '{token}';
document.querySelectorAll('[name="g-recaptcha-response"]')
.forEach(el => {{ el.value = '{token}'; }});
""")
# Trigger callback
driver.execute_script("""
if (typeof ___grecaptcha_cfg !== 'undefined') {
const clients = ___grecaptcha_cfg.clients;
for (const key in clients) {
for (const prop in clients[key]) {
const val = clients[key][prop];
if (val && typeof val === 'object') {
for (const p in val) {
if (typeof val[p]?.callback === 'function') {
val[p].callback(arguments[0]);
}
}
}
}
}
}
""")
return driver.page_source
finally:
driver.quit()
Country-Specific Targeting
Bright Data supports country, state, and city targeting:
# Country targeting
proxy_us = "http://brd-customer-ID-zone-residential-country-us:PASS@brd.superproxy.io:22225"
proxy_uk = "http://brd-customer-ID-zone-residential-country-gb:PASS@brd.superproxy.io:22225"
proxy_de = "http://brd-customer-ID-zone-residential-country-de:PASS@brd.superproxy.io:22225"
# City targeting
proxy_nyc = "http://brd-customer-ID-zone-residential-country-us-city-newyork:PASS@brd.superproxy.io:22225"
# Use the geo-matched proxy for lower CAPTCHA rates
def scrape_localized(url, country="us"):
proxy = f"http://brd-customer-ID-zone-residential-country-{country}:PASS@brd.superproxy.io:22225"
resp = requests.get(url, proxies={"http": proxy, "https": proxy}, timeout=30)
return resp
Session Management
# Sticky session (same IP for entire session)
proxy_sticky = (
"http://brd-customer-ID-zone-residential"
"-session-abc123:PASS@brd.superproxy.io:22225"
)
# Rotating (new IP each request)
proxy_rotating = (
"http://brd-customer-ID-zone-residential:PASS@brd.superproxy.io:22225"
)
For CAPTCHA workflows: Use sticky sessions. The CAPTCHA token is bound to the IP that loaded the page — using a different IP for submission will fail.
Node.js Integration
const axios = require("axios");
const https = require("https");
const CAPTCHAAI_KEY = "YOUR_API_KEY";
const CAPTCHAAI_URL = "https://ocr.captchaai.com";
const proxyAgent = new (require("https-proxy-agent"))(
"http://brd-customer-ID-zone-residential:PASS@brd.superproxy.io:22225"
);
async function fetchWithProxy(url) {
return axios.get(url, {
httpsAgent: proxyAgent,
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/126.0.0.0",
},
});
}
async function solveCaptcha(siteUrl, sitekey) {
const submit = await axios.post(`${CAPTCHAAI_URL}/in.php`, null, {
params: {
key: CAPTCHAAI_KEY,
method: "userrecaptcha",
googlekey: sitekey,
pageurl: siteUrl,
json: 1,
},
});
const taskId = submit.data.request;
for (let i = 0; i < 60; i++) {
await new Promise((r) => setTimeout(r, 5000));
const result = await axios.get(`${CAPTCHAAI_URL}/res.php`, {
params: {
key: CAPTCHAAI_KEY,
action: "get",
id: taskId,
json: 1,
},
});
if (result.data.request === "CAPCHA_NOT_READY") continue;
if (result.data.status === 1) return result.data.request;
}
throw new Error("Timeout");
}
Bright Data Zone Configuration
| Zone Setting | Recommended for CAPTCHA | Why |
|---|---|---|
| Proxy type | Residential | Lowest CAPTCHA trigger rate |
| Country targeting | Match target site location | IP ↔ content consistency |
| Session type | Sticky | Token must match originating IP |
| IP quality filter | High quality | Avoid flagged IPs |
| Max concurrent | 100+ | Parallel CAPTCHA workflows |
Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| 407 from proxy | Wrong credentials | Verify customer ID, zone, and password |
| CAPTCHA appears every request | Datacenter proxy detected | Switch to residential zone |
| Token rejected | IP changed between solve and submit | Use sticky sessions |
| Slow response | Congested exit node | Target less-popular country/city |
| Connection refused | Bandwidth limit reached | Check Bright Data dashboard |
FAQ
Does CaptchaAI use my Bright Data proxy?
No. CaptchaAI solves CAPTCHAs using its own infrastructure. Your proxy is only used for browsing. You pass the page URL and sitekey to CaptchaAI's API.
Which Bright Data zone works best for CAPTCHA-heavy sites?
Residential or ISP zones. Datacenter IPs are more likely to trigger CAPTCHAs. ISP proxies combine datacenter speed with residential trust.
Should I use sticky or rotating sessions?
Sticky for CAPTCHA workflows. The CAPTCHA token is IP-bound — if your IP rotates between page load and form submission, the token will be rejected.
Can I pass my proxy to CaptchaAI?
Yes — CaptchaAI's API accepts a proxy parameter. This makes CaptchaAI solve the CAPTCHA from the same IP. Useful for IP-bound challenges.
Related Guides
- Rotating Residential Proxies for CAPTCHA Solving
- Proxy Quality Affects CAPTCHA Solve Rate
- ISP vs Datacenter Proxies for CAPTCHA
Combine Bright Data's proxy network with automated CAPTCHA solving — get your CaptchaAI key and scale your automation.
Discussions (0)
Join the conversation
Sign in to share your opinion.
Sign InNo comments yet.