Lemin CAPTCHA Token Solving
Solve Lemin Cropped CAPTCHA challenges programmatically. Lemin uses image-based puzzles where users must identify and click on specific areas.
Lemin CAPTCHA (also known as Lemin Cropped CAPTCHA) is a visual puzzle captcha that requires users to identify cropped portions of images. The solution returns a token containing the answer and challenge ID for form submission.
Captcha Type
Use the following captcha type identifier in your API requests:
"type": "LEMIN_CAPTCHA_TOKEN"
Finding Captcha Parameters
To solve Lemin CAPTCHA, you need to extract the siteKey (captcha_id) from the page:
<!-- Look for a script tag like this: -->
<script src="https://api.leminnow.com/captcha/v1/cropped/CROPPED_2dfdd3c_d1232b323b232d23ba2b323eb23a232b/js"></script>
<!-- The siteKey is: CROPPED_2dfdd3c_d1232b323b232d23ba2b323eb23a232b -->
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth.token |
string | required | Your API key |
captcha.type |
string | required | Must be "LEMIN_CAPTCHA_TOKEN" |
captcha.metadata.siteUrl |
string | required | The URL where the captcha appears |
captcha.metadata.siteKey |
string | required | Lemin captcha ID (CROPPED_xxx_xxx format) |
captcha.payload.proxy |
object | optional | Proxy configuration (optional) |
Example Request
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: {
token: 'YOUR_API_KEY'
},
context: {
source: 'api',
version: '1.0.0'
},
captcha: {
type: 'LEMIN_CAPTCHA_TOKEN',
metadata: {
siteUrl: 'https://example.com/test-page',
siteKey: 'CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b'
},
payload: {}
}
})
});
const data = await response.json();
console.log('Task ID:', data.task.id);
Response Format
Create Task Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Task created successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Completed)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"token": "{"answer":"0xaxcgx0xkxbsx0xuxb8x...","challengeId":"578c0b7b-248f-480e-a3b0-fbe2cbfdcb8b"}",
"timestamp": "2025-11-26T12:00:15.000Z"
}
}
}
The token field contains a JSON string with answer and challengeId.
Parse this JSON and use the values in your form submission.
Implementation Guide
Step 1: Extract siteKey from Page
// Find script tag with Lemin URL
function getLeminSiteKey() {
const scripts = document.querySelectorAll('script[src*="leminnow.com"]');
for (const script of scripts) {
const match = script.src.match(/cropped\/([^\/]+)\/js/);
if (match) {
return match[1];
}
}
return null;
}
const siteKey = getLeminSiteKey();
console.log('Lemin siteKey:', siteKey);
Step 2: Parse and Submit the Token
// After solving, parse the token and submit
const tokenData = JSON.parse(result.token);
const formData = new FormData();
formData.append('lemin_answer', tokenData.answer);
formData.append('lemin_challenge_id', tokenData.challengeId);
await fetch('/submit', {
method: 'POST',
body: formData
});
Python Example
import requests
import time
import json
def solve_lemin_captcha(site_url, site_key, api_key):
# Step 1: Create task
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={
'Content-Type': 'application/json',
'apikey': api_key
},
json={
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'LEMIN_CAPTCHA_TOKEN',
'metadata': {
'siteUrl': site_url,
'siteKey': site_key
},
'payload': {}
}
}
)
create_data = create_response.json()
if not create_data['success']:
raise Exception(create_data['error']['message'])
task_id = create_data['task']['id']
# Step 2: Poll for result (Lemin takes 15-20 seconds)
while True:
time.sleep(5)
result_response = requests.post(
'https://solver-api.mydisct.com/fetchResult',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={'taskId': task_id}
)
result_data = result_response.json()
if result_data['task']['status'] == 'completed':
return result_data['task']['result']['token']
elif result_data['task']['status'] == 'failed':
raise Exception('Solving failed')
# Usage
token = solve_lemin_captcha(
site_url='https://example.com/test-page',
site_key='CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b',
api_key='YOUR_API_KEY'
)
# Parse the token
token_data = json.loads(token)
print(f'Answer: {token_data["answer"]}')
print(f'Challenge ID: {token_data["challengeId"]}')
# Submit with form
response = requests.post('https://example.com/submit', data={
'username': 'testuser',
'lemin_answer': token_data['answer'],
'lemin_challenge_id': token_data['challengeId']
})
Best Practices
- Always extract the full siteKey from the script src attribute (CROPPED_xxx format)
- Lemin typically takes 15-20 seconds to solve, use appropriate polling intervals
- Parse the token JSON to get answer and challengeId values
- Lemin tokens expire quickly, use them immediately after receiving
Common Issues
Solution: Make sure you're extracting the complete siteKey including the CROPPED_ prefix. The format should be like: CROPPED_xxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Solution: Make sure to parse the token JSON and submit both answer and challengeId. Verify the input field names match what the site expects.