How to solve Akamai SBSD without a browser

How to tell an Akamai sbsd challenge from the other Bot Manager gates, and the five requests that clear it from plain HTTP, with code.

You request a page with a perfectly good HTTP client and get a challenge instead of the content, or the page loads once and every request after it is refused. The cookie jar has filled up with names like bm_s and bm_so. That is Akamai Bot Manager’s sbsd challenge, and it is one of the more common reasons a request-based scraper stops working on an Akamai site.

This guide covers how to confirm that sbsd is what you are facing, what the challenge expects from a browser, and the exact sequence of requests that clears it without running one.

First, make sure it is sbsd

Akamai puts more than one gate in front of a page, and they need different answers. Request the page once with a Chrome-like client and read what comes back:

What you get backGate
A flat “Unusual Traffic Detected” page with no script in itThe edge fingerprint screen, decided from your headers and TLS alone. See the Akamai edge solver.
HTML containing a script tag whose address ends in ?v= and a UUIDThe sbsd challenge. This guide.
The page loads, and _abck is validated on later requestsSensor data, a separate mechanism.

The script tag is the reliable sign. Cookies named bm_s, bm_sc or bm_so in your jar point the same way.

The two forms of the challenge

The same challenge shows up in two ways, and the difference matters because it changes how many posts you make.

  • Block page. You get a challenge page instead of the content. The script address carries an extra value: ?v=<uuid>&t=<number>. One post answers it.
  • Passive page. You get the real page, with the script running in the background. The address has ?v=<uuid> and no t. It needs two posts: the payload, then a follow-up once the first is accepted.

You do not have to work out which one you have. The presence of t tells you, and the solver’s response says whether a follow-up is needed.

What the challenge wants

In a browser, the page loads the script, the script runs and builds a description of the browser it is running in, and posts that description back to the site. If Akamai accepts it, the session receives its bm_s, bm_sc and bm_so cookies and the content is served.

Two properties of that exchange decide whether a browserless approach works:

  • The script changes between loads. An answer only matches the copy of the script it was built from, so nothing can be cached or replayed.
  • The answer belongs to the session. It is tied to the cookies, user agent and TLS fingerprint that fetched the script, not to an IP address.

The second point is what makes a clean division of labour possible. Your client keeps the session and makes every request to the site. The only thing it cannot do is run the script, so that single step is what you hand off.

Step 1: load the page and find the script

Use a client with a real Chrome TLS fingerprint and a cookie jar. Stock Node, Python and Go HTTP libraries are rejected before any payload matters, so this is not optional: curl-impersonate, httpcloak and tls-client all work.

Find the challenge script
// "http" is any client with a real Chrome TLS fingerprint and a cookie jar.
const UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36";

const page = await http.get(url, { headers: { "user-agent": UA } });
const m = page.text.match(/<script[^>]*src="(\/[^"]*\?v=([0-9a-f-]{36})[^"]*)"/i);
if (!m) throw new Error("no sbsd script on this page");

const src = m[1].replace(/&amp;/g, "&");          // "/path?v=<uuid>" or "/path?v=<uuid>&t=<number>"
const [path, query] = src.split("?");
const uuid = m[2];
const t = new URLSearchParams(query).get("t");    // null on a passive page

Step 2: download the script and get the payload

Fetch the script with the same session and the same user agent, then send it to the solver with the page, your cookies and your user agent. The script is about 500 KB. The call takes about a second, nearly all of it the upload.

Build the answer
const script = await http.get(new URL(src, url).href, {
  headers: { "user-agent": UA, referer: url },
});

const res = await fetch("https://api.notabot.sh/v1/solve", {
  method: "POST",
  headers: { "x-api-key": process.env.NOTABOT_KEY, "content-type": "application/json" },
  body: JSON.stringify({
    type: "akamai.sbsd.payload",
    script: script.text,            // exactly as downloaded
    uuid, path, ...(t ? { t } : {}),
    pageUrl: url,
    cookieHeader: http.cookies(),   // your session's cookies as one header value
    html: page.text,
    userAgent: UA,
  }),
});
const { result } = await res.json();  // { payload, postUrl, followup, userAgent, profile }

The user agent has to be the exact frozen Chrome-on-macOS string for a supported version, and the same one on every request of the flow. The payload describes a browser, so it must describe yours. If your client sends a different accept-language or lives in a different timezone than the defaults, pass acceptLanguage and timezone as well. The payload reference lists every field and the supported versions.

Step 3: post it from your own session

Post the payload to the address in the response, wrapped as {"body": payload}. On a passive page, post the follow-up the same way after the first is accepted. Then request the page again.

Send the answer, then the real request
const send = (to, payload) => http.post(to, {
  headers: { "user-agent": UA, "content-type": "application/json" },
  body: JSON.stringify({ body: payload }),
});

await send(result.postUrl, result.payload);
if (result.followup) await send(result.followup.postUrl, result.followup.payload);  // passive page only

const final = await http.get(url, { headers: { "user-agent": UA } });  // the real page

If the site lets you through, the cookies in your jar are good. Keep using that session for as long as it works and repeat the flow when challenges come back. Solving before every request only costs money.

Why it fails, and what to change

Nearly every failed integration comes down to one of four things.

  1. A stale script. The script, the v value and the t value must come from the same page load. Reuse any of them and the solver answers NOT_CHALLENGED. Download fresh every time.
  2. A session that changes mid-flow. Different cookies, a different user agent or a different HTTP client between the download and the post breaks the match. Any IP works, but the session must be one session.
  3. A client that does not look like Chrome. The right user agent on top of a Node or Python TLS handshake is turned away at the first request. So is an old Chrome version.
  4. A browser description that disagrees with your requests. If your headers say one language and the payload says another, set acceptLanguage, timezone and, where you have them, the device fields to what your client really sends.

When the payload is accepted and the page still blocks, the cause is on the session side rather than the answer: check the list above, then try a clean residential or mobile IP.

What it costs to run

With notabot the solve is €2.50 per 1,000 at list price and €1.00 at the top discount level, charged only when the solve succeeds. Because the answer is tied to the session and not to our IP, no proxy is sent to us and nothing has to be matched afterwards. Four of the five requests are yours.

The full flow, the request fields and a troubleshooting table are on the Akamai SBSD solver page.

Try it on your own target.

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

How to solve Akamai SBSD without a browser | notabot