Cloudflare JSD solver API

Cloudflare JavaScript Detections run a script in the page and report back. This solver does that exchange for you and returns cf_clearance, with no browser involved.

Price
from €1.00 per 1,000 solves€2.50 before level discounts
You send
The page URL and your proxy
You get
cf_clearance, the cookies and the user agent to use
Not covered
Turnstile and the managed challenge
Failed solves
Free

What JavaScript Detections are

JavaScript Detections (JSD) are part of Cloudflare’s bot management. On HTML page views Cloudflare injects a lightweight script. The script runs quietly in the browser, reports what it found, and a visitor that passes receives a cf_clearance cookie. Site owners then write rules that require that cookie, so a client that never ran the script is blocked or challenged.

Because the script is only injected into HTML pages, the usual pattern is one solve to earn the clearance, followed by your own requests carrying the cookie. Cloudflare describes the feature in its JavaScript Detections documentation.

JSD, Turnstile and the managed challenge

Three Cloudflare products that are easy to confuse. A solver for one does not solve the others.

ProductWhat the visitor seesStatus here
JavaScript DetectionsNothing. A script runs in the backgroundcloudflare.jsd, live
TurnstileA widget on a form that returns a tokenNot live yet
Managed challengeA “Just a moment” page before the contentNot live yet

If a site serves Turnstile or a managed challenge, a JSD solve returns solve_failed and costs nothing.

One request, one cookie

Send the URL and your proxy. The clearance comes back with the user agent it is tied to.

curl https://api.notabot.sh/v1/solve \
  -H "x-api-key: $NOTABOT_KEY" \
  -H "content-type: application/json" \
  -d '{
    "type": "cloudflare.jsd",
    "url": "https://www.example.com/",
    "proxy": "http://user:pass@host:port"
  }'
200 OK
{
  "ok": true,
  "requestId": "req_7Hc2…",
  "result": {
    "cf_clearance": "…",
    "cookies": { "cf_clearance": "…" },
    "userAgent": "Mozilla/5.0 …",
    "status": 200
  },
  "cost": 0.0025,
  "costMicro": 2500,
  "solveMs": 640
}

Full reference: Cloudflare JSD docs. How to send the result: Using the result.

What makes the clearance hold

The same IP

The cookie is tied to the IP that earned it. Send your requests through the proxy you gave the solver, on a sticky session.

The same user agent

Use the returned user agent unchanged. A different string invalidates the clearance.

A Chrome-shaped client

Cloudflare also reads the TLS handshake. Use a client with a Chrome TLS fingerprint for your own requests.

How a site enforces JSD

Knowing what the site owner configured tells you where a solve is needed and how often. These points come from Cloudflare’s own documentation.

What Cloudflare doesWhat it means for you
Injects the script on HTML page views only, not on AJAX calls. API and mobile app traffic is unaffectedSolve against a page URL, not an API endpoint. The clearance then rides on your API requests
Serves the script from /cdn-cgi/challenge-platform/Seeing that path in the page source is the sign JSD is on
Stores the outcome in cf_clearance and exposes it to rules as cf.bot_management.js_detection.passedThe cookie is what you carry. Without it the field is false
Does nothing with a failed result unless the owner writes a WAF rule on that fieldOnly the paths covered by that rule block you, so some endpoints may work without a solve
Has no JSD data on a new visitor’s first requestOwners are told not to enforce it on the first page, so the block often appears on a later request
Gives JSD a 15-minute lifespan and re-injects the script before it expiresExpect to solve again when the site starts challenging, rather than holding one cookie all day
Scores bots from other signals too. A passed JSD does not guarantee a good bot scoreThe IP, headers and TLS handshake still matter after the solve

Source: Cloudflare, JavaScript Detections.

Using the cookies afterwards

The cookies work with the user agent they came with, from the IP that earned them, on a client that looks like that browser.

  1. Send every cookie in the result, and keep whatever the site sets afterwards. Some sites rotate them.
  2. Copy the returned user agent into your user-agent header exactly.
  3. Stay on the same proxy. If the exit IP changes, the cookies stop working. Use a sticky session.
  4. Connect like Chrome. Stock Node, Python and Go clients handshake differently from Chrome, and a site can drop good cookies that arrive that way. Use curl-impersonate, httpcloak, tls-client or a real browser for your own requests.
  5. Reuse the result until it stops working. The site decides how long cookies last. Solve again when challenges come back, not before every request.
