Résolution de CAPTCHAs via 2Captcha

VérifiéPrudence

Résolvez des CAPTCHAs (image, reCAPTCHA, hCaptcha, etc.) depuis la ligne de commande via le service 2Captcha.

Spar Skills Guide Bot
DeveloppementIntermédiaire
22/07/2026
Claude CodeCursorWindsurfCopilotCodex
#captcha#browser-automation#cli#2captcha#recaptcha

Recommandé pour

Synthèse automatique

Résout différents types de CAPTCHA via le service 2Captcha en ligne de commande pour les workflows d’automatisation de navigateur.

Points forts

  • Prend en charge de nombreux types : image, reCAPTCHA v2/v3, hCaptcha, Turnstile, FunCaptcha, GeeTest et questions texte.
  • S’intègre facilement à une automatisation via CLI et fournit des indications pour injecter le jeton dans la page.
  • Gère la configuration par fichier ou variable d’environnement et permet de vérifier le solde et les coûts.

Limites

  • Nécessite un compte 2Captcha payant et une clé API.
  • Envoie images, URL, sitekeys et métadonnées à un service tiers et à des solveurs humains.
  • Ne détecte pas ni n’extrait automatiquement les paramètres, et n’injecte pas le jeton à votre place.
Quand l'utiliser

Pour une automatisation de navigateur autorisée qui rencontre des CAPTCHA et où le recours à un service externe est approuvé.

Quand l'éviter

À éviter sur des données sensibles, réglementées ou des sites tiers sans autorisation, ou si la politique interdit le partage avec un service externe.

Analyse de sécurité

Prudence
Score qualité85/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.

Points d'attention
  • •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.
Comment cette analyse est faite

Exemples

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

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Extrait original : 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

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

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 doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/solve-captchas-with-2captcha-mrwakf8v'

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

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/solve-captchas-with-2captcha-mrwakf8v/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires