Documentation Menu

Tasks

Updated 10/23/2026

Cloudflare Interstitial Solver API

POST
https://solver.solverify.net/createTask

Solve Cloudflare interstitial challenge pages with the Solverify Cloudflare Interstitial Solver API. The browser-based task returns Cloudflare session cookies, including cf_clearance when available, together with the solver user-agent and optional post-challenge HTML.

Use this task type when an authorized integration must continue a request with the same proxy, cookies, and browser identity used during the solved Cloudflare session.

The integration follows the standard Solverify task workflow:

  1. Create an interstitial task with the target URL and proxy.
  2. Store the returned taskId.
  3. Poll POST /getTaskResult until processing completes.
  4. Read cookies from solution.cookies.
  5. Replay the cookies with the same proxy and solution.useragent.

Request Parameters

FieldTypeRequiredDescription
clientKeystringYesYour private Solverify API key.
task.typestringYesMust be interstitial.
task.websiteURLstringYesFull URL of the Cloudflare-protected target page. Maximum 2,048 characters.
task.siteKeystringNoTurnstile sitekey of the widget on the target page (commonly the data-sitekey attribute, e.g. 0x4AAAAAA...). When supplied, the solver answers the widget on a synthetic page at the target origin instead of loading the full page — faster and far less bandwidth, still returning cf_clearance. Omit for the default full-page solve. Maximum 256 characters.
task.useragentstringNoOptional browser user-agent. Selects the browser family (Chrome/Chromium or Firefox), the platform (Windows, macOS, Linux, Android, iOS), and the exact version — for example Chrome/150 runs Chrome 150 and Firefox/153 runs Firefox 153. Omit for the newest installed Chrome version. See Supported User Agents. Maximum 512 characters.
task.sourcebooleanNoWhen true, requests post-challenge page HTML in solution.html. Default: false.
task.methodstringNoNavigation method. Accepted values: GET and POST. Default: GET.
task.proxyTypestringYesProxy type. Only http is accepted.
task.proxyAddressstringYesProxy IP address or hostname. Maximum 256 characters.
task.proxyPortstringYesProxy port as a numeric string containing 1 to 5 digits.
task.proxyLoginstringNoUsername for an authenticated proxy.
task.proxyPasswordstringNoPassword for an authenticated proxy.

Replay the returned Cloudflare cookies with the same proxy and the exact user-agent in solution.useragent. Changing either can invalidate the solved session.

If you provide useragent, use one of the supported strings from Supported User Agents. The solver opens that exact browser family, platform, and version, then returns the solved browser profile's actual user-agent in solution.useragent — always replay cookies with the returned value. A version that is not available on the solving node fails the task instead of silently substituting another version.

Create Interstitial Task Request

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "interstitial",
    "websiteURL": "https://example.com",
    "useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
    "source": true,
    "method": "GET",
    "proxyType": "http",
    "proxyAddress": "1.1.1.1",
    "proxyPort": "8080",
    "proxyLogin": "username",
    "proxyPassword": "password"
  }
}

Omit proxyLogin and proxyPassword when the proxy does not require authentication. Omit useragent to let the solver use its browser user-agent, which is returned with the completed solution.

Optional Turnstile Widget Fast Path

Many Cloudflare interstitial pages are Turnstile challenges: the page loads a Turnstile widget for a known sitekey, and Cloudflare then issues cf_clearance. If you know that sitekey, send it as task.siteKey and the solver answers the widget on a synthetic page served at the target origin — the site's real HTML, CSS, and JavaScript never load. The result is the same cf_clearance and session cookies, usually in a few seconds and roughly 30 KB of traffic instead of the full page bundle.

  • siteKey is optional. When omitted, the task runs the default full-page interstitial solve, unchanged.
  • The fast path targets Turnstile / managed challenges. Classic full-page JavaScript interstitials that render no Turnstile widget should omit siteKey.
  • Replay the returned cookies exactly as for a normal interstitial solve (same proxy and solution.useragent).
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "interstitial",
    "websiteURL": "https://example.com/",
    "siteKey": "0x4AAAAAAABIscbEwgij8duc9",
    "proxyType": "http",
    "proxyAddress": "1.1.1.1",
    "proxyPort": "8080"
  }
}

