Back to tools

AI Agent Tool

2Captcha logo

2Captcha

CAPTCHA solving API using AI and human workers to bypass reCAPTCHA, Cloudflare, and other challenges.

AutomationCommunity

2captcha.com

•

API Key

About 2Captcha

2Captcha is a CAPTCHA solving API that combines AI-based automatic recognition with a human worker fallback for high-accuracy results. It supports a wide range of CAPTCHA types including reCAPTCHA v2/v3, Cloudflare Turnstile, Arkose Labs FunCaptcha, GeeTest, and standard image CAPTCHAs. It is used by developers building web scrapers, automation tools, and testing suites. Pay-as-you-go pricing with no subscriptions required.

AI Agent Use Cases

- Supports reCAPTCHA v2/v3, Cloudflare Turnstile, Arkose FunCaptcha, and GeeTest

- AI-first solving with human worker fallback for accuracy

- Simple REST API with SDKs for Python, PHP, and Node.js

- Pay-per-solved-CAPTCHA with no monthly minimums

- Average solving time under 15 seconds for most types

- Worker accuracy scoring and quality control

Available Actions

These are the specific actions that AI agents can perform with this tool

Inputs

clientKey

Your 2captcha API key used for authentication; required in every API call.

task

The captcha-solving task object; must specify type and other parameters required by the target captcha type.

languagePool

Optionally select workers by language: 'en' for English-speaking, 'rn' for Russian-speaking; only applies to image or text-based captchas.

callbackUrl

URL of your webhook endpoint to receive automatic captcha solution results asynchronously.

softId

Optional software ID if you have registered your software in the 2captcha catalog.

Inputs

key

Your API key for authenticating requests. This must be the exact 32-character API key from your 2Captcha account.

action

Defines the action to perform. Use the value 'get' when requesting the answer for a captcha task.

id

The unique numeric ID returned by a successful submission to in.php. This identifies the captcha task whose solution you want to retrieve.

json

If set to 1, the response will be returned in JSON format; by default (0 or not set), response is plain text.

header_acao

If set to 1, the response will include 'Access-Control-Allow-Origin: *' header (for CORS requests in web apps). Defaults to 0.

Inputs

clientKey

Your unique API key for authenticating API requests; this must correspond to your 2captcha account and be included as the 'clientKey' property in the request body.

taskId

The unique numeric identifier of the captcha task whose result is being requested, as returned previously by createTask.

Inputs

key

Your personal API key from your 2Captcha account, used for authentication. Must be exactly 32 alphanumeric characters.

method

The type of captcha to solve (e.g., 'userrecaptcha' for reCAPTCHA V2/V3, 'post' or 'base64' for normal/image captcha, etc.). Value depends on the captcha you are solving.

file

Image file containing the captcha challenge if you are solving a normal/image captcha and selecting 'post' as method. Mutually exclusive with 'body'. Required only for file uploads.

body

Base64-encoded data for the captcha image (or audio for audio tasks). Required if submitting data in base64; mutually exclusive with 'file'.

googlekey

The public key ('sitekey', 'k') needed to solve reCAPTCHA V2/V3. Mandatory if method is 'userrecaptcha'.

pageurl

The complete URL of the page where the captcha is found. Required for most token-based or JS-based methods like reCAPTCHA, FunCaptcha, Geetest, etc.

userAgent

The user agent string to be used when solving some captchas (e.g., for reCAPTCHA with cookies). Optional unless specifically required for your captcha method.

cookies

Cookies to supply to the worker, formatted as KEY:Value;KEY2:Value2; etc. Used for certain advanced captcha types but not always required.

json

If set to 1, responses will be in JSON format instead of plain text. Default is 0.

header_acao

Set to 1 to include 'Access-Control-Allow-Origin: *' HTTP header in the response, used for AJAX/CORS requests. Default is 0.

pingback

A callback URL where 2Captcha will send the result via HTTP POST once the captcha is solved. You must register this URL/IP with 2Captcha.

soft_id

Developer/software ID if you are participating in the 2Captcha partners program. Not required for standard use.

proxy

Proxy connection string (e.g., login:password@IP:PORT) if your method supports or requires solving through a proxy.

proxytype

Type of the proxy used when applicable.