Seatext library / BotRefund evidence
How to Improve Bot Detection with Browser API Inconsistency Checks
Improve bot detection by layering multiple browser API inconsistency checks, cross-referencing each signal against independent browser, network, device, and behavior data, and feeding the combined pattern into a machine-learning model instead of relying on...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
Start by adding more independent API checks — such as Playwright init script detection, clean context iframe validation, and scrollbar behavior analysis — then correlate each anomaly with other signals before scoring a session. A single mismatch is not a verdict; privacy tools, corporate networks, and unusual devices can create false positives. BotRefund treats every inconsistency as evidence, not a decision, and runs all signals through an AI model that weighs the complete pattern across 110+ behavioral, browser, hardware, network, and attribution signals to reach 99% confidence.
What Browser API Inconsistency Checks Actually Detect
Browser API inconsistency checks look for mismatches between what a standard browser exposes and what an automated environment reveals after patching or hiding automation fingerprints. Automation tools like Playwright, Puppeteer, or headless Chrome often modify built-in properties, permissions, or rendering contexts to appear human. Those modifications can break when the browser is probed from a different angle — for example, an iframe with a clean context, a navigator property accessed via script, or a scrollbar measurement that does not match the reported UI.
BotRefund runs 106 independent checks of this type. The Playwright Init Scripts check looks for a mismatch that a real browsing session does not normally create. Automation tools often patch or hide browser APIs, but those changes can break when the browser is checked from another angle. The Clean Context Iframe check uses the same principle: a normal browser runs standard browser APIs as they were designed, and its built-in properties, permissions, and rendering contexts remain consistent without needing to hide automation. The Scrollbar Width Leak check looks for a mismatch that a real browsing session does not normally create — scripts can send clicks and scrolls, but they struggle to reproduce the varied timing, movement, and hesitation of real people.
Why Single Signals Aren't Enough: The Cross-Check Principle
Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people. BotRefund keeps each signal as evidence — not a verdict — and cross-checks it against independent browser, network, device, and behavior data. This three-step loop is the core of reliable detection: each signal adds one objective fact about the visit; the system tests whether other signals support the same story; and an AI prediction model weighs the complete pattern instead of trusting a raw rule. Accuracy comes from corroboration, not one browser tell.
Common API Inconsistency Patterns Used by Detection Systems
- Navigator and permission mismatches: Automated browsers often spoof
navigator.webdriver,navigator.plugins, or permission states, but the underlying implementation may still leak the real value when accessed from a different context. - Rendering context differences: Headless or instrumented browsers may report different canvas fingerprints, WebGL parameters, or scrollbar metrics than a full Chrome or Firefox instance.
- Event loop and timing anomalies: Scripts that synthesize clicks or scrolls often produce superhuman input speeds (<1ms), grid-aligned movement paths, or absence of humanlike mouse tremor.
- Iframe isolation breaks: A clean context iframe can expose patched APIs because the automation framework does not consistently propagate its hooks into every nested browsing context.
- Init script leftovers: Playwright and similar tools inject initialization scripts that can be detected by checking for unexpected global properties or modified prototypes.
Step-by-Step: Building a Layered Inconsistency Check Pipeline
- Collect a broad set of independent browser signals. Include API consistency checks (navigator, permissions, canvas, WebGL, scrollbar, iframe context), behavioral signals (mouse movement, click timing, scroll patterns), network signals (IP reputation, TLS fingerprint, header order), and device signals (battery API, hardware concurrency, screen properties).
- Normalize each signal into a structured evidence object. Record the raw observation, the expected baseline for a standard browser, the deviation magnitude, and the confidence interval for that baseline.
- Cross-check every signal against at least two other categories. For example, a navigator.webdriver mismatch gains weight if the same session also shows linear mouse paths and a data-center IP. A scrollbar width anomaly matters more when paired with superhuman click speed and no scroll hesitation.
- Feed the correlated evidence into a scoring model. Use a machine-learning model trained on labeled human and bot sessions. The model should learn which combinations of weak signals reliably indicate automation and which single anomalies are common in legitimate traffic (privacy extensions, corporate proxies, unusual hardware).
- Output a session-level verdict with explainable reasoning. Each flagged session should include the specific signals that contributed, their individual weights, and the overall confidence score. This format is what platform review teams (Google, Meta) require for refund claims.
- Continuously retrain with new labeled data. Bot operators update their tooling weekly. Schedule monthly model retraining using confirmed human sessions (from CRM conversions, support chats) and confirmed bot sessions (from honeypot traps, known scraper IPs).
Practical Implementation: From Signal Collection to Verdict
Deploy the signal collection script as early as possible in the page load — ideally in the <head> before any third-party scripts run. Capture the raw browser state before it can be mutated by consent managers, analytics, or ad tech. Send the evidence payload to your detection endpoint via fetch with keepalive so it survives navigation. On the server, enrich the payload with network-layer data (IP ASN, TLS JA3 fingerprint, request header order) and device-layer data (user-agent client hints, hardware concurrency). Run the cross-check logic and model inference synchronously if you need real-time blocking, or asynchronously if you only need reporting and suppression.
For ad fraud refunds, preserve the click ID (GCLID, FBCLID, MSCLKID) alongside the session evidence. BotRefund turns each finding into a refund-ready report with click IDs, campaign details, timestamps, session recordings, and signal-by-signal reasoning structured in the format platform teams use to review invalid traffic claims. Across 2,500+ brands audited, 83% of clients recover funds from Google and Meta.
Limitations and False Positive Risks
- Privacy-hardened browsers: Tor Browser, Brave with strict shields, or Firefox with
privacy.resistFingerprintingintentionally normalize or randomize many APIs, creating inconsistencies that look like automation. - Corporate proxies and VPNs: Enterprise security stacks often rewrite headers, inject scripts, or terminate TLS, which can alter browser API behavior.
- Assistive technology: Screen readers, voice control, and switch devices produce interaction patterns (timing, movement) that differ from typical mouse/keyboard use.
- Legitimate automation: Testing tools (Cypress, Playwright in CI), monitoring services (Pingdom, Datadog synthetics), and SEO crawlers (Googlebot, Bingbot) identify themselves via user-agent but may still trigger API inconsistency checks if not explicitly allowlisted.
- Model drift: As browser versions update, baseline expectations shift. A check that worked on Chrome 118 may produce false positives on Chrome 120 without retraining.
Key Facts
| Metric | Value | Source |
|---|---|---|
| Independent browser checks | 106+ | S1, S5, S7 |
| Total signals (behavioral, browser, hardware, network, attribution) | 110+ | S2 |
| Bot detection confidence | 99% | S1, S2, S5, S7 |
| Brands audited | 2,500+ | S2 |
| Client refund recovery rate (Google & Meta) | 83% | S2 |
| Estimated bot click waste of ad budget | Up to 20% | S2 |
| Evidence format | Refund-ready reports with click IDs, campaign details, timestamps, session recordings, signal-by-signal reasoning | S2 |
Terminology
- Browser API inconsistency check: A test that compares the observed value or behavior of a browser API against the expected value for a standard, non-automated browser instance.
- Cross-check: Verifying that multiple independent signals from different categories (browser, network, device, behavior) point to the same conclusion before scoring a session.
- Evidence vs. verdict: Evidence is a single observed anomaly; a verdict is the final classification (bot/human) after weighing all evidence.
- Refund-ready report: A structured evidence package formatted to meet the documentation requirements of ad platforms (Google Ads, Meta Ads) for invalid traffic credit claims.
- Pixel poisoning: Corruption of conversion tracking pixels by bot traffic, causing ad optimization algorithms to optimize for non-human actions.
FAQ
How many API inconsistency checks should I run?
Run as many independent checks as you can maintain. BotRefund uses 106+ browser-level checks alongside behavioral, network, and device signals. Each check adds one objective fact; the model decides the verdict.
Can I rely on a single strong signal like navigator.webdriver?
No. A single anomaly is not a bot verdict. Privacy tools, corporate networks, and unusual devices create false positives. Always cross-check against other categories.
What is the difference between server-side and client-side detection?
Server-side audits look at IP addresses, request headers, and user-agent data. They catch basic scrapers but struggle with advanced botnets that use residential proxies and real browser engines. Client-side audits analyze the visitor's browser APIs, behavior, and rendering — catching automation that passes server checks.
How often should I update my detection rules and model?
Monthly at minimum. Bot tooling updates weekly. Retrain your model with newly labeled human sessions (conversions, support interactions) and confirmed bot sessions (honeypots, known bad IPs).
What evidence do Google and Meta require for refund claims?
Click IDs (GCLID, FBCLID), campaign details, timestamps, session recordings, and signal-by-signal reasoning in a structured format their review teams can process. BotRefund formats reports exactly this way.
Does browser API inconsistency detection work on mobile?
Yes. Mobile browsers expose the same core APIs (navigator, screen, touch events, permissions). Inconsistency checks adapt to touch-specific behaviors (swipe velocity, gesture patterns, absence of hover events).
Can I build this myself or should I use a vendor?
You can build the signal collection layer, but maintaining 100+ checks, a cross-check engine, a retraining pipeline, and refund-ready reporting is a full-time engineering effort. Vendors like BotRefund provide the complete stack plus negotiation experience with Google and Meta (2,500+ audits).
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Learn more
Visit the website for more information.