What is Akamai Bot Manager and how to recognise it
Akamai Bot Manager is an edge layer that scores every request to a protected site. An obfuscated same-origin script collects browser and device signals and posts them back to the edge, which then decides whether to allow, limit, challenge or block the traffic. You can recognise it from the response cookies: _abck and bm_sz are the usual pair, often together with ak_bmsc. Response headers such as X-Akamai-Transformed or an akamai-grn marker point at the same edge, and the script that collects the signals is served from a random-looking first-party path that changes between loads.

Unlike a widget that sits in a form, this protection has no visible challenge to look for. The page loads, and the cookies in the response carry the state that decides what you are allowed to do next. Protected actions — login, checkout, a product API call — are where a weak or missing state shows up, often as a block page or a repeated challenge rather than a form.
The result contains the validated cookie as _abck, not token. Optional cookies maps each returned cookie name to its value. Replay with the userAgent you supplied in the task; it is not returned again.
Which page URL and sensor scripts to send
Start from the page whose first load serves the sensor — normally the login, checkout or product page, not the homepage. Send that full URL, including its path and query string.
Confirm the site runs Akamai Bot Manager before you send anything: look at the response cookies for _abck and bm_sz, and at the HTML for that script. Send the User-Agent of the client that will replay the cookies as the required userAgent, and replay with exactly that value.
Send the full script URLs as the required scriptUrls array, copied from the page source or Network tab. Use an array even for one script. Optional pageData is the HTML of the protected page as you received it and supplies its sensor seed; it does not replace scriptUrls.
Akamai serves two different script setups, and webSensor picks the one the task runs:
| Page loads | webSensor |
scriptUrls order |
Also send |
|---|---|---|---|
The /akam/13/… pixel and the sensor script |
false (default, can be left out) |
Send both URLs; no sensor-first requirement | — |
Akamai's web sensor script, which posts sensor_data to its own path |
true |
Sensor first, then the pixel and any async script. The solver loads the others after the first sensor POST | cookies from the page response, including _abck and any bm_sz or ak_bmsc cookies it set |
With webSensor: true, scriptUrls[0] must be the sensor script. Only POSTs to that script's path count toward completion: at least two responses must have status 200 or 201 and "success": true in the body. The task can also finish early if _abck reaches ~0~. Optional verify is a protected path on the same site, such as /api/account, that must answer 2xx within four seconds after the solve; it is accepted only with webSensor: true.
Capture session cookies after loading the page's scripts. _abck may first be set by the sensor script response, rather than the initial page response.
A short interstitial that sets bm_s, bm_sc and bm_so before the real page is a different flow. Use the Akamai SBSD guide for its interstitial inputs and proxy requirements. For Android x-acf-sensor-data headers, use Akamai BMP.
Check which mode the site uses
- Open the protected page in a new incognito window so the session starts without old cookies.
- Open F12 → Console and run this command to read the
_abckstatus:
document.cookie.match(/(?:^|;\s*)_abck=([^;]+)/)?.[1]?.split('~')[1]
- Move the mouse around the page for 10–15 seconds, run the command again, and check Network for POSTs to the sensor script's path.
| What you observe | What to do |
|---|---|
The status changes from -1 to 0 |
Use normal mode; omit webSensor (defaults to false). |
The status stays at -1 and sensor POSTs return 201 |
Use webSensor: true. |
The status stays at -1 and sensor POSTs are missing or fail |
Check whether the sensor loaded and whether the IP is blocked before choosing a mode. |
If the command returns undefined, the page has no script-visible _abck cookie yet. Check the page response and sensor loading first; -1 alone is not enough to select web sensor mode.
Where the cookies go
Set every entry of cookies (a name-to-value object) on the protected site's domain with path /, on a session that uses the task's userAgent. Then request the protected page or API from that session.
Protected actions can invalidate the state, so when a request is challenged again, solve again rather than reusing an old result.
In normal mode, a successful solve flips the status segment of _abck to 0. With webSensor: true, the task can finish after Akamai accepts the sensor posts while _abck still contains ~-1~. Check the returned cookies against the protected request you actually need; sensor acceptance alone does not guarantee that every application action will be allowed.
Common mistakes
Do not mix cookies from one solve with a different user agent. Keep the returned cookies and browser identity together, and do not treat an old cookie value as a long-lived application credential.
Check the protection type before selecting a task. _abck sensor generation, SBSD interstitials and Android BMP headers have different inputs and replay rules.
Solve it with SurSolver
Send the protected page URL, scriptUrls and your userAgent to createTask with AkamaiCookie or AkamaiCookieProxyLess; add webSensor: true and the page's cookies when the page runs the web sensor script. Poll getTaskResult until the status is ready, then replay the cookies with that same user agent. The Akamai API reference contains both request examples and the result shape.
The official client wraps createTask and polling in one solve call; each language tab is its Quick start with this captcha's request, and prints _abck. Turn the returned cookies into a Cookie header for the protected URL and send it with the task's user agent. The Playwright tab runs the same flow in a browser session. The Akamai solver guide covers the full integration, including browser sessions.
import { SurSolver, TaskType } from 'sursolver';
const API_KEY = 'YOUR_API_KEY';
const USER_AGENT =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
const client = new SurSolver(API_KEY);
const { solution } = await client.solve({
type: TaskType.AkamaiCookieProxyLess,
websiteURL: 'https://example.com/login',
scriptUrls: ['https://example.com/akam/13/1a2b3c4d', 'https://example.com/aB3dE5fG7h/kL1mN3pQ5r'],
userAgent: USER_AGENT,
});
console.log(solution._abck);
from sursolver import SurSolver, TaskType
API_KEY = "YOUR_API_KEY"
USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
)
client = SurSolver(API_KEY)
result = client.solve(
{
"type": TaskType.AkamaiCookieProxyLess,
"websiteURL": "https://example.com/login",
"scriptUrls": ["https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"],
"userAgent": USER_AGENT,
}
)
print(result.solution["_abck"])
package main
import (
"context"
"fmt"
"log"
sursolver "github.com/sursolver/sursolver-go"
)
const (
APIKey = "YOUR_API_KEY"
UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
)
func main() {
client, err := sursolver.New(APIKey)
if err != nil {
log.Fatal(err)
}
result, err := client.Solve(context.Background(), sursolver.Task{
"type": sursolver.TaskTypeAkamaiCookieProxyLess,
"websiteURL": "https://example.com/login",
"scriptUrls": []string{"https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"},
"userAgent": UserAgent,
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Solution["_abck"])
}
use serde_json::json;
use sursolver::{Client, task_types};
const API_KEY: &str = "YOUR_API_KEY";
const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
#[tokio::main]
async fn main() -> Result<(), sursolver::Error> {
let client = Client::new(API_KEY)?;
let result = client
.solve(&json!({
"type": task_types::AKAMAI_COOKIE_PROXY_LESS,
"websiteURL": "https://example.com/login",
"scriptUrls": ["https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"],
"userAgent": USER_AGENT,
}))
.await?;
println!("{}", result.solution["_abck"]);
Ok(())
}
<?php
require __DIR__ . '/vendor/autoload.php';
use SurSolver\Client;
use SurSolver\TaskTypes;
const API_KEY = 'YOUR_API_KEY';
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
$client = new Client(API_KEY);
$result = $client->solve([
'type' => TaskTypes::AKAMAI_COOKIE_PROXY_LESS,
'websiteURL' => 'https://example.com/login',
'scriptUrls' => ['https://example.com/akam/13/1a2b3c4d', 'https://example.com/aB3dE5fG7h/kL1mN3pQ5r'],
'userAgent' => USER_AGENT,
]);
echo $result->solution['_abck'];
require "sursolver"
API_KEY = "YOUR_API_KEY"
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
client = SurSolver::Client.new(API_KEY)
result = client.solve(
"type" => SurSolver::TaskTypes::AKAMAI_COOKIE_PROXY_LESS,
"websiteURL" => "https://example.com/login",
"scriptUrls" => ["https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"],
"userAgent" => USER_AGENT
)
puts result.solution["_abck"]
import com.sursolver.SolveResult;
import com.sursolver.SurSolverClient;
import com.sursolver.TaskTypes;
import java.util.List;
import java.util.Map;
public class QuickStart {
static final String API_KEY = "YOUR_API_KEY";
static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
public static void main(String[] args) throws InterruptedException {
SurSolverClient client = SurSolverClient.create(API_KEY);
SolveResult result = client.solve(Map.of(
"type", TaskTypes.AkamaiCookieProxyLess,
"websiteURL", "https://example.com/login",
"scriptUrls", List.of("https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"),
"userAgent", USER_AGENT));
System.out.println(result.solution().get("_abck"));
}
}
using System.Text.Json.Nodes;
using SurSolver;
const string ApiKey = "YOUR_API_KEY";
const string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
var client = new SurSolverClient(ApiKey);
var result = await client.SolveAsync(new JsonObject
{
["type"] = TaskTypes.AkamaiCookieProxyLess,
["websiteURL"] = "https://example.com/login",
["scriptUrls"] = new JsonArray("https://example.com/akam/13/1a2b3c4d", "https://example.com/aB3dE5fG7h/kL1mN3pQ5r"),
["userAgent"] = UserAgent,
});
Console.WriteLine(result.Solution["_abck"]);
// akamai-playwright.js - solve Akamai _abck and open the protected page with the returned
// cookies.
// Install: npm install playwright && npx playwright install chromium
// Run: node akamai-playwright.js
const { chromium } = require('playwright');
const { setTimeout: sleep } = require('node:timers/promises');
// Your SurSolver API key.
const CLIENT_KEY = 'sur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// The protected page whose first load serves the Akamai sensor.
const TARGET_URL = 'https://example.com/page';
// Optional, read from the page when empty: the /akam/ pixel script and the sensor script, in
// the order they load.
const SCRIPT_URLS = undefined;
// The User-Agent the solve runs with; send the result with this same user agent.
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
// A selector that matches only after the site accepted the result.
const SUCCESS_SELECTOR = '.PASTE_ACCEPTED_SELECTOR';
const API = 'https://api.sursolver.com';
const POLL_ATTEMPTS = 60;
// API errors are HTTP 200 with errorId 1; anything else is a transport failure.
async function call(path, body) {
const res = await fetch(`${API}${path}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
if (data.errorId !== 0) throw new Error(`${data.errorCode}: ${data.errorDescription}`);
return data;
}
async function solve(task) {
const created = await call('/createTask', { clientKey: CLIENT_KEY, task });
for (let attempt = 0; attempt < POLL_ATTEMPTS; attempt += 1) {
const result = await call('/getTaskResult', {
clientKey: CLIENT_KEY,
taskId: created.taskId,
});
if (result.status === 'ready') return result.solution;
await sleep(3000);
}
throw new Error(`task ${created.taskId} was not ready in ${POLL_ATTEMPTS} polls`);
}
// Optional task fields are sent only when they have a value.
function withoutEmpty(fields) {
return Object.fromEntries(
Object.entries(fields).filter(([, value]) => value !== undefined && value !== ''),
);
}
// A value the page did not show must be pasted into its constant at the top.
function need(name, value) {
if (value === undefined || value === null || value === '') {
throw new Error(`Could not read ${name} from the page; fill in the ${name} constant.`);
}
return value;
}
// Public cookies are a name-to-value object; apply them to the protected origin.
function browserCookies(cookies, url) {
return Object.entries(cookies).map(([name, value]) => ({
name, value, url: new URL(url).origin,
}));
}
// Opens the page once and reads what the solve needs from it.
async function readPage(browser) {
const page = await browser.newPage({ userAgent: USER_AGENT });
const requests = [];
page.on('request', (request) => requests.push(request));
try {
await page.goto(TARGET_URL, {
waitUntil: 'domcontentloaded',
timeout: 45000,
});
// Requests made after load count too; wait for them, but never hang on a busy page.
await page.waitForLoadState('networkidle', { timeout: 5000 })
.catch(() => undefined);
const urls = (matches) =>
[...new Set(requests.filter(matches).map((request) => request.url()))];
return {
pageUrl: page.url(),
scriptUrls: urls(
(request) =>
/\/akam\/\d+\/[0-9a-f]+/.test(request.url()) ||
(request.method() === 'POST' && (request.postData() ?? '').includes('sensor_data'))
),
};
} finally {
await page.close();
}
}
async function main() {
const browser = await chromium.launch();
try {
const found = await readPage(browser);
const solution = await solve({
type: 'AkamaiCookieProxyLess',
websiteURL: found.pageUrl,
scriptUrls: need('scriptUrls', SCRIPT_URLS || found.scriptUrls),
userAgent: USER_AGENT,
});
if (!solution.cookies) throw new Error('The solve returned no cookies.');
// Replay with the user agent the solve ran with.
const context = await browser.newContext({ userAgent: USER_AGENT });
await context.addCookies(browserCookies(solution.cookies, found.pageUrl));
const page = await context.newPage();
await page.goto(found.pageUrl, { waitUntil: 'domcontentloaded' });
await page.locator(SUCCESS_SELECTOR).first().waitFor({ timeout: 15000 });
console.log('The site served the protected page.');
} finally {
await browser.close();
}
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});