PHPackages                             2captcha/2captcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. 2captcha/2captcha

ActiveLibrary[API Development](/categories/api)

2captcha/2captcha
=================

PHP package for easy integration with 2captcha API

v1.2.4(3mo ago)88492.7k↓43.6%533MITPHPPHP &gt;=7.3CI failing

Since Jun 1Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/2captcha/2captcha-php)[ Packagist](https://packagist.org/packages/2captcha/2captcha)[ RSS](/packages/2captcha-2captcha/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (15)Used By (3)

[![](https://private-user-images.githubusercontent.com/38065632/351749209-37e1d860-033b-4cf3-a158-468fc6b4debc.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE3NDkyMDktMzdlMWQ4NjAtMDMzYi00Y2YzLWExNTgtNDY4ZmM2YjRkZWJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwMWE4MWMyYzY5NTIzMDYxYzg5OTk3YTAyYzE3NDRmYWM2M2NkODYwOGMzM2ExYTYxYjgzOTZkODNlYTQ5NjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.OtYzWSnylyBzxzdwr8_j0RrGO9qMuLqhrXkNMz_sdSw)](https://github.com/2captcha/2captcha-python)[![](https://private-user-images.githubusercontent.com/38065632/351642427-4d3b4541-34b2-4ed2-a687-d694ce67e5a6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDI0MjctNGQzYjQ1NDEtMzRiMi00ZWQyLWE2ODctZDY5NGNlNjdlNWE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyY2NkODY4ZWM1NmU0ODVjNzA5NmQ4MDcyYmYwY2Q0OTc1MTY4NDBhYmEzODBlNTg3MDUzM2IyMjMwNDY1MDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.H10F2T8JEHjT-l4NlMb3mHkEqlTe1XSFGb69mGg1R20)](https://github.com/2captcha/2captcha-javascript)[![](https://private-user-images.githubusercontent.com/38065632/351642571-ab22182e-6cb2-41fa-91f4-d5e89c6d7c6f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDI1NzEtYWIyMjE4MmUtNmNiMi00MWZhLTkxZjQtZDVlODljNmQ3YzZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzYzIzZjlkMjg1YmM2NmQ0YzMwMzFlYzNiYzlkMDljYjBjZGY1ZTc2NjUxODYzYTNiNWViZjVlZjZjYTYxODQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.h5sMNBcTrpSUi87xsyicGcbs_xZJlSE8Mjg4Od600Ow)](https://github.com/2captcha/2captcha-go)[![](https://private-user-images.githubusercontent.com/38065632/351642711-0270d56f-79b0-4c95-9b09-4de89579914b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDI3MTEtMDI3MGQ1NmYtNzliMC00Yzk1LTliMDktNGRlODk1Nzk5MTRiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0Mzg2MzU4MzA2ODk4YTAzYmQ2MWEwNzNjYTdjODMxMDBkYmE1OTEzZTU5Y2NjMGVjMjE0OGM2NjFiYzFkYmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.BfQ4m-Z8ZCBfF5p0Pa2xrsx63ELlGh31wsQUpfvIPvo)](https://github.com/2captcha/2captcha-ruby)[![](https://private-user-images.githubusercontent.com/38065632/351642824-36de8512-acfd-44fb-bb1f-b7c793a3f926.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDI4MjQtMzZkZTg1MTItYWNmZC00NGZiLWJiMWYtYjdjNzkzYTNmOTI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3OGRjOTYxYjU5ZGZhNDkwMmFmNzc3ZjAwYzI1YTM1ZTVjYzUyN2RmNWNkZmMzOTVkMjVhNTAxZmExNjM0MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.Xrd0frPkjS_4lCmbInJn3H6emhmipXKbcWtu0L42xJI)](https://github.com/2captcha/2captcha-cpp)[![](https://private-user-images.githubusercontent.com/38065632/351767412-c27d7db5-c20f-47c1-b252-96ee76503b9e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE3Njc0MTItYzI3ZDdkYjUtYzIwZi00N2MxLWIyNTItOTZlZTc2NTAzYjllLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkYTQ3ZTZlOTFiYzNiOTBkOWQ1OWJlMzc4YjE0MGZkMTRkMDJiNzFmNDc4ZWJkMWU2ZjFmMzNjNDkwMzE4NDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.kC_fdv9BJcgE0Tt6KFlq8EBPBTDJmv4fWuJP9teaHS4)](https://github.com/2captcha/2captcha-php)[![](https://private-user-images.githubusercontent.com/38065632/351643626-a3d923f6-4fec-4c07-ac50-e20da6370911.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDM2MjYtYTNkOTIzZjYtNGZlYy00YzA3LWFjNTAtZTIwZGE2MzcwOTExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4ZGY5MzNmMjAxYmNjMDMyZWUzYzJjMWQ2Y2MzYjM1ODExZjBlNzUyYjcwNWI1YWY4M2E0ZTJhNGNiYmUwZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.vapnSmovbvL7KNASIcMC1_JJBU8gc645t3kVi_IbzX8)](https://github.com/2captcha/2captcha-java)[![](https://private-user-images.githubusercontent.com/38065632/351643852-f4d449de-780b-49ed-bb0a-b70c82ec4b32.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2NDM4NTItZjRkNDQ5ZGUtNzgwYi00OWVkLWJiMGEtYjcwYzgyZWM0YjMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkZDUwMDg4YThiOTg1NTY3YzAxNmNlZDQ1ZWM0NWIxMTZhYTRmY2YzZDIyMzE0YzIxZDM5ZjY1MGI4NzIxNmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.RrtgSO_jDnj7wKYq_7yMFy77o8p4xvqh7SYua09Nuak)](https://github.com/2captcha/2captcha-csharp)

PHP Module for 2Captcha API (captcha solver)
============================================

[](#php-module-for-2captcha-api-captcha-solver)

The easiest way to quickly integrate [2Captcha](https://2captcha.com/) captcha solving service into your code to automate solving of any types of captcha. Examples of API requests for different captcha types are available on the [PHP captcha solver](https://2captcha.com/lang/php) page.

- [PHP Module for 2Captcha API (captcha solver)](#php-module-for-2captcha-api-captcha-solver)
    - [Installation](#installation)
        - [Composer](#composer)
        - [Manual](#manual)
    - [Configuration](#configuration)
        - [TwoCaptcha instance options](#twocaptcha-instance-options)
    - [Solve captcha](#solve-captcha)
        - [Captcha options](#captcha-options)
        - [Normal Captcha](#normal-captcha)
        - [Text Captcha](#text-captcha)
        - [reCAPTCHA v2](#recaptcha-v2)
        - [reCAPTCHA v3](#recaptcha-v3)
        - [FunCaptcha](#funcaptcha)
        - [GeeTest](#geetest)
        - [GeeTest V4](#geetest-v4)
        - [KeyCaptcha](#keycaptcha)
        - [Capy](#capy)
        - [Grid](#grid)
        - [Canvas](#canvas)
        - [ClickCaptcha](#clickcaptcha)
        - [Rotate](#rotate)
        - [Audio Captcha](#audio)
        - [Yandex](#yandex)
        - [Lemin Cropped Captcha](#lemin-cropped-captcha)
        - [Cloudflare Turnstile](#cloudflare-turnstile)
        - [Amazon WAF](#amazon-waf)
        - [Tencent](#tencent)
        - [MTCaptcha](#mtcaptcha)
        - [Cutcaptcha](#cutcaptcha)
        - [Friendly Captcha](#friendly-captcha)
        - [atbCAPTCHA](#atbcaptcha)
        - [DataDome](#datadome)
        - [CyberSiARA](#cybersiara)
        - [Prosopo](#prosopo)
        - [Temu](#temu)
        - [Captchafox](#captchafox)
        - [VK Captcha](#vk-captcha)
        - [VK Image](#vk-image)
        - [Altchacaptcha](#altchacaptcha)
        - [Binancecaptcha](#binancecaptcha)
        - [Yidun](#yidun)
        - [Alibaba](#alibaba)
    - [Other methods](#other-methods)
        - [send / getResult](#send--getresult)
        - [balance](#balance)
        - [report](#report)
    - [Proxies](#proxies)
    - [Error handling](#error-handling)
    - [Examples](#examples)
    - [Get in touch](#get-in-touch)
    - [Join the team 👪](#join-the-team-)
    - [License](#license)
        - [Graphics and Trademarks](#graphics-and-trademarks)

Installation
------------

[](#installation)

This package can be installed via composer or manually

### Composer

[](#composer)

```
composer require 2captcha/2captcha

```

### Manual

[](#manual)

Copy `src` directory to your project and then `require` autoloader (`src/autoloader.php`) where needed:

```
require 'path/to/autoloader.php';
```

Configuration
-------------

[](#configuration)

`TwoCaptcha` instance can be created like this:

```
$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY');
```

Also there are few options that can be configured:

```
$solver = new \TwoCaptcha\TwoCaptcha([
    'server'           => 'http://rucaptcha.com',
    'apiKey'           => 'YOUR_API_KEY',
    'softId'           => 123,
    'callback'         => 'https://your.site/result-receiver',
    'defaultTimeout'   => 120,
    'recaptchaTimeout' => 600,
    'pollingInterval'  => 10,
    'json'             => 1,
]);
```

### TwoCaptcha instance options

[](#twocaptcha-instance-options)

OptionDefault valueDescriptionsoftId4585your software ID obtained after publishing in [2captcha software catalog](https://2captcha.com/software)callback-URL of your web-sever that receives the captcha recognition result. The URl should be first registered in [pingback settings](https://2captcha.com/setting/pingback) of your accountdefaultTimeout120Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from `res.php` API endpointrecaptchaTimeout600Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from `res.php` API endpointpollingInterval10Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommendedjson0Json or String format response from `res.php` API endpoint, json = 1 returns JSON format responseImportant

Once `callback` is defined for `TwoCaptcha` instance, all methods return only the captcha ID and DO NOT poll the API to get the result. The result will be sent to the callback URL.

To get the answer manually use [getResult method](#send--getresult)

Solve captcha
-------------

[](#solve-captcha)

When you submit any image-based captcha use can provide additional options to help 2captcha workers to solve it properly.

### Captcha options

[](#captcha-options)

OptionDefault ValueDescriptionnumeric0Defines if captcha contains numeric or other symbols [see more info in the API docs](https://2captcha.com/2captcha-api#normal_post)minLength0minimal answer lengthmaxLength0maximum answer lengthphrase0defines if the answer contains multiple words or notcaseSensitive0defines if the answer is case sensitivecalc0defines captcha requires calculationlang-defines the captcha language, see the [list of supported languages](https://2captcha.com/2captcha-api#language)hintImg-an image with hint shown to workers with the captchahintText-hint or task text shown to workers with the captchaBelow you can find basic examples for every captcha type. Check out [examples directory](/examples) to find more examples with all available options.

### Normal Captcha

[](#normal-captcha)

[API method description.](https://2captcha.com/2captcha-api#solving_normal_captcha)

To bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.

```
$result = $solver->normal('path/to/captcha.jpg');
```

### Text Captcha

[](#text-captcha)

[API method description.](https://2captcha.com/2captcha-api#solving_text_captcha)

This method can be used to bypass a captcha that requires to answer a question provided in clear text.

```
$result = $solver->text('If tomorrow is Saturday, what day is today?');
```

### reCAPTCHA v2

[](#recaptcha-v2)

[API method description.](https://2captcha.com/2captcha-api#solving_recaptchav2_new)

Use this method to solve reCAPTCHA V2 and obtain a token to bypass the protection.

```
$result = $solver->recaptcha([
    'sitekey' => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
    'url'     => 'https://mysite.com/page/with/recaptcha',
]);
```

### reCAPTCHA v3

[](#recaptcha-v3)

[API method description.](https://2captcha.com/2captcha-api#solving_recaptchav3)

This method provides reCAPTCHA V3 solver and returns a token.

```
$result = $solver->recaptcha([
    'sitekey' => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
    'url'     => 'https://mysite.com/page/with/recaptcha',
    'version' => 'v3',
]);
```

### FunCaptcha

[](#funcaptcha)

[API method description.](https://2captcha.com/2captcha-api#solving_funcaptcha_new)

FunCaptcha (Arkoselabs) solving method. Returns a token.

```
$result = $solver->funcaptcha([
    'sitekey' => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
    'url'     => 'https://mysite.com/page/with/funcaptcha',
]);
```

### GeeTest

[](#geetest)

[API method description.](https://2captcha.com/2captcha-api#solving_geetest)

Method to solve GeeTest puzzle captcha. Returns a set of tokens as JSON.

```
$result = $solver->geetest([
    'gt'        => 'f1ab2cdefa3456789012345b6c78d90e',
    'challenge' => '12345678abc90123d45678ef90123a456b',
    'url'       => 'https://www.site.com/page/',
]);
```

### GeeTest V4

[](#geetest-v4)

[API method description.](https://2captcha.com/2captcha-api#geetest-v4)

Method to solve GeeTest V4 puzzle captcha. Returns a set of tokens as JSON.

```
$result = $solver->geetest_v4([
    'captchaId' => '72bf15796d0b69c43867452fea615052',
    'url'       => 'https://mysite.com/captcha.html',
]);
```

### KeyCaptcha

[](#keycaptcha)

[API method description.](https://2captcha.com/2captcha-api#solving_keycaptcha)

Token-based method to solve KeyCaptcha.

```
$result = $solver->keycaptcha([
    's_s_c_user_id'          => 10,
    's_s_c_session_id'       => '493e52c37c10c2bcdf4a00cbc9ccd1e8',
    's_s_c_web_server_sign'  => '9006dc725760858e4c0715b835472f22-pz-',
    's_s_c_web_server_sign2' => '2ca3abe86d90c6142d5571db98af6714',
    'url'                    => 'https://www.keycaptcha.ru/demo-magnetic/',
]);
```

### Capy

[](#capy)

[API method description.](https://2captcha.com/2captcha-api#solving_capy)

Token-based method to bypass Capy puzzle captcha.

```
$result = $solver->capy([
    'sitekey' => 'PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v',
    'url'     => 'http://mysite.com/',
    'api_server' => 'https://jp.api.capy.me/',
]);
```

### Grid

[](#grid)

[API method description.](https://2captcha.com/2captcha-api#grid)

Grid method is originally called Old reCAPTCHA V2 method. The method can be used to bypass any type of captcha where you can apply a grid on image and need to click specific grid boxes. Returns numbers of boxes.

```
$result = $solver->grid('path/to/captcha.jpg');
```

### Canvas

[](#canvas)

[API method description.](https://2captcha.com/2captcha-api#canvas)

Canvas method can be used when you need to draw a line around an object on image. Returns a set of points' coordinates to draw a polygon.

```
$result = $solver->canvas('path/to/captcha.jpg');
```

### ClickCaptcha

[](#clickcaptcha)

[API method description.](https://2captcha.com/2captcha-api#coordinates)

ClickCaptcha method returns coordinates of points on captcha image. Can be used if you need to click on particular points on the image.

```
$result = $solver->coordinates('path/to/captcha.jpg');
```

### Rotate

[](#rotate)

[API method description.](https://2captcha.com/2captcha-api#solving_rotatecaptcha)

This method can be used to solve a captcha that asks to rotate an object. Mostly used to bypass FunCaptcha. Returns the rotation angle.

```
$result = $solver->rotate('path/to/captcha.jpg');
```

### Audio

[](#audio)

[API method description.](https://2captcha.com/2captcha-api#audio)

This method can be used to solve a audio captcha

```
$result = $solver->audio('path/to/audio.mp3');
```

### Yandex

[](#yandex)

Use this method to solve Yandex and obtain a token to bypass the protection.

```
$result = $solver->yandex([
    'sitekey' => 'Y5Lh0tiycconMJGsFd3EbbuNKSp1yaZESUOIHfeV',
    'url'     => 'https://rutube.ru',
]);
```

### Lemin Cropped Captcha

[](#lemin-cropped-captcha)

[API method description.](https://2captcha.com/2captcha-api#lemin)

Use this method to solve Lemin and obtain a token to bypass the protection.

```
$result = $solver->lemin([
    'captchaId' => 'CROPPED_d3d4d56_73ca4008925b4f83a8bed59c2dd0df6d',
    'apiServer' => 'api.leminnow.com',
    'url'       => 'https://www.site.com/page/',
]);
```

### Cloudflare Turnstile

[](#cloudflare-turnstile)

[API method description.](https://2captcha.com/2captcha-api#turnstile)

Use this method to solve Turnstile and obtain a token to bypass the protection.

```
$result = $solver->turnstile([
    'sitekey' => '0x4AAAAAAAChNiVJM_WtShFf',
    'url'     => 'https://ace.fusionist.io',
]);
```

### Amazon WAF

[](#amazon-waf)

[API method description.](https://2captcha.com/2captcha-api#amazon-waf)

Use this method to solve Amazon WAF and obtain a token to bypass the protection.

```
$result = $solver->amazon_waf([
    'sitekey' => 'AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AF5H1K/siwSLK7RfstKtN5bAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglg',
    'url'     => 'https://non-existent-example.execute-api.us-east-1.amazonaws.com',
    'iv'      => 'test_iv',
    'context' => 'test_context'
]);
```

### Tencent

[](#tencent)

[API method description.](https://2captcha.com/2captcha-api#tencent)

Use this method to bypass Tencent.

```
$result = $solver->tencent([
    'sitekey' => '123456789',
    'url'     => 'https://www.site.com/page/',
]);
```

### MTCaptcha

[](#mtcaptcha)

[API method description.](https://2captcha.com/2captcha-api#mtcaptcha)

Use this method to bypass MTCaptcha.

```
$result = $solver->mt_captcha([
    'sitekey' => 'MTPublic-KzqLY1cKH',
    'url'     => 'https://2captcha.com/demo/mtcaptcha',
]);
```

### Cutcaptcha

[](#cutcaptcha)

[API method description.](https://2captcha.com/2captcha-api#cutcaptcha)

Use this method to bypass Cutcaptcha.

```
$result = $solver->cutcaptcha([
    'misery_key' => 'a1488b66da00bf332a1488993a5443c79047e752',
    'api_key'    => 'SAb83IIB',
    'url'        => 'https://example.cc/foo/bar.html',
]);
```

### Friendly Captcha

[](#friendly-captcha)

[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)

Use this method to bypass Friendly Captcha.

```
$result = $solver->friendly_captcha([
    'sitekey' => '2FZFEVS1FZCGQ9',
    'url'     => 'https://example.com/',
]);
```

### atbCAPTCHA

[](#atbcaptcha)

[API method description.](https://2captcha.com/2captcha-api#atb-captcha)

Use this method to bypass atbCAPTCHA.

```
$result = $solver->atb_captcha([
    'sitekey'     => 'af23e041b22d000a11e22a230fa8991c',
    'api_server' => 'https://cap.aisecurius.com',
    'url'        => 'https://example.com/',
]);
```

### DataDome

[](#datadome)

[API method description.](https://2captcha.com/2captcha-api#datadome)

Use this method to bypass DataDome.

Important

To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies](https://2captcha.com/proxy/residential-proxies).

```
$result = $solver->datadome([
    'captcha_url'     => 'https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAA...P~XFrBVptk&t=fe&referer=https%3A%2F%2Fhexample.com&s=45239&e=c538be..c510a00ea',
    'userAgent' => 'https://cap.aisecurius.com',
    'url'        => 'https://example.com/',
    'proxy'       => [
        'type' => 'HTTPS',
        'uri'  => 'username:str0ngP@$$W0rd@1.2.3.4:4321',
    ],
]);
```

### CyberSiARA

[](#cybersiara)

[API method description.](https://2captcha.com/2captcha-api#cybersiara)

Use this method to bypass CyberSiARA.

```
$result = $solver->cybersiara([
    'master_url_id' => 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
    'pageurl' => 'https://demo.mycybersiara.com/',
    'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
]);
```

### Prosopo

[](#prosopo)

[API method description.](https://2captcha.com/2captcha-api#prosopo-procaptcha)

Use this method to bypass Prosopo.

```
    $result = $solver->prosopo([
        'sitekey' => '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm',
        'url'     => 'https://www.twickets.live/',
    ]);
```

### Temu

[](#temu)

[API method description.](https://2captcha.com/2captcha-api#temucaptcha)

Use this method to bypass Temu.

```
    $result = $solver->temu([
        'body'  => $body,
        'part1' => $part1,
        'part2' => $part2,
        'part3' => $part3,
    ]);
```

### Captchafox

[](#captchafox)

[API method description.](https://2captcha.com/2captcha-api#captchafox)

Use this method to bypass Captchafox.

```
    $result = $solver->captchafox([
        'sitekey' => 'sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
        'url'     => 'https://mysite.com/page/with/captchafox',
        'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
        'api_server' => 'https://mam.example.com',
        'proxy'     => [
            'type' => 'HTTPS',
            'uri'  => 'login:password@IP_address:PORT',
        ],
    ]);
```

### VK Image

[](#vk-image)

[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)

We offer two methods to solve this type of captcha - token-based and image-based.

We use the body (image in base64 format) or file (image as file) and steps parameters. You can get both values from the response to the request [https://api.vk.com/method/captchaNotRobot.getContent?v={API\_VER}](https://api.vk.com/method/captchaNotRobot.getContent?v=%7BAPI_VER%7D) when loading the captcha widget on the page.

```
    $result = $solver->vkImage([
        'body' => base64_encode(file_get_contents(__DIR__ . '/images/vk.jpg')),
        'steps' => '[5,12,22,24,21,23,10,7,2,8,19,18,8,24,21,22,11,14,16,5,18,20,4,21,12,6,0,0,11,12,8,20,19,3,14,8,9,13,16,24,18,3,2,23,8,12,6,1,11,0,20,15,19,22,17,24,8,0,12,5,19,14,11,6,7,14,23,24,23,20,4,20,6,12,4,17,4,18,6,20,17,5,23,7,10,2,8,9,5,4,17,24,11,14,4,10,12,22,21,2]',
    ]);
```

### VK Captcha

[](#vk-captcha)

[API method description.](https://2captcha.com/2captcha-api#vk-captcha)

Token-based method requires redirect\_uri parameter, as well as proxy and userAgent. The value of the redirect\_uri parameter can be found in the response to requests to the VK API that return captchas.

```
$tokenBasedResult = $solver->vkCaptcha([
        'redirect_uri' => 'https://id.vk.com/not_robot_captcha?domain=vk.com&session_token=eyJ....HGsc5B4LyvjA&variant=popup&blank=1',
        'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
        'proxy' => [
            'type' => 'HTTPS',
            'uri' => 'login:password@IP_address:PORT',
        ],
    ]);
```

### Altchacaptcha

[](#altchacaptcha)

[API method description.](https://2captcha.com/2captcha-api#altchacaptcha)

Use this method to bypass Altchacaptcha.

```
    $result = $solver->altchacaptcha([
        'challenge_url' => 'https://.../captcha/api/altcha/challenge',
        'pageurl'     => 'https://site.com/',
    ]);
```

### Binancecaptcha

[](#binancecaptcha)

[API method description.](https://2captcha.com/2captcha-api#binance)

Use this method to bypass Binance.

```
    $result = $solver->binance([
        'sitekey' => 'login',
        'url'     => 'https://example.com/page-with-binance',
        'validate_id' => 'cb0bfef...e54ecd57b'
    ]);
```

### Yidun

[](#yidun)

[API method description.](https://2captcha.com/2captcha-api#yidun)

Use this method to bypass Yidun.

```
    $result = $solver->yidun([
        'sitekey' => '0f743r3g1...8rz3grz0ym5',
        'url'     => 'https://example.com/page-with-yidun'
    ]);
```

### Alibaba

[](#alibaba)

[API method description.](https://2captcha.com/2captcha-api#alibaba)

Use this method to bypass Alibaba captcha.

```
    $result = $solver->alibaba([
        'url'     => 'https://example.com/page-with-alibaba',
        'sceneId' => 'bxs_login',
        'prefix'  => 'a',
    ]);
```

The result contains a JSON token with `sceneId`, `certifyId`, `deviceToken`, and `data` fields.

Other methods
-------------

[](#other-methods)

### send / getResult

[](#send--getresult)

These methods can be used for manual captcha submission and answer polling.

```
$id = $solver->send(['file' => 'path/to/captcha.jpg', ...]);

sleep(20);

$code = $solver->getResult($id);
```

### balance

[](#balance)

[API method description.](https://2captcha.com/2captcha-api#additional-methods)

Use this method to get your account's balance

```
$balance = $solver->balance();
```

### report

[](#report)

[API method description.](https://2captcha.com/2captcha-api#complain)

Use this method to report good or bad captcha answer.

```
$solver->report($id, true); // captcha solved correctly
$solver->report($id, false); // captcha solved incorrectly
```

Proxies
-------

[](#proxies)

You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, keycaptcha, capy puzzle, lemin, turnstile, amazon waf and etc. The proxy will be forwarded to the API to solve the captcha.

We have our own proxies that we can offer you. [Buy residential proxies](https://2captcha.com/proxy/residential-proxies) for avoid restrictions and blocks. [Quick start](https://2captcha.com/proxy?openAddTrafficModal=true).

Example solving reCAPTCHA V2 using proxy:

```
$result = $solver->recaptcha([
    'sitekey'   => '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
    'url'       => 'https://mysite.com/page/with/recaptcha',
    'proxy'     => [
        'type' => 'HTTPS',
        'uri'  => 'login:password@IP_address:PORT',
    ],
]);
```

Error handling
--------------

[](#error-handling)

If case of an error captch solver throws an exception. It's important to properly handle these cases. We recommend to use `try catch` to handle exceptions.

```
try {
    $result = $solver->text('If tomorrow is Saturday, what day is today?');
} catch (\TwoCaptcha\Exception\ValidationException $e) {
    // invalid parameters passed
} catch (\TwoCaptcha\Exception\NetworkException $e) {
    // network error occurred
} catch (\TwoCaptcha\Exception\ApiException $e) {
    // api respond with error
} catch (\TwoCaptcha\Exception\TimeoutException $e) {
    // captcha is not solved so far
}
```

Examples
--------

[](#examples)

Examples of solving all supported captcha types are located in the [examples](/examples) directory.

Get in touch
------------

[](#get-in-touch)

[![](https://private-user-images.githubusercontent.com/38065632/351619983-539df209-7c85-4fa5-84b4-fc22ab93fac7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2MTk5ODMtNTM5ZGYyMDktN2M4NS00ZmE1LTg0YjQtZmMyMmFiOTNmYWM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiNTA5OTRjOGExMDg5ODM0NTkzYTI1MzczODgyODIxZmMyODVhMmM4ZTE2OWI3YWZjN2VhNGUzMmJkMjI5NzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.1i5p6BGmB4ZPAmnTtsoOtz7-hE8bTUAQ48VMQ4Zlf6M)](mailto:support@2captcha.com)[![](https://private-user-images.githubusercontent.com/38065632/351620509-be044db5-2e67-46c6-8c81-04b78bd99650.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2MjA1MDktYmUwNDRkYjUtMmU2Ny00NmM2LThjODEtMDRiNzhiZDk5NjUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhOWRjZTBlYTM3ZDA2M2NlNTNjZmI0ZTBmODMyZmMxN2NhZGEzZjk0ODBkYmRmNTk3OTliZDc1NDY1MDFjMDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.2fOJdV36PSZYmNDPbW-eQCxfVkrAYOJOgBPV0nUAkgA)](https://2captcha.com/support/tickets/new)

Join the team 👪
---------------

[](#join-the-team-)

There are many ways to contribute, of which development is only one! Find your next job. Open positions: AI experts, scrapers, developers, technical support, and much more! 😍

[![](https://private-user-images.githubusercontent.com/38065632/351622845-36d23ef5-7866-4841-8e17-261cc8a4e033.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjUwNDUsIm5iZiI6MTc4MjkyNDc0NSwicGF0aCI6Ii8zODA2NTYzMi8zNTE2MjI4NDUtMzZkMjNlZjUtNzg2Ni00ODQxLThlMTctMjYxY2M4YTRlMDMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE2NTIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlZmVlODhlYjIyODA5MTQ5M2I4NjliMjkzNTZkMThjYmVmYWExNThlNzliNTdiYzJmNGY3NGI0OTVlODg2YjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.bw5K4oMUMei6ZvCsj05C1xEDh3DJwHxF2JA5Shvw3ws)](mailto:job@2captcha.com)

License
-------

[](#license)

The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.

### Graphics and Trademarks

[](#graphics-and-trademarks)

The graphics and trademarks included in this repository are not covered by the MIT License. Please contact [support](mailto:support@2captcha.com) for permissions regarding the use of these materials.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~163 days

Recently: every ~154 days

Total

14

Last Release

93d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.2.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a1be7585c065659a20f60741268d5c5057a80fcdb78f2b67e56310c97408e7d?d=identicon)[2captcha](/maintainers/2captcha)

---

Top Contributors

[![zatvorius](https://avatars.githubusercontent.com/u/9048285?v=4)](https://github.com/zatvorius "zatvorius (29 commits)")[![victorkowalski](https://avatars.githubusercontent.com/u/23631937?v=4)](https://github.com/victorkowalski "victorkowalski (23 commits)")[![dzmitry-duboyski](https://avatars.githubusercontent.com/u/38065632?v=4)](https://github.com/dzmitry-duboyski "dzmitry-duboyski (21 commits)")[![kratzky](https://avatars.githubusercontent.com/u/17198195?v=4)](https://github.com/kratzky "kratzky (15 commits)")[![poplers24](https://avatars.githubusercontent.com/u/104767729?v=4)](https://github.com/poplers24 "poplers24 (6 commits)")[![lucasferreira](https://avatars.githubusercontent.com/u/234495?v=4)](https://github.com/lucasferreira "lucasferreira (2 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")

---

Tags

2captchaanti-captchaanticaptchabypass-invisible-recaptchabypass-on-captcha-recaptchabypass-recaptcha-v2bypasscaptchacaptcha-breakingcaptcha-bypasscaptcha-recognitioncaptcha-services-for-recaptcha-v2captcha-solvercaptcha-solvingcloudflare-turnstile-solverdeathbycaptchagoogle-recaptcha-solverrecaptcha-solverrecaptcha-solver-phprecaptcha-v2-captcha-solverrecaptchacaptcharecaptcha v3decaptchatencentkeycaptchafuncaptcha2captcha.com2captchaanticaptchageetestdatadomereCAPTCHA V2bypass captchasolve captchacaptcha solverfriendly captchalemincloudflare turnstileamazon wafaudio captchaMTCaptchaCutcaptchaatbCAPTCHAtemuProsopoCaptchafoxvkCaptchavkImage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/2captcha-2captcha/health.svg)

```
[![Health](https://phpackages.com/badges/2captcha-2captcha/health.svg)](https://phpackages.com/packages/2captcha-2captcha)
```

###  Alternatives

[solvercaptcha/solvecaptcha-php

PHP package for easy integration with solvecaptcha API.

142.6k](/packages/solvercaptcha-solvecaptcha-php)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1872.6M14](/packages/karser-karser-recaptcha3-bundle)[jumper423/decaptcha

Распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

68141.9k1](/packages/jumper423-decaptcha)[recaptcha/php5

A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's reCaptcha API.

48711.8k4](/packages/recaptcha-php5)[anam/captcha

reCAPTCHA and invisible reCAPTCHA for Laravel. reCAPTCHA protects your app against spam and bot.

2944.7k](/packages/anam-captcha)[jumper423/yii2-captcha

Распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

172.6k2](/packages/jumper423-yii2-captcha)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
