Solve CAPTCHAs in Octoparse AI with DeathByCaptcha

Solve CAPTCHAs in Octoparse AI with DeathByCaptcha

Posted on 2026-11-26 | 4 min read | Category: no-code-tool | By DeathByCaptcha Engineering Team

No-Code Tools


Solve CAPTCHAs in Octoparse AI with DeathByCaptcha

An Octoparse AI flow stops at the same place every automation does: a protected form appears, and the workflow has no idea what to type. The fix is a block that asks DeathByCaptcha for the answer and writes it into the page.

First, which Octoparse

Octopus Data ships two products and they do not share commands:

Octoparse AI (octoparse.ai) Octoparse (octoparse.com)
What it is Windows RPA tool Visual web scraper
Execute Python code yes no
Send HTTP Request yes no
Built-in CAPTCHA image, slider, rotation, text click, drawing path image, reCAPTCHA v2/v3, Cloudflare

This guide is for Octoparse AI, the one with the code blocks. The visual scraper has no code to paste: for it, use its own Solve CAPTCHA step, or solve here and hand the session over with the Use cookie option of the Go to Web Page step.

Install

Octoparse AI runs the block on the Python installed on your machine:

pip install deathbycaptcha-official

Then put the account in the user environment variables of the machine that runs Octoparse:

DBC_AUTHTOKEN=your_authtoken

or DBC_USERNAME and DBC_PASSWORD. Never in the code of the flow: a screenshot of a flow is easier to share than you think.

Add the block

Add command → Others → Execute Python code, paste octoparse_block.py from the client, and turn on Use local Python environment. Left off, the block runs on the built-in runtime and import deathbycaptcha fails.

Function Type Arguments Returns
solve_image 0 image_path, timeout the text to type
solve_recaptcha_v2 4 sitekey, pageurl, timeout the token
solve_recaptcha_v3 5 sitekey, pageurl, action, min_score the token
solve_turnstile 12 sitekey, pageurl, timeout the token
get_balance — nothing balance in US cents

An empty timeout keeps the client's own default: sixty seconds for an image, a hundred twenty for a token.

Flow A: an image CAPTCHA

  1. Take screenshot of web page → {shot}.
  2. Execute Python code → solve_image({shot}) → {answer}.
  3. Fill text field on web page ← {answer}.
  4. Click element on web page on the submit button.
  5. If web page contains the error text → retry, up to a fixed number of attempts. An unbounded loop burns balance on a page that will never accept the answer.

Flow B: a reCAPTCHA v2 token

The token has to reach the widget, so this part is JavaScript in the page. Test it on your own page first.

  1. Execute Python code → solve_recaptcha_v2({sitekey}, {pageurl}) → {token}.
  2. Run JavaScript function on web page with {token} as the argument:
function (token) {
  var box = document.getElementById('g-recaptcha-response');
  if (!box) { return 'no g-recaptcha-response field'; }
  box.value = token;
  box.dispatchEvent(new Event('input', {bubbles: true}));
  box.dispatchEvent(new Event('change', {bubbles: true}));
  return 'ok';
}
  1. Submit and check the result.

This writes the token into the field the form submits; it does not fire the widget's own callback, so a page that validates through the callback needs a different approach. sitekey and pageurl must be the ones of the page the flow is on: the service answers a token for the pair it is given, and the site rejects it for any other.

Turnstile is solve_turnstile, and its token is valid only from the exit IP that solved it. That is fine here: Octoparse AI runs on your machine and the request the token is pasted into leaves from the same machine.

If you would rather not use Python

The token types are two HTTP calls, so the same result comes from Send HTTP Request commands:

  • POST https://api.dbcapi.me/api/captcha with the account, type=4 and token_params as a JSON string. The id of the solution is in the captcha field of the answer (the service may answer 303 with it in the Location header instead).
  • GET https://api.dbcapi.me/api/captcha/{id} until text is not empty.

Images are the exception: this command only sends a text body, and the upload wants a file, so solve_image is the simpler path.

When this is the answer

Octoparse AI solves image CAPTCHAs on its own at $0.0015 an execution, and the visual scraper's Solve CAPTCHA step costs $1 per thousand attempts. Use DeathByCaptcha when:

  • the challenge is not in their list: reCAPTCHA, Turnstile and the token types are not there;
  • one balance serves every tool of the stack instead of one credit pool per product;
  • the same solve has to be reproducible outside the tool, in a service or a test.

And only on pages you are allowed to automate.

Next steps

  • The block, the guide and the tests: https://github.com/deathbycaptcha/deathbycaptcha-api-client-python
  • API documentation: https://deathbycaptcha.com/api

Common pitfalls

  • Using a CAPTCHA solving service for illegitimate purposes instead of legitimate automation and testing.
  • Hard-coding credentials or API keys in client-side code that users can inspect.
  • Sending the wrong CAPTCHA type parameter, which returns incorrect or empty responses.
  • Failing to poll for the solution status and not handling timeouts gracefully.
  • Scaling automation without monitoring error rates, response times, and CAPTCHA type coverage.
DBC
Written by DeathByCaptcha Engineering Team
DeathByCaptcha engineers build and operate the CAPTCHA solving technology behind this site. Articles are written by our technical team and checked for accuracy before publishing.
Reviewed by DeathByCaptcha Editorial Team

Get your API key — start solving

Free to try · No credit card · Python, Node.js, Java, C# SDKs

Get your API key


Status: OK

Servers are fully operational with faster than average response time.
  • Average solving time
  • 3 seconds - Normal CAPTCHAs (1 min. ago)
  • 6 seconds - reCAPTCHA V2, V3 (1 min. ago)
  • 13 seconds - others (1 min. ago)
Chrome and Firefox logos
Browser extensions available

Updates

  1. Nov 19: RESOLVED - Crypto payments are now fully operational again through the Hekelet payment processor.
  2. May 13: Crypto payments got better! You can now purchase your CAPTCHAs using cryptocurrency through the Hekelet payment processor at https://deathbycaptcha.com/user-pay and receive an extra 20% FREE CAPTCHA credit with every package purchased this way.
  3. Apr 15: GitHub Updates: We’ve upgraded our libraries, expanded sample code, enhanced documentation, and added support for C++ and Go, making integration smoother than ever. Explore what’s new at github.com/deathbycaptcha!

  4. Previous updates…

Support

Our system is designed to be completely user-friendly and easy-to-use. Should you have any trouble with it, simply email us at DBC technical support emailcom, and a support agent will get back to you as soon as possible.

Live Support

Available Monday to Friday (10am to 4pm EST) Live support image. Link to live support page