SurSolver

DataDome captcha solver API

Capture the current challenge URL, solve it through your sticky proxy, and replay the datadome cookie in the same session.

Updated

$0.50 / 1K tasksCharged when a task is accepted

On this page

Required inputs

DataDomeCookie generates the datadome cookie value for a captured supported challenge. The challenge URL is required; supplying only the protected page cannot start a solve.

Field Required Value
type yes DataDomeCookie
websiteURL yes The protected page that produced the block
captchaUrl yes The complete fresh /captcha/ or /interstitial/ challenge page URL
userAgent yes A supported browser User-Agent, reused on replay
proxy yes Your sticky proxy, with a stable exit IP
cookies no Current session cookies as a Cookie header string or NDJSON

The DataDome API reference shows the current contract. captchaUrl maps to the native flow's challenge URL input; do not send the manager's internal key field yourself.

Capture the current challenge

  1. Open DevTools, Network, preserve the log and repeat the blocked request through your sticky proxy.
  2. Inspect the 403 response, its iframe or the challenge URL returned by the application. Copy the full captcha-delivery.com/captcha/ or /interstitial/ URL, including every query parameter.
  3. Read the protected site's cookies in Application, Cookies. When continuing that session, send its datadome and application cookies together in cookies.
  4. Keep the same exit IP and userAgent for the solve and the request that uses its result.

A block can expose var dd={...}, an iframe or JSON containing a challenge URL. Those are capture locations for your client; the solver does not discover them by loading websiteURL. Requests to c.js or i.js help identify challenge activity but neither script URL is a substitute for the challenge page URL.

DataDome block response showing the var dd configuration

For slider URLs, t=fe is the normal challenge path. t=bv means the proxy was blocked: change the proxy, open a fresh session and capture a new URL. A supplied t=bv URL is rejected before charging. Editing only that query flag does not repair the session.

Request and ready result

Send this shape to POST /createTask. The example URL, cookie and credentials are placeholders; replace them with one fresh captured session:

snippet.json
{
  "clientKey": "sur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "task": {
    "type": "DataDomeCookie",
    "websiteURL": "https://example.com/account",
    "captchaUrl": "https://geo.captcha-delivery.com/captcha/?initialCid=FRESH_INITIAL_CID&cid=FRESH_CID&hash=SITE_HASH&t=fe",
    "userAgent": "YOUR_SUPPORTED_USER_AGENT",
    "proxy": "http://user:password@proxy.example.com:8080",
    "cookies": "datadome=CURRENT_COOKIE; session=YOUR_SESSION"
  }
}

Poll POST /getTaskResult with clientKey and the returned taskId. A ready response has this shape:

snippet.json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "datadome": "<datadome-cookie-value>"
  }
}

Set solution.datadome as the datadome cookie on the protected site's domain. Apply the entries of the optional solution.cookies name-to-value object as well, preserving the application's session cookies.

Replay and verify acceptance

Replay through the same proxy with the task's userAgent. A rotating proxy address is insufficient if its exit changes between requests.

DataDome cookie and captcha-delivery URLs in the browser console

The native flow can return a minted token even when its follow-up acceptance check fails, times out or cannot complete. Check the protected response and an application-specific success marker yourself. HTTP 200 alone can still contain a block page. A failed or timed-out task returns its original charge once; a ready token does not certify the application's unrelated access rules.

Examples in your language

The official client wraps createTask and polling in one solve call; each language tab is its Quick start with this captcha's request, and prints datadome. Fill captchaUrl from your capture. To continue an existing session, add cookies as a Cookie header string (the API also accepts NDJSON). Set the printed value as the datadome cookie, keep the application's other cookies, and check the protected page through the same proxy and User-Agent.

quickstart.ts
npm install sursolver
import { SurSolver } from 'sursolver';

const API_KEY = 'YOUR_API_KEY';
const USER_AGENT =
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';

const client = new SurSolver(API_KEY);

const { solution } = await client.solve({
  type: 'DataDomeCookie',
  websiteURL: 'https://example.com/login',
  userAgent: USER_AGENT,
  captchaUrl: 'https://geo.captcha-delivery.com/captcha/?initialCid=YOUR_CAPTURE&t=fe',
  proxy: 'http://user:password@203.0.113.10:8000',
});
console.log(solution.datadome);

Troubleshooting

Symptom Check Correction
Missing captchaUrl Only the protected page was supplied Capture and send the full current challenge page URL
ERROR_INVALID_REQUEST for t=bv The proxy is blocked Change proxy and capture a fresh session
Captured URL fails CID, cookies or exit IP changed Recapture URL and cookies together
A ready cookie still sees a block Identity, cookie scope, session or another site rule differs Replay in the captured context and inspect the application response
datadomeCookie, websiteKey or key is rejected It is not this task's public input Use captchaUrl and cookies

The DataDome integration article explains how the block's fields relate to the captured URL.

FAQ

Is captchaUrl required?

Yes. Send the complete fresh captcha or interstitial page URL from the blocked session. The solver does not fetch websiteURL to discover a challenge.

Which DataDome challenges are supported?

The integration handles captured device-check interstitials and supported slider captchas. Supply the challenge page URL, not c.js or i.js.

Do I need a proxy?

Yes. DataDomeCookie requires your proxy. Preserve its exit IP and the task userAgent through capture, solve and replay.

What does the result contain?

solution.datadome is the cookie value. An optional solution.cookies object contains all returned cookie names and values. A ready credential does not guarantee that the application accepts it.

How do I send the blocked session cookies?

Use the optional cookies field as a Cookie header value such as datadome=value, or send cookies as NDJSON (one JSON object per line). datadomeCookie, websiteKey and key are not supported task inputs.