Sometimes you need your automated browser sessions to fly under the radar. With Hyperbrowser’s privacy and anti-detection features, you can tweak things like browser fingerprints, pick the right proxies, and decide exactly how requests get routed. This helps your automated visits look and feel more like regular browsing—something that’s especially handy if you’re dealing with strict anti-bot measures or running sensitive operations.
Whether you need to appear as if you’re browsing from a specific region, or you want to vary details like your device type and OS, it’s all possible. You can set things up so your workflows feel less like scripted tasks and more like genuine user behavior. Add in built-in captcha-solving capabilities, and you’ve got a setup that keeps you moving forward, even if the sites you’re visiting throw a few hurdles your way.
Stealth Mode
Stealth mode helps you avoid detection by anti-bot systems. It randomizes browser fingerprints and can be configured when creating a new session via the API. Options include:
Devices - Specify mobile or desktop device profiles
Locales - Set browser locale (e.g. en-US, fr-FR)
Operating Systems - Simulate different OSes like Android, iOS, Windows, macOS, Linux
Screen Size - Specify viewport dimensions to emulate different devices
User Agents - Rotate user agent strings
To enable stealth mode and other stealth configurations, you can set the desired options in the session creation params when creating a session.
Hyperbrowser's browser instances can automatically block ads and trackers. This improves page load times and further reduces detection risk. In addition to ads, Hyperbrowser allows you to block trackers and other annoyances including cookie notices.
To enable ad blocking, set the proper configurations in the session create parameters.
import { connect } from"puppeteer-core";import { Hyperbrowser } from"@hyperbrowser/sdk";import { config } from"dotenv";config();constclient=newHyperbrowser({ apiKey:process.env.HYPERBROWSER_API_KEY,});constmain=async () => {constsession=awaitclient.sessions.create({ adblock:true, trackers:true, annoyances:true,// You must have trackers set to true to enable blocking annoyances and// adblock set to true to enable blocking trackers. });constbrowser=awaitconnect({ browserWSEndpoint:session.wsEndpoint, });const [page] =awaitbrowser.pages();// Navigate to a websiteconsole.log("Navigating to Hacker News...");awaitpage.goto("https://news.ycombinator.com/");constpageTitle=awaitpage.title();console.log("Page 1:", pageTitle);awaitpage.evaluate(() => {console.log("Page 1:",document.title); });// Clean upawaitpage.close();awaitbrowser.close();awaitclient.sessions.stop(session.id);};main();
import asynciofrom pyppeteer import connectimport osfrom dotenv import load_dotenvfrom hyperbrowser import AsyncHyperbrowserfrom hyperbrowser.models.session import CreateSessionParams# Load environment variables from .env fileload_dotenv()client =AsyncHyperbrowser(api_key=os.getenv("HYPERBROWSER_API_KEY"))asyncdefmain():# Create a session and connect to it using Pyppeteer session =await client.sessions.create( params=CreateSessionParams( adblock=True, trackers=True, annoyances=True,# You must have trackers set to true to enable blocking annoyances and# adblock set to true to enable blocking trackers. ) ) browser =connect(browserWSEndpoint=session.ws_endpoint) pages =await browser.pages() page = pages[0]# Navigate to a websiteprint("Navigating to Hacker News...")await page.goto("https://news.ycombinator.com/") page_title =await page.title()print("Page title:", page_title)await page.evaluate("() => { console.log('Page 1:', document.title); }")# Clean upawait page.close()await browser.close()await client.sessions.stop(session.id)# Run the async main functionif__name__=="__main__": asyncio.get_event_loop().run_until_complete(main())