LimitValueNote
Solve timeout30 secondsSet your own client timeout to 60 seconds so it outlasts ours
Typical solve time2 to 10 secondsMostly round trips through your proxy. Our own work is well under a second
Requests per second50 per key, 200 per accountOver it you get rate_limited with a retry-after header
Proxy formathttp://user:pass@host:portSOCKS is not supported. Residential or mobile IPs clear far more often than datacenter ones

Worked example in Node: Using the result. All limits: Limits.

When a solve fails

A failed solve is never charged. The response names the reason, and each one has a specific fix.

ReasonWhat it meansWhat to do
CHALLENGE_NOT_FOUNDThe page loaded but the protection script was not on it. The URL may not sit behind this solver's protection.Check the URL is an HTML page behind JSD. Turnstile and the managed challenge are different products.
NOT_CHALLENGEDThe site did not challenge this IP, so there was nothing to solve. Fetch the page directly.Fetch the page directly. There was nothing to solve.
GATE_NOT_CLEAREDThe answer was valid but the site still held the session back. Nearly always a flagged IP. Retry on a fresh one.Retry on a fresh residential or mobile IP.
BLOCKEDThe site refused the request before any challenge was shown. Usually the IP.Change IP. Datacenter and already-flagged IPs cause most of these.
TRANSPORT_ERRORThe proxy or the site dropped the connection. Retry, ideally on a new IP.Retry, ideally on a new IP.
domain_not_allowedThe domain is not approved for your account yet.Request the site on the Sites page.

Every code and reason: error reference.

Cloudflare JSD pricing

€2.50 per 1,000 successful solves, and less as your lifetime top-ups grow. No subscription, credits never expire, and a solve that fails is not charged.

Cloudflare JSD, per 1,000 solves
Topped up in totalLevelYou pay
Under €100List price€2.50
From €100−20%€2.00
From €250−30%€1.75
From €500−40%€1.50
From €1,000−50%€1.25
From €2,500−55%€1.125
From €5,000−60%€1.00
  • Top up from €10 by card. The balance works for every solver.
  • A level counts everything you have ever topped up, and it never drops.
  • The price is reserved when you call and released if the solve fails.
  • Each key can carry its own daily, monthly or total spend limit.
Pricing calculator

An API call instead of a headless browser

notabot APIHeadless browser
What you runOne HTTPS requestA Chrome instance per session, plus the servers under it
When the protection updatesWe patch the solver. Your code is unchangedYou patch stealth plugins and redeploy
What you pay forSuccessful solves onlyCPU, memory and bandwidth, whether or not the page passes
Scaling upSend more requestsAdd more machines

Cloudflare JSD solver: questions

What is Cloudflare JSD?

JavaScript Detections is a Cloudflare bot-management feature. Cloudflare injects a small script into HTML pages, the script runs in the browser and reports back, and a visitor that passes is given a cf_clearance cookie.

Is JSD the same as Turnstile or the "Just a moment" challenge?

No. Turnstile is a widget that returns a token, and the managed challenge is the interstitial page a visitor has to wait through. They are different Cloudflare products and a JSD solve does not clear them. If the site serves one of those you get solve_failed, which is free.

What do I send and what do I get?

You send the page URL and your proxy. You get cf_clearance, the full set of cookies to send, the user agent the clearance is tied to, and the status of the page after the solve.

Why does the solver need my proxy?

The clearance is tied to the IP that earned it. Solving through your proxy makes the cookie valid for the IP you will send your own requests from. Use a sticky session, because a rotating pool breaks the cookie when the IP changes.

Can I change the user agent afterwards?

No. The clearance is tied to the user agent returned with it. Use that string unchanged, with a client whose TLS fingerprint matches Chrome.

What does it cost?

€2.50 per 1,000 successful solves at list price and €1.00 at the top discount level. Failed solves are not charged.

Can I use it on any site?

Each domain is approved once before it can be solved, usually within a day. Subdomains of an approved domain are covered.

Other solvers

Page updated . Reference for every solver: documentation.

Try it on your own target.

Login, copy a key, send one request. If the solve fails, it costs you nothing.

Cloudflare JSD solver API (JavaScript Detections) | notabot