Categories
Development

How to improve your scraper with “Bypass CAPTCHA”

If you develop an application for web scraping then it would be really nice to upgrade it with automatic captcha recognition.  “Bypass CAPTCHA” service allows you to do this very easily since its focus is on use in third-party software. In this post I’ll show you how easy it is to extend your scraper using this service.

About “Bypass CAPTCHA”

“Bypass CAPTCHA” is a captcha recognition service that uses human labor for decoding captcha images. The cost is about $0.007 per each correctly recognized captcha. Using this service in your application allows you to  save your customers from manual captcha solving just for a small fee.

What makes this service different from others (like DeathByCaptcha) is that the user of your application doesn’t need to have his own account in a captcha decoding service – everything is already built into the application. All the integration is done seamlessly for the end user. It is very convenient for customers and, thus, may give your software an additional competitive advantage.

More over, you can even earn money by affiliating. “Bypass CAPTCHA” offers you 20% of all income they receive from all customers referenced  from you.

How to integrate “Bypass CAPTCHA” into your application

Purchasing credits

First of all you need to buy some credits. The minimum order is $14 for 2000 credits (recognitions), but the more you buy, the cheaper the credits are. Also you can pay using bitcoins.

If you plan to use the service consistently for a long period of time, you may subscribe to automatic monthly payments which will save you from having to send the payments manually.

When you complete the purchase, you will receive a new key filled with the purchased credit amount. Later you will use this key as an identification when you use the service. Optionally, you can refill your old key which is especially useful when you have already integrated it into your application.

If you need some free credits for testing you can contact their support, and they will kindly offer them to you.

Connecting to the service via API

You can find a lot of examples for how to connect to the “Bypass CAPTCHA” service in many languages. For example, if you develop your application in Java, then to connect to the service is as simple as the following piece of code (we took it right from the official API):

package javaapi;

public class Program
{
	public static void main(String[] args)
	{
		String key = "8544174325111181684966f4cc6d4a5383237c6b";
		String img_fn = "captcha.jpg";

		System.out.println("Decoding");
		ApiResult ret = BypassCaptchaApi.Submit(key, img_fn);
		if(!ret.IsCallOk)
		{
			System.out.println("Error: " + ret.Error);
			return;
		}

		String value = ret.DecodedValue;
		System.out.println("Using the decoded value: " + value);
		System.out.println("Suppose it is correct.");
		ret = BypassCaptchaApi.SendFeedBack(key, ret, true);
		if(!ret.IsCallOk)
		{
			System.out.println("Error: " + ret.Error);
			return;
		}

		ret = BypassCaptchaApi.GetLeft(key);
		if(!ret.IsCallOk)
		{
			System.out.println("Error: " + ret.Error);
			return;
		}

		System.out.println("There are " + ret.LeftCredits + " credits left on this key");
		System.out.println("OK");
	}
}

From this short example you can see that the API allows one to decode captcha image, to send feedback to the service reporting whether the recognition was correct or not and to request amount of credits left in your account.

Connecting to the service via HTTP

Intrinsically all requests to the service are sent via HTTP POST with parameters encoded in application/x-www-form-urlencoded format. This means that you can easily connect to “Bypass CAPTCHA” using any language that allows sending HTTP POST requests.

For example, to send a recognition request you need to send HTTP POST request to http://bypasscaptcha.com/upload.php, having the following parameters:

  • base64_code = 1 – says to the service that you will send the captcha image in “file” parameter encoded in Base64 format
  • get_task_id =1 – any unique recognition task identifier (determined by you)
  • key = 9415009dbc36bf52598979824dd71d63 – the secret key you got when you purchased the credits
  • file = R0lGODlhvgBKALMAA… – Base64 encoded image of capture

As a response you will get something like

Value jw62k
TaskId 340153707

The first line contains the captcha’s text and the second line contains a unique task identifier (defined by the service).

Also, instead of sending file content encoded in Base64 format, you can send files using HTTP file upload. To do this you just need to omit the get_task_id parameter.

Example

Let’s say you need to recognize the following captcha image:

Captcha example

Here are the parameters I used and the result I got when I sent the HTTP request via hurl.it:
Bypass Captcha Request example
You can see here that it took 6.79 seconds to process the request and the result was correct.

Conclusion

If your application or service needs to recognize captchas then you can take advantage of the “Bypass CAPTCHA” service. It offers a very simple-to-implement integration mechanism based on HTTP POST requests and allows your software to solve captchas automatically for as little as $0.007 per recognition.

Finally, I’d like hear from you about your experiences using “Bypass CAPTCHA” (or similar services). Feel free to add comments below!

9 replies on “How to improve your scraper with “Bypass CAPTCHA””

Lol, that’s so bad, guys, paying is not baypassing.
For people going here, don’t trust because this article goes in google’s first page it’s the better answer, in fact, it’s really bad.

Leave a Reply to Zob Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.