2captcha API
2captcha API
Go up Introduction
Recent Changes
(/enterpage)
Rates
DASHBOARD (/enterpage) API (/2captcha-api) Software (/software) Settings (/setting) FAQ (/support/faq) Statistics (/public_statistics) Solving Captchas
Language support
Error Handling
Blog (/blog) Log out
customer Request limits
Using proxies
2Captcha.com API
Pingback (callback)
2Captcha is a human-powered image and CAPTCHA recognition service. 2Captcha's main purpose is solving your Complain about in…
CAPTCHAs in a quick and accurate way by human employees, but the service is not limited only to CAPTCHA solving. You
can convert to text any image that a human can recognize.
Additional methods
Code Examples
Sandbox
Introduction
We provide an API that allows you to automate the process and integrate your software with our service.
There are few simple steps to solve your captcha or recognize the image:
Recent Changes
September 21, 2018
Updated pingback logic. Now you only need to register a domain/IP instead of full URL. More info here
September 6, 2017
Go up
KeyCaptcha method is currenly unavailable.
November 9, 2016
We've added some new examples for ReCaptcha V2 API check them out here.
November 9, 2016
At the moment ReCaptcha V2 can be solved for any website. It's required to send us the full URL of the page where you get
ReCaptcha (it wasn't required before). Sending the proxy information is not obligatory yet but it's recommended.
Rates
Our rates depends on type of captcha that you want to solve and the method used. Rate for normal captcha also depends on
current service load.
ReCaptcha V2 $2.99 The rate applies to Google's ReCaptcha V2 solved via token.
ReCaptcha V2 $1.2 The rate applies to any captcha where you need to click images.
(old method)
Solving
ClickCaptcha
RotateCaptcha $0.5 The rate applies to any captcha where you need to rotate images.
FunCaptcha
Solving Captchas
The process of solving captchas with 2captcha is really easy and it's mostly the same for all types of captchas:
https://2captcha.com/2captcha-api#solving_recaptchav2_new 2/39
11/15/2018 2captcha API
1. Get your API key from your account settings page (https://2captcha.com/setting). Each user is given a unique
Go up authentication token, we call it API key. It's a 32-characters string that looks like:
1abc234de56fab7c89012d34e56fa7b8
This key will be used for all your requests to our server.
2. Submit a HTTP POST request to our API URL: http://2captcha.com/in.php with parameters corresponding to the type of
your captcha.
Server will return captcha ID or an error code if something went wrong.
3. Make a timeout: 20 seconds for ReCaptcha, 5 seconds for other types of captchas.
4. Submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
If captcha is already solved server will return the answer in format corresponding to the type of your captcha.
By default answers are returned as plain text like: OK|Your answer. But answer can also be returned as JSON
{"status":1,"request":"TEXT"} if json parameter is used.
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
If something went wrong server will return an error code.
Normal Captcha
Normal Captcha is an image that contains distored but human-readable text. To solve the captcha user have to type the
text from the image.
To solve the captcha with our service you have to submit the image with HTTP POST request to our API URL:
http://2captcha.com/in.php
Server accepts images in multipart or base64 format.
Multipart sample form
https://2captcha.com/2captcha-api#solving_recaptchav2_new 3/39
11/15/2018 2captcha API
If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON
{"status":1,"request":"2122988149"} if json parameter was used.
If something went wrong server will return an error. See Error Handling chapter for the list of errors.
Make a 5 seconds timeout and submit a HTTP GET request to our API URL: http://2captcha.com/res.php providing the captcha
ID. The list of parameters is in the table below.
If everything is fine and your captcha is solved server will return the answer as plain text, like: OK|TEXT or as JSON
{"status":1,"request":"TEXT"} if json parameter was used.
Otherwise server will return CAPCHA_NOT_READY that means that your captcha is not solved yet. Just repeat your request in 5
seconds.
If something went wrong server will return an error. See Error Handling chapter for the list of errors.
method String Yes post - defines that you're sending an image with multipart form
base64 - defines that you're sending a base64 encoded image
https://2captcha.com/2captcha-api#solving_recaptchav2_new 4/39
11/15/2018 2captcha API
textinstructions String No Text will be shown to worker to help him to solve the captcha correctly.
Max 140 For example: type red symbols only.
characters
Endcoding:
UTF-8
imginstructions Image No Image will be shown to worker to help him to solve the captcha correctly.
Max Server accepts images from multipart form or base64-encoded.
100x100px,
25 kB
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with
2captcha get reward: 10% of spendings of their software users.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 5/39
11/15/2018 2captcha API
action String Yes get - get the asnwer for your captcha
Text Captcha
Text Captcha is a type of captcha that is represented as text and doesn't contain images. Usually you have to answer a
question to pass the verification.
To solve text captcha with our service you have to submit the text as a value of textcaptcha parameter with HTTP POST request
to our API URL: http://2captcha.com/in.php
https://2captcha.com/2captcha-api#solving_recaptchav2_new 6/39
11/15/2018 2captcha API
Go up <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="post" action="http://2captcha.com/in.php" enctype="multipart/form-data" accept-charset="UTF-8">
Your key:
<input type="text" name="key" value="YOUR_APIKEY">
<input type="text" name="textcaptcha" value="If tomorrow is Saturday, what day is today?">
<input type="submit" value="Send and get the ID">
</form>
</body>
</html>
If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON
{"status":1,"request":"2122988149"} if json parameter was used.
If something went wrong server will return an error. See Error Handling chapter for the list of errors.
Make a 5 seconds timeout and submit a GET request to our API URL: http://2captcha.com/res.php providing the captcha ID. The
list of parameters is in the table below.
If everything is fine and your captcha is solved server will return the answer as plain text, like: OK|TEXT or as JSON
{"status":1,"request":"TEXT"} if json parameter was used.
Otherwise server will return CAPCHA_NOT_READY that means that your captcha is not solved yet. Just repeat your request in 5
seconds.
If something went wrong server will return an error. See Error Handling chapter for the list of errors.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 7/39
11/15/2018 2captcha API
textcaptcha String No Text will be shown to worker to help him to solve the captcha correctly.
Go up
Max 140 For example: type red symbols only.
characters
Endcoding:
UTF-8
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with 2captcha get
reward: 10% of spendings of their software users.
action String Yes get - get the asnwer for your captcha
ReCaptcha V2
https://2captcha.com/2captcha-api#solving_recaptchav2_new 8/39
11/15/2018 2captcha API
ReCaptcha V2 also known as I'm not a robot reCaptcha is a very popular type of captcha that looks like this:
Go up
1. Look at the element's code at the page where you found ReCaptcha.
4. Submit a HTTP GET or POST request to our API URL: userrecaptcha and
http://2captcha.com/in.php with method set to
provide the value found on previous step as value for googlekey and full page URL as value for pageurl. Sending proxies is
not obligatory ar the moment but it's recommended.
You can find the full list of parameters in the table below.
ha&googlekey=6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-&pageurl=http://mysite.com/page/with/recaptcha?appear=1&here=now
Go up
5. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON
{"status":1,"request":"2122988149"} if json parameter was used.
Otherwise server will return an error code.
6. Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the
result.
The full list of parameters is in the table below.
If captcha is already solved server will respond in plain text or JSON and return the answer token that looks like:
03AHJ_Vuve5Asa4koK3KSMyUkCq0vUFCR5Im4CwB7PzO3dCxIo11i53epEraq-uBO5mVm2XRikL8iKOWr0aG50sCuej9bXx5qcviUGSm4iK4NC_Q88fla
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
If something went wrong server will return an error code.
7. Locate the element with id g-recaptcha-response and make it visible deleting display:none parameter.
Please note: sometimes content on the page is generated dynamically and you will not see this element in html
source.
In such cases you have to explore javascript code that generates the content. "Inspect" option in Google Chrome can
help in that.
As an alternative you can just use javascript to set the value of g-recaptcha-response field:
document.getElementById("g-recaptcha-response").innerHTML="TOKEN_FROM_2CAPTCHA";
8. An input field will appear on the page. And you just have to paste the answer token to that field and submit the form.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 10/39
11/15/2018 2captcha API
Go up
ReCaptcha Callback
Sometimes there's no submit button and a callback function is used isntead. The function is executed when reCaptcha is solved.
data-callback="myCallbackFunction"
grecaptcha.render('example', {
'sitekey' : 'someSitekey',
'callback' : myCallbackFunction,
'theme' : 'dark'
});
Also there's another way to find the callback function - open javascript console of your browser and explore ReCaptcha
configuration object:
___grecaptcha_cfg.clients[0].aa.l.callback
Note that aa.l may change and there can be multiple clients so you have to check clients[1], clients[2] too.
Finally all you have to do is to call that function:
myCallbackFunction();
https://2captcha.com/2captcha-api#solving_recaptchav2_new 11/39
11/15/2018 2captcha API
___grecaptcha_cfg.clients[0].aa.l.callback();
Go up
Sometimes it is required to provide an argument and in most cases you should put the token there. For example:
myCallbackFunction('TOKEN');
Invisible ReCaptcha V2
ReCaptcha V2 also has an invisible version.
You may check how it looks like here: https://www.google.com/recaptcha/api2/demo?invisible=true
(https://www.google.com/recaptcha/api2/demo?invisible=true)
Recently we noticed some changes in invisible ReCaptcha algorithms on few websites and added new parameter
invisible=1 that should be used for invisible ReCaptcha.
Read more about invisible ReCaptcha below.
Invisible ReCaptcha is located on a DIV layer positioned -10 000 px from top that makes it invisible for user.
ReCaptcha is activated on page load or on user's actions like click somewhere or submit a form - that depends on the website. If
user's cookies are good enough then he will just pass it automatically and no additional actions will be required. Otherwise user
will see standard ReCaptcha form with a challenge.
In most cases when challenge is completed a callback function is executed. You can read more about callback here.
If you are still not sure — there are few ways to determine that ReCaptcha is in invisible mode:
You don't see "I'm not a robot" checkbox on the page but getting recaptcha challenge when making some actions there
ReCaptcha's iframe link contains parameter size=invisible
ReCaptcha's configuration object contains parameter size that is set to invisible, for example
___grecaptcha_cfg.clients[0].aa.l.size is equal to invisible
document.getElementById("g-recaptcha-response").innerHTML="TOKEN_FROM_2CAPTCHA";
2. Execute the action that needs to be performed on the page after solving reCaptcha.
Usually there's a form that should be submitted and you need to identify the form by id or name or any other attribute and
then submit the form. Here are few examples:
https://2captcha.com/2captcha-api#solving_recaptchav2_new 12/39
11/15/2018 2captcha API
grecaptcha.render('example', {
'sitekey' : 'someSitekey',
'callback' : myCallbackFunction,
'theme' : 'dark'
});
myCallbackFunction();
<div style="visibility: hidden; position: absolute; width:100%; top: -10000px; left: 0px; right: 0px; transition: vi
<div style="width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 2000000000; background-color: #
</div>
<div style="margin: 0 auto; top: 0px; left: 0px; right: 0px; position: absolute; border: 1px solid #ccc; z-index: 200
<iframe src="https://www.google.com/recaptcha/api2/bframe?hl=en&v=r20170213115309&k=6LfP0CITAAAAAHq9FOgCo7v_f
</div>
</div>
3. Put the following code instead of the block you've just cut:
https://2captcha.com/2captcha-api#solving_recaptchav2_new 13/39
11/15/2018 2captcha API
Go up <input type="submit">
<textarea name="g-recaptcha-response">%g-recaptcha-response%</textarea>
method String Yes userrecaptcha - defines that you're sending a ReCaptcha V2 with new method
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with 2captcha get
reward: 10% of spendings of their software users.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 14/39
11/15/2018 2captcha API
We can solve recaptchas with different grids like 3x3, 2x4, 4x4.
Also you can solve ReCaptcha V2 with ClickCaptcha method if it's more suitable for you.
And of course we support ReCaptcha V2 challenges when you have to select around an object or few objects. Read more
here.
1. Click on initial ReCaptcha's checkbox. You will get a set of images and instruction that tells you what to click. Actually it's
one image with the grid on it.
2. Optionally: determine the grid and define it in your request with recaptchacols and recaptcharows parameters.
If not defined we'll check the size of the image. If it's 300x300px we put 3x3 grid on it. If the size is different we put 4x4
grid.
3. Submit a HTTP POST request to our API URL: http://2captcha.com/in.php including recaptcha parameter set to 1.
Server accepts images in multipart or base64 format. You have to send only the image set without the grid and blue box.
Also you can provide instructions as an image using imginstructions parameter. For more info please check the full list of
parameters in the table below.
5. Make a 5 seconds timeout and submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
If captcha is already solved server will return the answer with numbers of grid cells that you need to click like:
OK|click:3/8/9/.
Grid cells are numbered starting from number 1 from left to right and from top to bottom. If the grid contains more than 9
cells, letters a-g are used for cells 10-16 accordingly.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 15/39
11/15/2018 2captcha API
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
Go up
If something went wrong server will return an error code.
7. If ReCaptcha updates the set of images you can send us new request with an additional parameter previousID and the ID of
previous request as a value. Then our worker will check only new images that were not selected by previous worker.
8. Also you can proivde additional parameter can_no_answer in case if there's no images to click left. Worker will see a button
to confirm that there's no corresponding images and API will return No_matching_images as answer.
Canvas method
In case when ReCaptcha challenge is to select around object you can pass canvas parameter set to 1.
Server will return the result in the following format: canvas:x,y,x,y,x,y;x,y,x,y,x,y;
Where each pair of x and y are coordinates of points you need to click to select an area around object. If there are more than one
area, coordininates of areas will be separated by semicolon.
For example:
canvas:5,5,3,91,93,90,90,7,8,6; - one area
canvas:5,5,3,91,93,90,90,7,8,6;208,211,208,287,294,294,293,209,207,210; - two areas
Point 0,0 is top left corner of the image.
You need to click on these points one by one to pass the challenge.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 16/39
11/15/2018 2captcha API
method String Yes post - defines that you're sending an image with multipart form
base64 - defines that you're sending a base64 encoded image
previousID String No Id of your previous request with the same captcha challenge
https://2captcha.com/2captcha-api#solving_recaptchav2_new 17/39
11/15/2018 2captcha API
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with
2captcha get reward: 10% of spendings of their software users.
Please note: you have to send the ReCaptcha image itself, not its screenshot. And you dont have to combine that image
with anything you like, just send it as it is.
Max size for ReCaptcha image is 100 kB.
Max size for imginstructions is 25 kB.
action String Yes get - get the asnwer for your captcha
http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=2122988149
Go up
ReCaptcha V1
ReCaptcha V1 is old and mostly replaced with ReCaptcha V2, but you still can find it on some websites.
1. Download the page from the noscript element src link and find the element with id recaptcha_challenge_field in the source
code of the page.
3. Submit the image with HTTP POST request to our server in the same way as for Normal Captcha.
The remaining part of the process is absolutely the same as for Normal Captchas so please refer to the description of Solving
Normal Captcha process.
ClickCaptcha
This method allows you to solve any captcha that requires clicking on images, like Shapchat's Ghost Captcha, ReCaptcha
V2, ASIRRA, etc.
2. Submit a HTTP POST request to our API URL: http://2captcha.com/in.php providing coordinatescaptcha parameter set to 1.
Server accepts images in multipart or base64 format.
You can provide instruction as text using textinstructions parameter, but it's not obligatory if the instruction is already
indicated on the image.
4. Make a 5 seconds timeout and submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
Go up
If captcha is already solved server will return the answer with coordinates of points where you have to click, for example:
OK|coordinate:x=39,y=59;x=252,y=72. Where the point with x=0,y=0 is the upper left corner of the image.
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 20/39
11/15/2018 2captcha API
method String Yes post - defines that you're sending an image with multipart form
Go up
base64 - defines that you're sending a base64 encoded image
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with
2captcha get reward: 10% of spendings of their software users.
action String Yes get - get the asnwer for your captcha
https://2captcha.com/2captcha-api#solving_recaptchav2_new 21/39
11/15/2018 2captcha API
http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=2122988149
Go up
RotateCaptcha
RotateCaptcha is a type of captcha where you have to rotate images to solve it. The most popular is FunCaptcha.
2. Optionally: determine the angle for one rotation step and provide it as a value for angle parameter.
If not defined we'll use the default value for FunCaptcha: 40 degrees.
3. Submit images to our server with HTTP POST request to our API URL: http://2captcha.com/in.php setting method
parameter to rotatecaptcha. Server accepts images only in multipart format.
Server will return captcha ID or an error code if something went wrong.
4. Make a 5 seconds timeout and submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
If captcha is already solved server will return the answer with angles for each image like: OK|40|200|-120.
Positive values mean that images should be rotated clockwise.
Negative values mean that images should be rotated counter-clockwise.
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
If something went wrong server will return an error code.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 22/39
11/15/2018 2captcha API
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with 2captcha get
reward: 10% of spendings of their software users.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 23/39
11/15/2018 2captcha API
action String Yes get - get the asnwer for your captcha
1. You need to locate public key of FunCaptcha. There are two ways to find it: you can locate funcaptcha's div element and
check the value of data-pkey parameter or you can find the input element with name fc-token and then extract the key
indicated after pk from the value of this element.
2. Submit a HTTP GET or POST request to our API URL: http://2captcha.com/in.php with method set to funcaptcha and
provide the value found on previous step as value for publickey and full page URL as value for pageurl. Sending proxies is
not obligatory ar the moment but it's recommended.
You can find the full list of parameters in the table below.
3. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON
{"status":1,"request":"2122988149"} if json parameter was used.
Otherwise server will return an error code.
4. Make a 10-20 seconds timeout then submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the
result.
The full list of parameters is in the table below.
If captcha is already solved server will respond in plain text or JSON and return the answer token that looks like:
3084f4a302b176cd7.96368058|r=ap-southeast-1|guitextcolor=%23FDD531|metabgclr=%23FFFFFF|metaiconclr=%23202122|meta=3|
https://2captcha.com/2captcha-api#solving_recaptchav2_new 24/39
11/15/2018 2captcha API
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
Go up
If something went wrong server will return an error code.
5. Locate the element with id fc-token and put the token into value of this element.
Please note: if you use nojs=1 parameter API will return just first part of token string like this:
3084f4a302b176cd7.96368058|r=ap-southeast-1 and you got to build the full string using the original value of fc-
token
6. Do the rest what you need to do on the website: submit a form or click on a button or something else.
method String Yes funcaptcha - defines that you're sending a FunCaptcha with token method
nojs Integer No Tells us to solve FunCaptcha without javascript enabled. Can be used in case when
Default: normal method doesn't work for some reason.
0 Important: please note that we will return just a part of the token in that case. More info
above.
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
soft_id Integer No ID of software developer. Developers who integrated their software with 2captcha get
reward: 10% of spendings of their software users.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 25/39
11/15/2018 2captcha API
action String Yes get - get the asnwer for your captcha
KeyCaptcha
KeyCaptcha is a type of captcha where you have to solve a simple puzzle.
s_s_c_user_id
s_s_c_session_id
s_s_c_web_server_sign
s_s_c_web_server_sign2
2. Submit a HTTP GET or POST request to our API URL: http://2captcha.com/in.php with method set to keycaptcha and
provide values found on previous step in your request as values for corresponding request parameters and also full page
URL as value for pageurl.
You can find the full list of parameters in the table below.
3. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON
{"status":1,"request":"2122988149"} if json parameter was used.
Otherwise server will return an error code.
4. Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the
result.
The full list of parameters is in the table below.
If captcha is already solved server will respond in plain text or JSON and return the answer that looks like:
https://2captcha.com/2captcha-api#solving_recaptchav2_new 26/39
11/15/2018 2captcha API
ebdb5a6bf76da6887db60ef2041ab946|9006dc725760858e4c0715b835472f22|http://back10.keycaptcha.com/swfs/ckc/5bded85426de
Go up
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
If something went wrong server will return an error code.
5. Locate and delete the following block which inclides keycaptcha JavaScript file:
<div id="div_for_keycaptcha"...>...</div>
Please note: sometimes content on the page is generated dynamically and you will not see these elements in HTML
source or they can differ a little bit.
In such cases you have to explore the source of the page and find JavaScript code that generates the content.
"Inspect" option in Google Chrome can help in that.
6. Locate the element with id="capcode" and change it's value to the response received from our server.
All these tasks can be easily automated. Check the example of JavaScript code
(https://github.com/2captcha/2captcha-api-
examples/blob/master/KeyCaptcha%20Examples/JavaScript/keycaptcha.js) that can do that right in browser's
console.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 27/39
11/15/2018 2captcha API
pingback String No URL for pingback (callback) response that will be sent when captcha is solved.
URL should be registered on the server. More info here.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 28/39
11/15/2018 2captcha API
soft_id Integer No ID of software developer. Developers who integrated their software with
2captcha get reward: 10% of spendings of their software users.
action String Yes get - get the asnwer for your captcha
Language support
Our API allows you to set the language of captcha with lang parameter.
Each our worker can tell us which languages he speaks. When you submit a captcha with lang parameter we will distribute your
captcha to workers who speak the language. That allows you to solve non-latin and non-cyrillic captchas, for example chinese
or vietnamese.
ru Russian
es Spanish
pt Portuguese
uk Ukrainian
vi Vietnamese
fr French
https://2captcha.com/2captcha-api#solving_recaptchav2_new 29/39
11/15/2018 2captcha API
id Indonesian
Go up
ar Arab
ja Japanese
tr Turkish
de German
zh Chinese
fil Philippine
pl Polish
th Thai
it Italian
nl Nederlands (Dutch)
sk Slovak
bg Bulgarian
ro Romanian
hu Hungarian (Magyar)
ko Korean
cs Czech
az Azerbaijani
fa Persian (Farsi)
bn Bengali
el Greek
lt Lithuanian
lv Latvian
sv Swedish
sr Serbian
hr Croatian
https://2captcha.com/2captcha-api#solving_recaptchav2_new 30/39
11/15/2018 2captcha API
he Hebrew
Go up
hi Hindi
nb Norwegian
sl Slovenian
da Danish
uz Uzbek
fi Finnish
ca Catalan
ka Georgian
ms Malay
te Telugu
et Estonian
ml Malayalam
be Belorussian
kk Kazakh
mr Marathi
ne Nepali
my Burmese
bs Bosnian
hy Armenian
mk Macedonian
pa Punjabi (Punjabi)
Error Handling
It's very important to use proper error handling in your code to avoid suspension of your account and service interruption.
Normally if something is wrong with your request server will return an error.
Below you can find tables with lists of errors with descriptions:
https://2captcha.com/2captcha-api#solving_recaptchav2_new 31/39
11/15/2018 2captcha API
Errors can be returned as plain text or as JSON if you provided json=1 parameter.
In very rare cases server can return HTML page with error text like 500 or 502 - please keep it in mind and handle such cases
correctly.
If you received anything that doesn't looks like the answer or error code - make a 5 seconds timeout and then retry your
request.
ERROR_KEY_DOES_NOT_EXIST The key you've provided does not exists. Stop sending requests. Check
your API key.
ERROR_ZERO_BALANCE You don't have funds on your account. Stop sending requests.
Deposit your account to
continue solving captchas.
ERROR_PAGEURL pageurl parameter is missing in your request. Stop sending requests and
change your code to provide
valid pageurl parameter.
More info.
ERROR_NO_SLOT_AVAILABLE You can receive this error in two cases: If you received this error,
1. If you solve ReCaptcha: the queue of your don't try to submit your
captchas that are not distributed to workers is too request again immediately.
long. Queue limit changes dynamically and depends Make 2-3 seconds timeout
on total amount of captchas awaiting solution and and then retry to submit your
usually it’s between 50 and 100 captchas. request.
2. If you solve Normal Captcha: your maximum rate
for normal captchas is lower than current rate on the
server.
You can change your maximum rate in your
account's settings (https://2captcha.com/setting).
ERROR_ZERO_CAPTCHA_FILESIZE Image size is less than 100 bytes. Check the image file.
ERROR_TOO_BIG_CAPTCHA_FILESIZE Image size is more than 100 kB. Check the image file.
ERROR_WRONG_FILE_EXTENSION Image file has unsupported extension. Accepted Check the image file.
extensions: jpg, jpeg, gif, png.
ERROR_IMAGE_TYPE_NOT_SUPPORTED Server can't recognize image file type. Check the image file.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 32/39
11/15/2018 2captcha API
ERROR_UPLOAD Server can't get file data from your POST-request. You got to fix your code that
Go up
That happens if your POST-request is malformed or makes POST request.
base64 data is not a valid base64 image.
ERROR_IP_NOT_ALLOWED The request is sent from the IP that is not on the list Check the list of your allowed
of your allowed IPs. IPs here
(https://2captcha.com/iplist).
IP_BANNED Your IP address is banned due to many frequent To lift the ban, please, contact
attempts to access the server using wrong our support team.
authorization keys.
ERROR_BAD_TOKEN_OR_PAGEURL You can get this error code when sending ReCaptcha Explore code of the page
V2. That happens if your request contains invalid carefully to find valid pageurl
pair of googlekey and pageurl. The common reason and sitekey values.
for that is that ReCaptcha is loaded inside an iframe
hosted on another domain/subdomain.
ERROR_GOOGLEKEY You can get this error code when sending ReCaptcha Check your code that gets the
V2. That means that sitekey value provided in your sitekey and makes requests to
request is incorrect: it's blank or malformed. our API.
ERROR_CAPTCHAIMAGE_BLOCKED You've sent an image that is marked in our database Try to override website's
as unrecognizable. limitations.
Usually that happens if the website where you found
the captcha stopped sending you captchas and
started to send "deny access" image.
MAX_USER_TURN You made more than 60 requests to in.php within 3 Set at least 100 ms timeout
seconds. between requests to in.php.
Your account is banned for 10 seconds. Ban will be
lifted automatically.
ERROR: NNNN Where NNNN is numeric error code. You should set proper
You exceeded request limit and your account is timeouts. Please refer to
temporary suspended. Request limits for more info.
ERROR_CAPTCHA_UNSOLVABLE We are unable to solve your captcha - three of our workers You can retry to send your
were unable solve it or we didn't get an answer within 90 captcha.
seconds (300 seconds for ReCaptcha V2).
We will not charge you for that request.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 33/39
11/15/2018 2captcha API
ERROR_WRONG_USER_KEY You've provided key parameter value in incorrect format, it Stop sending requests. Check
Go up
should contain 32 symbols. your API key.
ERROR_KEY_DOES_NOT_EXIST The key you've provided does not exists. Stop sending requests. Check
your API key.
ERROR_WRONG_ID_FORMAT You've provided captcha ID in wrong format. The ID can Check the ID of captcha or
contain numbers only. your code that gets the ID.
ERROR_BAD_DUPLICATES Error is returned when 100% accuracy feature is enabled. You can retry to send your
The error means that max numbers of tries is reached but captcha again.
min number of matches not found.
REPORT_NOT_RECORDED Error is returned to your complain request if you already Make sure that you're sending
complained lots of correctly solved captchas. complain requests only for
incorrectly solved captchas.
ERROR: NNNN Where NNNN is numeric error code. You should set proper
You exceeded request limit and your account is temporary timeouts. Please refer to
suspended. Request limits for more info.
Request limits
Please remember and understand that each of your requests to our API generates multuple requests to our databases. That's
why we ask to set proper timeouts for your requests and use proper error handling for cases when server returns an error (error
message, HTTP error or HTML page with error).
For example:
If server returns ERROR_NO_SLOT_AVAILABLE make a 5 seconds timeout before sending next request.
If server returns ERROR_ZERO_BALANCE set the timeout to 60 seconds.
After uploading a captcha wait a least 5 seconds (10-20 for recaptcha) and only then try to get the answer.
If captcha is not solved yet - retry in 5 seconds.
If your timeouts are configured incorrectly your account or IP address will be temporary blocked and server will return an error.
See the list of error codes in the table below.
ERROR: 1002 5 minutes You received 120 ERROR_ZERO_BALANCE errors in one minute because your balance is
out
https://2captcha.com/2captcha-api#solving_recaptchav2_new 34/39
11/15/2018 2captcha API
ERROR: 1003 30 seconds You are getting ERROR_NO_SLOT_AVAILABLE because you are uploading many captchas
Go up
and server has a long queue of your captchas that are not distributed to workers.
You received three times more errors than amount of captchas you sent (but not less
than 120 errors). Increase the timeout if you see this error.
ERROR: 1004 10 minutes Your IP address is blocked because there were 5 requests with incorrect API key from
your IP.
ERROR: 1005 5 minutes You are making too many requests to res.php to get answers.
We use the following rule to block your account: R > C * 20 + 1200
Where:
R - the amount of your requests
C - the amount of captchas you've uploaded
That means that you don't have to make more than 20 requests to res.php per each
captcha.
Please remember that balance request sent to res.php also counts!
To get your answer faster without a risk to be blocked you can use pingback feature and
we will send you the answer when your captcha is solved.
MAX_USER_TURN 10 seconds You made more than 60 requests to in.php within 3 seconds. Set at least 100 ms timeout
between requests to in.php.
Using proxies
Proxies can be used to solve ReCaptcha V2 and FunCaptcha from the same IP address as you load the page.
Using proxies is not obligatory at the moment but in future algorithms of ReCaptcha and FunCaptcha can be changed and
it will be required.
And even now some websites check IP address used for solving ReCaptcha V2. So we recommend you to be ready for these
changes.
If you send us the proxy, we check it's availability trying to open the website through you proxy, and if we can't do that we will
not use your proxy.
If we're able to use your proxy - we'll load the ReCaptcha through it for solving.
We don't have our own proxy servers that we can offer to you so you have to use 3rd-party services or setup your own proxy.
We support the following proxy types: SOCKS4, SOCKS5, HTTP, HTTPS with authentication by IP address or login and password.
If your proxy uses IP authentication you have to add our IP addresses to the list of allowed IPs of the proxy:
138.201.188.166
Then provide your proxy IP address and port as a value for proxy parameter.
And the type of your proxy as a value for proxytype parameter.
If your proxy uses login/password authentication you have to include your credentials in proxy parameter.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 35/39
11/15/2018 2captcha API
Go up
POST parameter Type Required Description
proxy String No Format for IP authentication: IP_address:PORT
Example: proxy=123.123.123.123:3128
Format for login/password authentication: login:password@IP_address:PORT
Example: proxy=proxyuser:[email protected]:3128
Pingback (callback)
We provide a pingback (callback) option that allows you to get the answer for your captcha automatically when it's ready.
It allows you to get answers without making requests to http://2captcha.com/res.php and also allows you to avoid account
suspension.
Important: pingback domain/IP address can be registered only from the same IP address so you got to send register request
from your server.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 36/39
11/15/2018 2captcha API
Request examples
Register pingback:
http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=add_pingback&addr=mysite.com
http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get_pingback&json=1
http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=del_pingback&addr=all
If moderator decides that anwers were in fact incorrect we'll return funds to your balance.
Your reports also help us to ban workers that are making too many mistakes.
Important: don't try to report correctly solved captchas. If you do that your account will be banned.
Please understand that moderators are humans too and they can also make mistakes, don't contact us if moderator marked few
incorrect answers as correct.
Server will return OK_REPORT_RECORDED response to your request. Or an error code if something went wrong.
If you're getting too many incorrectly solved captchas you may provide additional parameters with your captcha to help wokers
to solve it correctly
https://2captcha.com/2captcha-api#solving_recaptchav2_new 37/39
11/15/2018 2captcha API
Additional methods
Go up
You can also get some additional information with our API, like balance, current rate, etc.
Please check available parameters in the table below.
Code Examples
You can find code examples in our GitHub repo (https://github.com/2captcha/2captcha-api-examples) or simply searching
2captcha OR rucaptcha (https://github.com/search?q=2captcha+OR+rucaptcha) on GitHub. If code is made for rucaptcha.com
just replace the URL to 2captcha.com, API is the same.
Sandbox
We provide Sandbox mode that allows you to see and solve your captchas by yourself.
You can enable Sandbox mode in your settings (https://2captcha.com/setting)
Important: please note that captchas sent in Sandbox mode are also charged.
When Sandbox mode is enabled your captchas will not be distributed to wokers and you will see them in Workers Interface
(https://2captcha.com/cabinet/)
Important: It's not possible to use SandBox mode for ReCaptcha V2.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 38/39
11/15/2018 2captcha API
Go up
Copying any part of this website [email protected] English
without the explicit permission of the
(/)
website owner is illegal.
https://2captcha.com/2captcha-api#solving_recaptchav2_new 39/39