Skip to main content
Bypass Cloudflare’s “I’m Under Attack Mode” (IUAM) and interactive challenges automatically. This endpoint returns the cleared cookies and user-agent needed to make subsequent requests to the target site.
curl -X POST https://api.scrapely.io/v2/tasks/create \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "crawler": {
      "websiteURL": "https://example.com",
      "return_page_cookies": true,
      "return_user_agent": true
    }
  }'

Request fields

crawler

FieldTypeRequiredDescription
websiteURLstringYesURL of the page protected by Cloudflare. Must start with http:// or https://. Max 254 chars.

proxy (optional)

We highly recommend using proxies when solving Cloudflare challenges to maintain the reputation of the solving IP. The cookies returned will be tied to the IP used to solve the challenge.
FieldTypeRequiredDescription
schemestringYesProxy scheme (e.g. http, socks5).
hoststringYesProxy host.
portintegerYesProxy port.
usernamestringNoProxy username.
passwordstringNoRequired if username is provided.

Response

{
  "success": true,
  "task_id": "52989a12-a43c-4bf9-ba1d-8ab1e1509169",
  "status": "completed",
  "created_at": "2026-04-06T10:54:56.652354+00:00",
  "result": {
    "html": "",
    "text": "",
    "screenshot": "",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
    "cookies": {
      "cf_clearance": "abc123xyz..."
    },
    "metadata": {},
    "instructions": []
  },
  "completed_at": "2026-04-06T10:55:08.312452+00:00"
}
The cf_clearance cookie must be used alongside the exact same user_agent returned in the response for subsequent requests to the target site.