reCAPTCHA, hCaptcha & image captchas in Python — updated August 2026
TL;DR: For image captchas, pip install captchakings and solve in 3 lines. For reCAPTCHA/hCaptcha tokens, POST a task to api.captchakings.com/createTask and poll for the result. New accounts get 50 free solves — no credit card.
The fastest path for image captcha solving. The official package is on PyPI:
pip install captchakings
from captchakings import CaptchaKings
client = CaptchaKings('your_api_key_here')
result = client.solve('captcha.jpg')
print(result)
Your API key is in Dashboard → API Keys after signing up.
reCAPTCHA v2/v3 and hCaptcha are solved as token tasks: you submit the page URL and site key, workers solve it in a real browser, and you receive a token to inject. This is the pattern used in our reCAPTCHA solver pipeline:
import requests
import time
API_KEY = "your_api_key_here"
def solve_recaptcha_v2(page_url, site_key):
# 1. Create the task
task_data = {
"clientKey": API_KEY,
"task": {
"type": "RecaptchaV2TaskProxyless",
"websiteURL": page_url,
"websiteKey": site_key
}
}
response = requests.post("https://api.captchakings.com/createTask", json=task_data)
task_id = response.json().get("taskId")
# 2. Poll for the result
while True:
time.sleep(3)
result = requests.post(
"https://api.captchakings.com/getTaskResult",
json={"clientKey": API_KEY, "taskId": task_id}
).json()
if result.get("status") == "ready":
return result["solution"]["gRecaptchaResponse"]
If you don't want the dependency, the image API is a single multipart POST. It's the same endpoint behind the pip package:
import requests
API_KEY = "your_api_key_here"
with open("captcha.jpg", "rb") as f:
response = requests.post(
"https://captchakings.com/api/process.php",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"captcha": f}
)
data = response.json()
if data.get("success"):
print(data["data"]["prediction"]) # solved text
print(data["data"]["confidence"]) # 0-100
print(data["billing"]["balance_remaining"])
else:
print("Error:", data["error"]["message"])
Once you have the gRecaptchaResponse token, inject it into the hidden textarea and submit — the standard flow for Python captcha automation:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://example.com/signup")
token = solve_recaptcha_v2(driver.current_url, "SITE_KEY_FROM_PAGE")
driver.execute_script(
'document.getElementById("g-recaptcha-response").innerHTML = arguments[0];',
token
)
driver.find_element("css selector", "form").submit()
Solving thousands of images? Don't block on one request at a time. The image API supports concurrent requests, so async clients scale linearly:
import aiohttp
import asyncio
API_KEY = "your_api_key_here"
API_URL = "https://captchakings.com/api/process.php"
async def solve_one(session, path):
with open(path, "rb") as f:
form = aiohttp.FormData()
form.add_field("captcha", f, filename=path)
async with session.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
data=form
) as resp:
data = await resp.json()
return data["data"]["prediction"] if data.get("success") else None
async def main():
files = ["cap1.jpg", "cap2.jpg", "cap3.jpg"]
async with aiohttp.ClientSession() as session:
results = await asyncio.gather(*[solve_one(session, f) for f in files])
print(results)
asyncio.run(main())
| Captcha Type | Endpoint | Result |
|---|---|---|
| Image captcha | captchakings.com/api/process.php | Solved text (synchronous) |
| reCAPTCHA v2/v3, hCaptcha | api.captchakings.com/createTask | Token (async, poll getTaskResult) |
| 2Captcha-compatible | captchakings.com/in.php / res.php | Drop-in migration format |
requests.Session in long-running workers to keep connections alive.confidence on image solves; resubmit when it's below your threshold instead of accepting garbage.Yes — pip install captchakings covers image captchas in 3 lines. For reCAPTCHA/hCaptcha token tasks, use the task API with requests as shown above; it takes about 15 lines.
Send a RecaptchaV2TaskProxyless task with the page URL and site key to createTask, poll getTaskResult until status is ready, then inject the returned gRecaptchaResponse token into the form.
Yes. The API returns a token; your browser automation injects it into g-recaptcha-response and submits. The solving happens on our side, so your browser never runs the challenge.
Image captchas: $0.50 per 1,000 solves, pay-as-you-go. 50 free solves on signup, no credit card. See the full price comparison against other services.
50 free solves on signup — test with your own captchas.
Get Your API Key