Supported task types
API methods
Tutorial pages

Solve image captcha

Post an image body and receive text from it. Text can only contain digits, letters, special characters and a space. GIF animations are supported, up to 500kb. Custom captchas like "find a cat in this series of images and enter its number" are not supported.

Task object

PropertyTypeRequiredDefault valuePurpose
typeStringYesImageToTextTaskDefines the type of task.
bodyStringYesFile body encoded in base64. Make sure to send it without line breaks. Do not include 'data:image/png,' or similar tags, only clean base64!
phraseBooleanNofalsefalse - no requirements
true - requires workers to enter an answer with at least one "space". If there are no spaces, they will skip the task, so use it with caution.
caseBooleanNotruefalse - no requirements
true - workers see a special mark indicating that the answer must be entered with case sensitivity.
numericIntegerNo00 - no requirements
1 - only numbers are allowed
2 - any letters are allowed except numbers
mathBooleanNofalsefalse - no requirements
true - workers see a special mark telling them the answer must be calculated
minLengthIntegerNo00 - no requirements
>1 - defines minimum length of the answer
maxLengthIntegerNo00 - no requirements
>1 - defines maximum length of the answer
commentStringNoAdditional comments for workers like "enter red text".
The result is not guaranteed and is totally up to the worker.
websiteURLStringNoOptional parameter to distinguish source of image captchas in spending statistics.

Request example

#pip3 install anticaptchaofficial

from anticaptchaofficial.imagecaptcha import *

solver = imagecaptcha()

# Specify softId to earn 10% commission with your app.
# Get your softId here:

captcha_text = solver.solve_and_return_solution("captcha.jpeg")
if captcha_text != 0:
    print "captcha text "+captcha_text
    print "task finished with error "+solver.error_code

Task solution object

textStringText from image captcha
urlStringWeb address where we'll store the captcha for the next 24 hours, after which it will be removed.

Response example