Tasks
Updated 10/23/2026
Cloudflare Interstitial Solver API
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:
- Create an
interstitialtask with the target URL and proxy. - Store the returned
taskId. - Poll
POST /getTaskResultuntil processing completes. - Read cookies from
solution.cookies. - Replay the cookies with the same proxy and
solution.useragent.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
clientKey | string | Yes | Your private Solverify API key. |
task.type | string | Yes | Must be interstitial. |
task.websiteURL | string | Yes | Full URL of the Cloudflare-protected target page. Maximum 2,048 characters. |
task.siteKey | string | No | Turnstile 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.useragent | string | No | Optional 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.source | boolean | No | When true, requests post-challenge page HTML in solution.html. Default: false. |
task.method | string | No | Navigation method. Accepted values: GET and POST. Default: GET. |
task.proxyType | string | Yes | Proxy type. Only http is accepted. |
task.proxyAddress | string | Yes | Proxy IP address or hostname. Maximum 256 characters. |
task.proxyPort | string | Yes | Proxy port as a numeric string containing 1 to 5 digits. |
task.proxyLogin | string | No | Username for an authenticated proxy. |
task.proxyPassword | string | No | Password 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.
siteKeyis 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
| Field | Description |
|---|---|
value | Task-specific captured value or clearance value returned by the solved session. |
cookies | Cookies from the solved browser session, including cf_clearance when available. |
useragent | User-agent used by the solver. Replay cookies with this exact value. |
html | Post-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 code | Description |
|---|---|
ERROR_INVALID_REQUEST | The top-level request body is missing or contains invalid JSON. |
ERROR_INVALID_TASK | Required interstitial fields or proxy settings are missing or invalid. |
ERROR_INSUFFICIENT_BALANCE | The account balance is too low to create the task. |
ERROR_NO_CAPACITY | Interstitial solver capacity is temporarily unavailable. |
ERROR_TASK_FAILED | The Cloudflare interstitial challenge could not be completed. |
ERROR_TIMEOUT | Solving 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.