Solve CAPTCHAs with 2Captcha

VerifiedCaution

Solve various CAPTCHAs (image, reCAPTCHA, hCaptcha, etc.) using the 2Captcha service from the command line.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude CodeCursorWindsurfCopilotCodex
#captcha#browser-automation#cli#2captcha#recaptcha

Recommended for

Automated summary

Solves multiple CAPTCHA types through the 2Captcha service from the command line for browser automation workflows.

Strengths

  • Supports many CAPTCHA types: image, reCAPTCHA v2/v3, hCaptcha, Turnstile, FunCaptcha, GeeTest, and text questions.
  • Integrates easily into automation via CLI and provides guidance for injecting the token into the page.
  • Supports configuration via file or environment variable and lets you check balance and cost awareness.

Limitations

  • Requires a paid 2Captcha account and API key.
  • Sends images, URLs, sitekeys, and metadata to a third-party service and human solvers.
  • Does not automatically detect or extract CAPTCHA parameters, and does not inject the token for you.
When to use it

Use it for authorized browser automation that encounters CAPTCHAs when using an external solving service is approved.

When not to use it

Avoid it for sensitive or regulated data, third-party sites without authorization, or when policy forbids sharing with an external service.

Security analysis

Caution
Quality score85/100

The skill does not contain destructive commands, obfuscated payloads, or secret exfiltration beyond sending CAPTCHA data and API credentials to the intended 2Captcha service. It does use network access, external human solving, credentials, and browser automation, so it warrants caution rather than being considered fully safe.

Findings
  • •Sends CAPTCHA images, page URLs, sitekeys, challenge IDs, and task metadata to a third-party paid service and its human solvers.
  • •Requires handling a 2Captcha API key, with examples storing it in a plaintext config file.
  • •Provides browser-automation token injection and CAPTCHA-solving workflows that may conflict with target-site terms or anti-bot policies.
  • •Installation references external package and repository sources; users should review the upstream CLI before running it.
How this analysis is made

Examples

Solve reCAPTCHA v2 token
Use the 2captcha skill to solve the reCAPTCHA v2 on https://example.com with sitekey 6Le-wvk... and return the token.
Check balance and solve image CAPTCHA
Check my 2Captcha balance, then solve ./captcha.png with solve-captcha using the numeric and math options.
hCaptcha token injection
Solve the hCaptcha on this page with solve-captcha, then show me the JavaScript to set the response token and trigger the callback.

name: 2captcha description: Solve CAPTCHAs with 2Captcha from the command line during browser automation. version: 2.0.1 metadata: openclaw: requires: bins: - python3 config: - ~/.config/2captcha/api-key primaryEnv: TWOCAPTCHA_API_KEY envVars: - name: TWOCAPTCHA_API_KEY required: false description: Optional 2Captcha API key; config file works too. homepage: https://github.com/adinvadim/2captcha-cli

2Captcha Skill

Solve CAPTCHAs programmatically using the 2Captcha human-powered service.

Source and feedback: https://github.com/adinvadim/2captcha-cli

Privacy and Authorized Use

This skill sends CAPTCHA images, page URLs, sitekeys, challenge IDs, and task metadata to 2Captcha for processing by the 2Captcha service and its human solvers. Use it only for authorized automation, and do not submit sensitive, regulated, internal, or third-party user data unless you have approval.

Installation

# Install this agent skill with skills.sh
npx skills add adinvadim/2captcha-cli

# Or install with ClawHub/OpenClaw
openclaw skills install 2captcha

# Install the CLI after reviewing the source
git clone https://github.com/adinvadim/2captcha-cli.git
cd 2captcha-cli
python3 solve-captcha --version
mkdir -p ~/.local/bin
ln -sf "$PWD/solve-captcha" ~/.local/bin/solve-captcha

# Verify
solve-captcha --version

Configuration

# Save your 2Captcha API key
mkdir -p ~/.config/2captcha
echo "YOUR_API_KEY" > ~/.config/2captcha/api-key

# Or use environment variable
export TWOCAPTCHA_API_KEY="your-key"

Get your API key at https://2captcha.com/enterpage

