So recently I was surfing the web and I’ve stumbled upon some interesting website called 2captcha. They basically offer API for solving, almost, any type of captcha. But first, let’s get straight with terms.
What is a captcha?
According to Google: CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a type of security measure known as challenge-response authentication. CAPTCHA helps protect you from spam and password decryption by asking you to complete a simple test that proves you are human and not a computer trying to break into a password-protected account.
What does this mean in practice? We all know those boring “I am not a robot” things. Well, that is it.
What is 2captcha
2captcha is software for solving captcha that offers an API for several programming languages. Basically, the user uploads an image of a captcha using their API, and as a response receives an ID. After that, the system automatically assigns a captcha to the first free worker. This worker, a captcha solver, solves the captcha and returns it to the system. The system, using the previously assigned ID, sends an answer to the respective user.
If in any case, this process takes longer than usual, the client is being notified about it and asked to wait a little longer. Also, if the captcha is incorrectly solved, the client has a right to “complain”.
If the client complains about an incorrect captcha, senior workers (with a lot of experience and a high correct score) review it, and if the captcha was incorrect a refund is issued.
Who can use 2captcha.com
This service can use anyone, but it is built for the applications that need to solve a high number of captchas. The average time for solving a single captcha is around 10s, but depending on captcha type it could take less or more time. For example, the average time for a single reCaptcha is 21s. Also, fees are really, really small. 1000 normal captchas are charged as low as $0.50 (yeah, you read right), while 1000 reCaptcha images cost around $1.00, and reCAPTCHA v2 token $2.99 which is, let’s be honest, a super low price for such annoying things.
Since everything can be automated, from sending credentials and captcha, to receiving an answer, it is awesome for those who e.g. have a web crawler. There are some websites that require us to complete a captcha to enter a website if they suspect that we are a bot. This usually happens if we visit from incognito mode. The same happens to web crawlers, especially those who are not “known” ones, like Google, Bing, Yahoo, etc.
The second example would be if we try to collect data from a website (using code like PHP, Python, Java, Nodejs, etc.) that doesn’t have an API but has form. We send a query to that website and submit it, but then that website asks us to complete a captcha in order to show results. The perfect example for this would be Ahref’s keyword generator.
Basically, we can use 2captcha.com as a captcha solver for any case that requires us to complete a captcha, especially if there is a large amount, like in the examples above.
How to implement it
There are really just a few simple steps.
- First, register an account here
- After you successfully register, you need to top up your balance here (they really accept a lot of different payment processors)
- The final step is to check your Settings page for the API key. Copy this API key to your software and you’re good to go.
As we have mentioned earlier 2captcha offers API for several programming languages. It is implemented as any other API. If you want to see how to bypass captcha by using 2captcha’s API, there is an excellent article on dev.to – Bypassing hCaptcha with Python, or visit documentation.
Want to learn more
2captcha.com is very responsive on Twitter, so if there are any questions, you can contact them through DMs. Also, they have a website 2captcha.com where you can read more info on all those things we mentioned.
This is a sponsored article.