solve_captcha=true solves a captcha made of text drawn in a picture, then takes the screenshot. Name the picture and the text box with CSS selectors, such as #captcha-img or img.captcha.
You can also name the button to click after the answer is typed, a control that loads a new picture, and an element that shows a wrong-answer message. The solver tries again while that message is still visible. The default is 3 tries. You can set 1 to 5.
This reads text inside an image. A checkbox challenge, or a challenge that asks you to select pictures such as traffic lights, is outside this solver. The attempt waits up to 60 seconds.
The solver is on Growth and Business. It adds 3 credits when solve_captcha is on and the capture succeeds. See Plans and credits. A proxy can make a challenge less likely, but it does not type the answer. That is covered on the proxy page.
| Parameter | Required | Values | What it does |
|---|---|---|---|
solve_captcha | Yes | true or false | Turn the solver on. |
captcha_image | Yes | CSS selector | The captcha picture. |
captcha_input | Yes | CSS selector | The box the answer is typed into. |
captcha_submit | No | CSS selector | Clicked after the answer is typed. |
captcha_error | No | CSS selector | A visible message here means the guess was rejected. |
captcha_refresh | No | CSS selector | Clicked to load a new picture before the next try. |
captcha_retries | No | 1 to 5 | How many guesses to make. Default is 3. |
ocr_model | No | mini-ocr-v1 or ocr-v1 | Which recognition model to use. Default is mini-ocr-v1. |
solve_captcha=true and captcha_image or captcha_input is missing.captcha_retries is not a whole number from 1 to 5.captcha_image matches no element.ocr_model is not mini-ocr-v1 or ocr-v1.