How to bypass PerimeterX (HUMAN Bot Defender) when scraping public pages
PerimeterX, now HUMAN Bot Defender, is behind the "Press & Hold" button and the page that says "Access to this page has been denied". It is common on large retail, marketplaces and real-estate sites in the US.
This guide covers how to recognise it, how it scores visitors and what reliably reads public pages behind it.
How to tell a site uses PerimeterX
PerimeterX names everything with a px prefix.
| Signal | Where | What it means |
|---|---|---|
| _px3 / _px2 | Cookie | The risk token. Refreshed as the client-side sensor reports. |
| _pxhd | Cookie | Set by the server side; identifies the visitor across requests. |
| _pxvid / pxcts | Cookie | Visitor and session IDs. |
| Press & Hold | Block page | The human challenge (px-captcha). The visitor is already suspected. |
| Access to this page has been denied | <title> | The block page, often with a 403. |
| /<appId>/init.js, client.perimeterx.net | Script URLs | The sensor. Loaded on ordinary pages too, so not a block by itself. |
As with DataDome, the vendor's script is on normal pages. A large retail site we tested returned its full page with the PerimeterX tag in it; a check for the word "perimeterx" would have thrown that page away. Check for the block page instead:
def is_px_block(status: int, html: str) -> bool:
head = html[:20_000].lower()
return status == 403 and (
"px-captcha" in head or "access to this page has been denied" in head
)How PerimeterX decides you are a bot
PerimeterX scores each visitor from a client-side sensor and server-side signals, and refreshes the score through the session.
Client-side sensor
A script collects device, browser and behavioural data (mouse movement, touch, timing) and exchanges it for the _px3 token. Automation frameworks leave traces it looks for.
Fingerprint consistency
The TLS handshake, HTTP/2 behaviour and headers have to agree with the browser the sensor reports.
Press & Hold
The challenge measures how the button is pressed. It appears when the score is already low.
IP reputation and velocity
Hosting ranges and high request rates from one IP push the score down quickly.
What people try, and why it breaks
Plain HTTP with copied headers
Breaks quicklyProtected pages expect a valid _px3; without the sensor there is none.
Automating Press & Hold
Helps, not enoughPossible, but slow, and it only fixes the symptom: the score that triggered it stays low.
Headless browser with stealth plugins
Helps, not enoughGets through some sites, but injected patches are a known target.
Residential proxies with a plain client
Helps, not enoughFixes the IP, not the missing sensor token.
What actually gets through
PerimeterX wants a believable browser on a believable connection, behaving like a visitor.
- 1
Real engine, patched at the source
Let the sensor run in a real browser whose automation traces are removed in the engine, not by injected scripts.
- 2
Residential exits and a sane rate
Keep the per-IP request rate low and rest an exit after a challenge.
- 3
Start sessions at the homepage
A fresh visitor appearing on a deep URL is suspicious; one arriving from the homepage is not.
- 4
Fail on the block page, not the tag
Treat only the actual block page as a failure.
Getting past PerimeterX with UnblockingAPI
Send the URL you want. You do not pick a proxy type, a browser or a "premium" mode: the API tries a fast plain fetch with a real Chrome TLS and HTTP/2 fingerprint first, and switches to a real browser on a residential exit when the answer is a block, a challenge or an empty shell. A request that fails is not charged.
curl -G "https://api.unblockingapi.com/unblock" \
-H "X-Api-Key: $UNBLOCKINGAPI_KEY" \
--data-urlencode "url=https://www.example.com/ip/123456789" \
--max-time 180import os, requests
r = requests.get(
"https://api.unblockingapi.com/unblock",
params={"url": "https://www.example.com/ip/123456789"},
headers={"X-Api-Key": os.environ["UNBLOCKINGAPI_KEY"]},
timeout=180,
)
result = r.json()
if result["status"] == "succeeded":
print(result["http_response_code"], result["render_reason"])
html = result["response"] # the page itself, not the challenge
else:
print("failed, not charged:", result.get("error"))render_reason in the response says how the page was fetched: plain, fallback:challenge (the plain fetch hit a wall, so a browser took over), replay (a plain fetch carrying the session a browser earned earlier) and so on. What a site needs is learned per site, so the second request to a PerimeterX site goes straight to whatever worked.
What happens for PerimeterX specifically
- —A blocked plain fetch switches to a real browser on a residential exit, where the PerimeterX sensor runs as it would for any visitor.
- —Pages that only load PerimeterX's script are treated as pages, not blocks. A request fails only when the block page came back.
- —"Press & Hold" is not automated. An exit that gets it is rested from that site and the request retries on another exit.
- —Sessions start at the homepage before the deep URL.
wait_for with a CSS selector of the content, or scroll_steps for lists that grow as you scroll. See the API docs for every option.When it still fails
No tool gets through every PerimeterX configuration every time, and anyone who promises 100% is guessing. The honest limits:
- —Sites that show Press & Hold to every visitor from a region. Expect some failed (free) requests.
- —Anything behind a sign-in. If a page needs an account, it is not a public page and is out of scope, both technically and under the Acceptable Use Policy.
- —If every attempt inside the request's budget is blocked, you get
status: "failed"and the request costs nothing. You only pay for pages that came back.
Responsible use
Frequently asked questions
Yes. HUMAN Security acquired PerimeterX in 2022; the product is now HUMAN Bot Defender. Cookies and block pages still carry the px names.
Avoid being shown it: a real browser with a clean fingerprint on a residential IP, arriving from the homepage at a normal rate, is rarely challenged. Automating the button itself does not fix the low score that triggered it.
The PerimeterX script is on every page of a protected site. Detect the block page (px-captcha, "Access to this page has been denied") instead of the vendor's name.
_px3 is the risk token issued after the client-side sensor reports; _pxhd is set server-side and identifies the visitor. Protected requests without valid tokens are challenged.
Try a PerimeterX-protected URL.
Test the fetching layer before building your parser. Start with 500 free credits and no credit card. See pricing for credits from €5, with no subscription.
One successful request is one credit. No multipliers for rendering, proxies or retries.
Other anti-bot systemsHow anti-bot systems work
Cloudflare
"Just a moment...", error 1020, Turnstile and cf_clearance, and what actually gets through.
DataDome
captcha-delivery.com, the datadome cookie, device checks and why deep links get blocked.
Akamai Bot Manager
_abck and bm_sz cookies, sensor data, "Access Denied" reference pages and sec-cpt.
Kasada
x-kpsdk headers, ips.js and proof-of-work: a defence with no CAPTCHA to look at.
AWS WAF Bot Control
aws-waf-token, challenge.js and the 202/405 responses AWS WAF sends instead of the page.
CAPTCHAs (reCAPTCHA, hCaptcha, Turnstile)
Why the best way past reCAPTCHA, hCaptcha and Turnstile is not to be shown one.