Cloudflare Interstitial Code Examples

These examples create an interstitial task and print the returned task ID.

curl --request POST \
  --url https://solver.solverify.net/createTask \
  --header "Content-Type: application/json" \
  --data '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "interstitial",
      "websiteURL": "https://example.com",
      "source": true,
      "method": "GET",
      "proxyType": "http",
      "proxyAddress": "1.1.1.1",
      "proxyPort": "8080"
    }
  }'

Create Task Response

{
  "errorId": 0,
  "taskId": "UUID"
}

Completed Interstitial Result

{
  "errorId": 0,
  "status": "completed",
  "solution": {
    "value": "dce6748725944f29b43b64a5eaad3a",
    "cookies": {
      "cf_clearance": ".AdOHyy60coo8q0wL6TAJFu2V1"
    },
    "useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
    "html": "<html>...</html>"
  },
  "errorCode": null,
  "errorDescription": null
}

Solution Fields

FieldDescription
valueTask-specific captured value or clearance value returned by the solved session.
cookiesCookies from the solved browser session, including cf_clearance when available.
useragentUser-agent used by the solver. Replay cookies with this exact value.
htmlPost-challenge page HTML. Present only when source is true and HTML was captured.

Cloudflare Interstitial Timeout

Cloudflare Interstitial tasks can run for up to approximately 120 seconds before timing out internally. Set an overall polling deadline in your application and stop when the API returns an error.

Cloudflare Interstitial API Errors

Error codeDescription
ERROR_INVALID_REQUESTThe top-level request body is missing or contains invalid JSON.
ERROR_INVALID_TASKRequired interstitial fields or proxy settings are missing or invalid.
ERROR_INSUFFICIENT_BALANCEThe account balance is too low to create the task.
ERROR_NO_CAPACITYInterstitial solver capacity is temporarily unavailable.
ERROR_TASK_FAILEDThe Cloudflare interstitial challenge could not be completed.
ERROR_TIMEOUTSolving exceeded the allowed processing time.

For recovery guidance and all supported errors, see Solverify API Error Codes.

Next Steps

After creating a Cloudflare Interstitial task, poll the Get Task Result API every 2 to 3 seconds with the returned taskId. Stop polling after completion or failure.

Frequently Asked Questions

What does the Cloudflare Interstitial Solver API return?

It returns cookies from the solved browser session, the solver user-agent, and optional post-challenge HTML. A successful session commonly includes cf_clearance in solution.cookies.

Is a proxy required?

Yes. Provide proxyType, proxyAddress, and proxyPort. Add proxyLogin and proxyPassword when authentication is required.

Why must I reuse the same proxy and user-agent?

Cloudflare clearance cookies are associated with the solved browser session. Reusing the proxy and solution.useragent preserves the session context for follow-up requests.

Can I choose the browser user-agent?

Yes. task.useragent selects the browser family (Chrome/Chromium or Firefox), the platform (Windows, macOS, Linux, Android, iOS), and the exact version — for example Chrome/150 runs Chrome 150 and Firefox/153 runs Firefox 153. When omitted, the newest installed Chrome version is used. The completed result returns the solved browser profile's actual user-agent in solution.useragent; replay cookies with that value and the same proxy. See Supported User Agents.

How do I return the HTML after the challenge?

Set task.source to true. The html field is included when the challenge completes and the post-challenge page source is captured.

Which navigation methods are supported?

Use GET or POST in task.method. If the field is omitted, the solver uses GET.

When should I send siteKey?

Send task.siteKey when the target page renders a Cloudflare Turnstile widget and you know its sitekey (commonly the data-sitekey attribute). It enables the widget fast path: the solver answers the widget on a synthetic page at the target origin, which is faster and uses far less proxy bandwidth while still returning cf_clearance. Omit it for classic full-page interstitials or when you do not know the sitekey — the default full-page solve is used.