Amazon Captcha
Overview
Amazon Captcha is an authentication system used by Amazon to protect their websites from bots and automated activities. This is a specially distorted text captcha that only appears on Amazon systems.
🛒
Amazon Captcha typically appears during login, product searches, or when Amazon detects unusual behavior from your IP address.

1. Create Request
Request
POST https://api.achicaptcha.com/createTask
Parameters
| Parameter name | Data type | Required? | Description |
|---|---|---|---|
clientKey | string | yes | Api key |
task.type | string | yes | ImageToTextTask |
task.image | string | yes | base64 of Amazon captcha image |
task.subType | string | yes | amazon |
Request Example
POST /createTask HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ImageToTextTask",
"image": "base64 encoded Amazon captcha image",
"subType": "amazon"
}
}Response
On success, server returns errorId = 0 and taskId
{
"errorId": 0,
"taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}2. Get Result
Request
POST https://api.achicaptcha.com/getTaskResult
Parameters
| Parameter name | Data type | Required? | Description |
|---|---|---|---|
clientKey | string | yes | Api key |
taskId | string | yes | TaskId from (1) |
Request Example
POST /getTaskResult HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}Response
{
"errorId": 0,
"status": "ready",
"solution": "KCXM8P"
}Status Explanation
errorId = 0andstatus = ready: Solved successfully, read result insolutionerrorId = 0andstatus = processing: Solving captcha, wait 2 seconds and try againerrorId > 0: System error, returns error code and description
Integration Examples
import requests
import time
import base64
def solve_amazon_captcha(image_path, api_key='YOUR_API_KEY'):
# Read and encode image
with open(image_path, 'rb') as image_file:
image_base64 = base64.b64encode(image_file.read()).decode('utf-8')
# Step 1: Create task
create_task_url = 'https://api.achicaptcha.com/createTask'
create_task_payload = {
'clientKey': api_key,
'task': {
'type': 'ImageToTextTask',
'image': image_base64,
'subType': 'amazon'
}
}
response = requests.post(create_task_url, json=create_task_payload)
result = response.json()
if result['errorId'] != 0:
raise Exception(result['errorDescription'])
task_id = result['taskId']
# Step 2: Get result
get_result_url = 'https://api.achicaptcha.com/getTaskResult'
while True:
time.sleep(2) # Wait 2 seconds
get_result_payload = {
'clientKey': api_key,
'taskId': task_id
}
response = requests.post(get_result_url, json=get_result_payload)
result = response.json()
if result['errorId'] != 0:
raise Exception(result['errorDescription'])
if result['status'] == 'ready':
return result['solution']
# If status == 'processing', continue loop
# Usage
solution = solve_amazon_captcha('amazon_captcha.png', 'YOUR_API_KEY')
print('Amazon captcha result:', solution)Common Error Codes
| Error Code | Description | Notes |
|---|---|---|
| 0 | success | Success |
| 1 | processing | Processing |
| 2 | missing required fields | Missing required field, check parameters again |
| 3 | task not supported | Task type not supported |
| 4 | task creation failed | Task creation failed |
| 5 | client key does not exist | API key does not exist, check API key again |
| 6 | insufficient account balance | Insufficient account balance, top up credits |
| 7 | task failed, please create a new task | Task failed, please create a new task |
| 8 | task ID does not exist | Task ID does not exist |
Best Practices
To achieve the best results when using Achicaptcha API, follow these principles:
1. Image Quality
- Use high-resolution images
- Ensure images are not overly blurred or noisy
- Capture or crop the correct Amazon captcha area
2. Polling Interval
- Wait at least 2 seconds between result checks
- Don't spam the API with too many consecutive requests
- Have a timeout to avoid infinite loops
3. Retry Logic
- Implement retry for temporary errors like
ERROR_NO_SLOT_AVAILABLE - Use exponential backoff when retrying
- Limit maximum number of retries
4. API Key Security
- Don't hardcode API key in code
- Use environment variables
- Don't expose API key on client-side
Useful Links: