Docs / Guides
Migrate from another CAPTCHA API
Moving an existing integration from another provider to SurSolver: the fields that map one-to-one, the ones that change, and a checklist to test against.
Already on another provider? SurSolver uses the same createTask /
getTaskResult shape, with clientKey in the body and the errorId response fields.
Check each item under What to adjust, because the flow differs in
places. The first two lines to change:
- API = "https://api.other-provider.example"
+ API = "https://api.sursolver.com"
- KEY = "YOUR_CURRENT_KEY"
+ KEY = "YOUR_SURSOLVER_KEY"
What stays the same
POST {base}/createTaskwith{"clientKey": …, "task": {"type": …, …}}, answering{"errorId":0,"taskId":…,"status":"idle"}.POST {base}/getTaskResultwith{"clientKey": …, "taskId": …}, answeringprocessingwhile the task runs andreadywith asolutionobject when it is done.POST {base}/getBalancewith{"clientKey": …}, answering{"errorId":0,"balance":…}in USD.errorId: 0on success anderrorId: 1witherrorCode/errorDescriptionon a reported failure, in an HTTP 200 reply. Unexpected server errors are the exception: HTTP 500 withouterrorId— see Errors.- The solution keys of each type (
gRecaptchaResponse,token,cookies, …).
What to adjust
Names. A task.type ends in Token when the result is a token and in Cookie when
it is a cookie; a …ProxyLess twin solves without your proxy. Matching is
case-insensitive and the Token / TokenProxyLess suffix is optional, so
ReCaptchaV2TokenProxyLess and recaptchav2 reach the same service. Names from another
API are not translated: only the names listed in the public catalog
(GET /v1/task-types) are accepted, so check each task.type you send against it. An
unlisted name answers ERROR_TYPE_NOT_SUPPORTED.
Browser identity (v0.1.25). Every web task now requires userAgent in the request.
Send a nonblank printable-ASCII string of at most 512 characters, then keep that same
value during discovery and replay. Do not read solution.userAgent: it is no longer
returned. Native Android/iOS app tasks (CastleAndroid, AkamaiBmp) are unchanged.
Missing or invalid browser identity answers ERROR_INVALID_REQUEST before any charge.
Failures. SurSolver returns its own error catalogue.
An execution time limit answers ERROR_TASK_TIMEOUT; other upstream failures
answer ERROR_FAILED with the reason in errorDescription. Vendor-specific
codes such as ERROR_CAPTCHA_UNSOLVABLE do not exist here.
Timing. Every task is asynchronous: there is no one-call synchronous
getToken-style endpoint, and no inline result in createTask. Poll
getTaskResult every 3 seconds.
Proxies. Proxy details travel in the same task object, but the four-part colon string
is always read as user:password:host:port here. Some clients send
host:port:user:pass instead; this API does not detect the order, so such a string may
be accepted and misread — or rejected with ERROR_INVALID_REQUEST. Convert those
strings, or send the split proxyType / proxyAddress / proxyPort / proxyLogin /
proxyPassword fields, which is the recommended form when migrating. Modes and formats
per type: Proxies.
For example, 203.0.113.10:8000:user:password from a client that puts the host first
becomes these split fields, so there is no order left to guess:
{
"clientKey": "YOUR_SURSOLVER_KEY",
"task": {
"type": "CloudflareChallengeCookie",
"websiteURL": "https://example.com/protected",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36",
"proxyType": "http",
"proxyAddress": "203.0.113.10",
"proxyPort": 8000,
"proxyLogin": "user",
"proxyPassword": "password"
}
}
Charging. A task is charged when accepted. A failed task automatically returns its original charge once. A successful task retains its charge; internal retries do not add charges.
Not offered. Callback/webhook delivery (callbackUrl is not part of this
surface — poll instead), image and text recognition tasks, and the
reportIncorrect… complaint methods. appId is accepted for the referral program;
other vendors’ softId is not.
Migration checklist
- Create a SurSolver key in the dashboard and put it behind the same secret store as the old one.
- Point the base URL at
https://api.sursolver.com. - Replace the
task.typevalues with the names fromGET /v1/task-types. - Keep the polling loop, and stop it on the first
errorId: 1. - Re-check proxy handling for the types you use — proxy fields and modes are in
GET /v1/task-typesand in Proxies. SenduserAgentin every web task and reuse it on replay; native app tasks are exempt. - Run one task end to end against the live API before switching traffic, and confirm
the charge with
getBalance.