Altcha
Altcha is an open-source, privacy-first CAPTCHA alternative that uses proof-of-work challenges to verify human users without tracking or fingerprinting. It is increasingly adopted by privacy-conscious applications and is designed to be GDPR-compliant by default. The challenge requires computing a cryptographic proof that is submitted as a token with form data.
Supported Types
Section titled “Supported Types”| Type | Proxy Required | Description |
|---|---|---|
AltchaToken | Yes | Solves the challenge using your proxy. |
AltchaTokenProxyLess | No | Solves the challenge without a proxy. Recommended for most use cases. |
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | AltchaToken or AltchaTokenProxyLess |
websiteURL | string | Yes | The URL of the page containing the Altcha widget |
websiteKey | string | Yes | The site key or challenge URL found in the Altcha widget configuration |
Proxy Parameters
Section titled “Proxy Parameters”Required when using the AltchaToken type:
| Parameter | Type | Required | Description |
|---|---|---|---|
proxyType | string | Yes | http, socks4, or socks5 |
proxyAddress | string | Yes | Proxy IP or hostname |
proxyPort | integer | Yes | Proxy port |
proxyLogin | string | No | Proxy username |
proxyPassword | string | No | Proxy password |
Create Task Request
Section titled “Create Task Request”{ "clientKey": "YOUR_API_KEY", "task": { "type": "AltchaTokenProxyLess", "websiteURL": "https://example.com/contact", "websiteKey": "ckey_2JDa7N9bR..." }}With proxy:
{ "clientKey": "YOUR_API_KEY", "task": { "type": "AltchaToken", "websiteURL": "https://example.com/contact", "websiteKey": "ckey_2JDa7N9bR...", "proxyType": "http", "proxyAddress": "1.2.3.4", "proxyPort": 8080, "proxyLogin": "user", "proxyPassword": "pass" }}Response
Section titled “Response”{ "errorId": 0, "taskId": "550e8400-e29b-41d4-a716-446655440000", "status": "processing"}Solution Object
Section titled “Solution Object”{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}| Field | Type | Description |
|---|---|---|
token | string | The proof-of-work solution token to submit with the form |
How to Use
Section titled “How to Use”- Find the Altcha widget on the target page. The site key is typically in the widget element’s
data-altcha-keyattribute or in the JavaScript initialization code. - Submit the task and poll for the solution.
- Set the returned
tokenas the value of the Altcha hidden input field in the form (usually namedaltcha). - Submit the form. The server will verify the proof-of-work token.
Code Examples
Section titled “Code Examples”Python
Section titled “Python”import requestsimport time
API_KEY = "YOUR_API_KEY"
response = requests.post("https://api.ucaptcha.net/createTask", json={ "clientKey": API_KEY, "task": { "type": "AltchaTokenProxyLess", "websiteURL": "https://example.com/contact", "websiteKey": "ckey_2JDa7N9bR..." }})task_id = response.json()["taskId"]
while True: result = requests.post("https://api.ucaptcha.net/getTaskResult", json={ "clientKey": API_KEY, "taskId": task_id }).json() if result["status"] == "ready": token = result["solution"]["token"] print("Solution:", token)
# Submit the form with the Altcha token form_data = { "altcha": token, "name": "John", "message": "Hello" } response = requests.post("https://example.com/contact", data=form_data) print("Status:", response.status_code) break elif result["status"] == "failed": print("Error:", result.get("errorDescription")) break time.sleep(5)JavaScript
Section titled “JavaScript”const API_KEY = "YOUR_API_KEY";
const { taskId } = await fetch("https://api.ucaptcha.net/createTask", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ clientKey: API_KEY, task: { type: "AltchaTokenProxyLess", websiteURL: "https://example.com/contact", websiteKey: "ckey_2JDa7N9bR..." } })}).then(r => r.json());
while (true) { const result = await fetch("https://api.ucaptcha.net/getTaskResult", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ clientKey: API_KEY, taskId }) }).then(r => r.json());
if (result.status === "ready") { console.log("Solution:", result.solution.token); break; } else if (result.status === "failed") { console.error("Error:", result.errorDescription); break; } await new Promise(r => setTimeout(r, 5000));}# Create the taskcurl -X POST https://api.ucaptcha.net/createTask \ -H "Content-Type: application/json" \ -d '{ "clientKey": "YOUR_API_KEY", "task": { "type": "AltchaTokenProxyLess", "websiteURL": "https://example.com/contact", "websiteKey": "ckey_2JDa7N9bR..." } }'
# Poll for the result (replace TASK_ID with the returned taskId)curl -X POST https://api.ucaptcha.net/getTaskResult \ -H "Content-Type: application/json" \ -d '{ "clientKey": "YOUR_API_KEY", "taskId": "TASK_ID" }'Provider Coverage
Section titled “Provider Coverage”- 2Captcha
- Anti-Captcha
- CapMonster
Aliases
Section titled “Aliases”No backward-compatible aliases. Use AltchaToken or AltchaTokenProxyLess directly.