The CLI reads credentials only from the --api-key flag, TWOCAPTCHA_API_KEY, ~/.config/2captcha/api-key, or ~/.2captcha-api-key.

Quick Reference

Check Balance First

solve-captcha balance

Image CAPTCHA

# From file
solve-captcha image /path/to/captcha.png

# From URL  
solve-captcha image "https://site.com/captcha.jpg"

# With options
solve-captcha image captcha.png --numeric 1 --math
solve-captcha image captcha.png --comment "Enter red letters only"

reCAPTCHA v2

solve-captcha recaptcha2 --sitekey "6Le-wvk..." --url "https://example.com"

reCAPTCHA v3

solve-captcha recaptcha3 --sitekey "KEY" --url "URL" --action "submit" --min-score 0.7

hCaptcha

solve-captcha hcaptcha --sitekey "KEY" --url "URL"

Cloudflare Turnstile

solve-captcha turnstile --sitekey "0x4AAA..." --url "URL"

FunCaptcha (Arkose)

solve-captcha funcaptcha --public-key "KEY" --url "URL"

GeeTest

# v3
solve-captcha geetest --gt "GT" --challenge "CHALLENGE" --url "URL"

# v4
solve-captcha geetest4 --captcha-id "ID" --url "URL"

Text Question

solve-captcha text "What color is the sky?" --lang en

Finding CAPTCHA Parameters

reCAPTCHA sitekey

Look for:

  • data-sitekey attribute in HTML
  • k= parameter in reCAPTCHA iframe URL
  • Network request to google.com/recaptcha/api2/anchor

hCaptcha sitekey

Look for:

  • data-sitekey in hCaptcha div
  • Network requests to hcaptcha.com

Turnstile sitekey

Look for:

  • data-sitekey in Turnstile widget
  • cf-turnstile class elements

Workflow for Browser Automation

  1. Detect CAPTCHA - Check if page has captcha element
  2. Extract params - Get sitekey/challenge from page source
  3. Solve via CLI - Call solve-captcha with params
  4. Inject token - Set g-recaptcha-response or callback

Example: Inject reCAPTCHA Token

// After getting token from solve-captcha
document.getElementById('g-recaptcha-response').value = token;
// Or call callback if defined
___grecaptcha_cfg.clients[0].callback(token);

Cost Awareness

  • Check balance before heavy automation
  • Image: ~$0.001 per solve
  • reCAPTCHA/hCaptcha/Turnstile: ~$0.003 per solve

Error Handling

Common errors:

  • ERROR_ZERO_BALANCE - Top up account
  • ERROR_NO_SLOT_AVAILABLE - Retry in few seconds
  • ERROR_CAPTCHA_UNSOLVABLE - Bad image or impossible captcha
  • ERROR_WRONG_CAPTCHA_ID - Invalid task ID

Notes

  • Solving takes 10-60 seconds depending on type
  • reCAPTCHA v3 may need multiple attempts for high scores
  • Some sites detect automation - use carefully
  • Tokens expire! Use within 2-5 minutes

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/solve-captchas-with-2captcha-mrwakf8v/download' --output '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md.part' && mv '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md.part' '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Installation
# Install this agent skill with skills.sh
npx skills add adinvadim/2captcha-cli

# Or install with ClawHub/OpenClaw
openclaw skills install 2captcha

# Install the CLI after reviewing the source
git clone https://github.com/adinvadim/2captcha-cli.git
cd 2captcha-cli
python3 solve-captcha --version
mkdir -p ~/.local/bin
ln -sf "$PWD/solve-captcha" ~/.local/bin/solve-captcha

# Verify
solve-captcha --version

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && test -s '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/2captcha' && cp -R '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v' '.claude/skills/2captcha'

Cursor
test -f '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && test -s '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/2captcha' && cp -R '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v' '.cursor/skills/2captcha'

Codex
test -f '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && test -s '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/2captcha' && cp -R '.skill-downloads/solve-captchas-with-2captcha-mrwakf8v' '.agents/skills/2captcha'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/solve-captchas-with-2captcha-mrwakf8v'

openskills read 'solve-captchas-with-2captcha-mrwakf8v'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills