patchright-nodejs is a free, open source data extraction & web scraping project written in TypeScript and released under Apache-2.0. It has 803 GitHub stars, 48 forks and 0 open issues, and was last pushed 13 days ago. On this registry it ranks #128 of 149 tracked projects in Data Extraction & Web Scraping, with 5 head-to-head comparisons available. It gained 13 stars over the last 30 tracked days.

What is patchright-nodejs?

Patchright for Node.js is a patched, undetected drop-in replacement for the Playwright browser automation framework, built in TypeScript for Node.js developers whose scraping, testing, and automation jobs get blocked by bot detection.

What it is

Patchright-NodeJS is the Node.js distribution of Patchright, a stealth-oriented fork of the Playwright testing and automation framework. The code is written in TypeScript and released under the Apache-2.0 licence, and the project is published on npm at https://www.npmjs.com/patchright. It lives in the Playwright and npm ecosystems rather than beside them: the repository serves the NodeJS package, while a companion patchright-python project covers Python and a separate Patchright Driver repository hosts the shared driver work.

The concrete problem it solves is detection. Stock Playwright is a well-known automation stack, so anti-bot systems such as Cloudflare can fingerprint it and serve challenge pages instead of the requested content. Patchright patches the underlying framework so a browser session looks less like automation, and because it keeps Playwright's API it functions as a replacement rather than a rewrite: existing Playwright scripts and test suites continue to run after the package swap. The repository topics reflect this single purpose plainly, listing cloudflare-bypass, stealth, undetectable, undetected, and webdriver alongside automation, botting, and web-scraping.

Key capabilities

  • Acts as a drop-in replacement for Playwright, so existing Playwright automation and test code runs unchanged.
  • Ships a patched, undetected browser automation stack, matching the cloudflare-bypass, stealth, and undetectable topics.
  • Drives Chrome and Chromium through a WebDriver and chromedriver-based browser stack, per the chrome, chromium, chromedriver, webdriver, and browser topics.
  • Targets scraping and bot workloads directly, reflected in the web-scraping, webscraping, web-auto, webautomation, bots, bot, and botting topics.
  • TypeScript codebase under the Apache-2.0 licence, published as an npm package with the homepage at https://www.npmjs.com/patchright.
  • Shares a driver and codebase lineage with the sibling Patchright-Python package and the main Patchright Driver repository.
  • README documents sponsored proxy integrations from NodeMaven, Swiftproxy, RapidProxy, and Scrappey, each aimed at proxy rotation and fingerprint maintenance for high-volume scraping.

Who uses it and how

  • Node.js scraping teams whose targets sit behind Cloudflare or similar challenge systems, where unpatched Playwright returns blocked pages instead of content.
  • Developers already running Playwright in production who need stealth behaviour without porting thousands of lines of existing automation code.
  • Teams maintaining polyglot stacks that pair this Node.js package with Patchright-Python, keeping one automation approach across both runtimes.
  • QA and automation engineers who need browser automation and testing against sites that reject detected headless sessions.
  • Large-scale data extraction operations that pair the browser with rotating residential or ISP proxies from the providers listed in the README.

Getting started

Install the Node.js package from npm at https://www.npmjs.com/patchright, which is the published home of the Patchright-NodeJS package. The README does not list an install or run command in the excerpt provided, so the repository and npm page are the starting points.

How it compares

Among the tools named in the facts, Playwright is the direct point of comparison: Patchright keeps Playwright's API and replaces its detection profile, so migration means changing the package rather than the automation logic. Patchright-Python covers the same ground for Python users, and the main Patchright Driver repository holds the shared implementation beneath both packages.

When to use it — and when not to

Choose Patchright when a Node.js Playwright project is being blocked and the team wants a stealth variant without rewriting automation code. Be aware that the README excerpt is largely sponsor placements, with no install, configuration, or usage documentation, so practical guidance leans on Playwright's own docs and the sibling repositories; proxy infrastructure is supplied by third-party sponsors, not the project, and must be sourced and managed separately. Teams needing vendor-backed support contracts, audited release processes, or environments where stealth tooling is not permitted should look elsewhere.

project readme (upstream, from github) — read inline

🎭 Patchright NodeJS


npm version GitHub Downloads (all assets, all releases)

Patchright is a patched and undetected version of the Playwright Testing and Automation Framework.
It can be used as a drop-in replacement for Playwright.

[!NOTE]
This repository serves the Patchright-NodeJS Package. To use Patchright with Python, check out the Python Package. Also check out the main Patchright Driver Repository


Sponsors

Want to Sponsor this Project? Contact @vinyzu on Discord!

NodeMaven Banner

##### NodeMaven: Your efficient proxy provider for Web Scraping and Automation with High Quality IPs.


Why NodeMaven?

🎯 ZIP targeting
✅ 99.9% Uptime
🔍 IP Filtering: Proxies are guaranteed to have fraud score 🔰 No KYC required
🎉 Unique free tools: Proxy Bandwidth Checker, Meta Tag Checker, IP Lookup and others!

Special codes for Patchright users:
🔥 PATCHRIGHT35 - 35% off to Mobile and Residential Proxies
🔥 PATCHRIGHT40 - 40% off to ISP (Static) Proxies

Choose quality and stability with NodeMaven.


swiftproxy banner

Swiftproxy: High-Performance Residential Proxies for Scalable Data Collection

Built for developers who need reliable, anti-detection proxy infrastructure. Swiftproxy delivers stable connections, high success rates, and flexible control for large-scale scraping and automation.

  • 🌍 195+ locations with ethically sourced residential IPs
  • 🔄 Rotating & sticky sessions with precise geo-targeting
  • ⚡ Optimized for anti-ban & high success rate
  • 🔌 HTTP / HTTPS / SOCKS5 support
  • 🧪 Free 500MB trial for testing
  • 💸 Special discount code for Patchright users: PROXY90 - 10%

Best for: Web scraping, automation, multi-accounting, and large-scale data extraction


rapidproxy banner

RapidProxy provides a stable and high-performance proxy network built for large-scale data operations.

RapidProxy delivers:

  • 🌍 90M+ Residential IPs (200+ locations)
  • 🔄 Rotating Residential Proxies — from $0.65/GB (non-expiring traffic)
  • 🧩 Static Residential IPs — $5/IP (30 days, unlimited traffic)
  • 🎯 Precise geo-targeting
  • ⚡ Free Trial Available — test proxy performance risk-free
  • Built for scraping, automation, and high-performance data workflows.
  • 🔥 Special Offer: Use code RAPID10 to get 10% off

Start fast. Scale globally. Stay stable with RapidProxy.


Scrappey

Sponsored by Scrappey

Getting the browser past detection is one problem. Keeping proxies rotating, fingerprints current and sessions alive across a few million requests is a different one. Scrappey takes the second problem: one endpoint, solved pages back.

  • Clearcote — our own patched Chromium, maintained in-house, not a stock build
  • Several engines behind one endpoint — blocked on one stack, routed to another
  • Click, type, wait and scroll over the API — a real session, not a fetch proxy
  • Residential and datacenter proxies included, or bring your own
  • Per request, no monthly minimum
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cmd": "request.get", "url": "https://example.com"}'

Get 10% off with code PATCHRIGHT

Documentation · Discord · Get an API key


Install it from NPM

# Install Patchright from NPM
npm i patchright
# Install Chromium-Driver for Patchright
npx patchright install chromium

Usage

Just change the import and use it like playwright. Patchright is a drop-in-replacement for Playwright!

[!IMPORTANT]
Patchright only patches CHROMIUM based browsers. Firefox and Webkit are not supported.

// patchright here!
const { chromium } = require('patchright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto('http://example.com');
  // other actions...
  await browser.close();
})();

Best Practice - use Chrome without Fingerprint Injection

To be completely undetected, use the following configuration:

chromium.launchPersistentContext("...", {
    channel: "chrome",
    headless: false,
    viewport: null,
    // do NOT add custom browser headers or userAgent
});

[!NOTE] We recommend using Google Chrome instead of Chromium. You can install it via npx patchright install chrome (or via any other installation method) and use it with channel: "chrome".


Patches

Runtime.enable Leak

This is the biggest Patch Patchright uses. To avoid detection by this leak, patchright avoids using Runtime.enable by executing Javascript in (isolated) ExecutionContexts.

Console.enable Leak

Patchright patches this leak by disabling the Console API all together. This means, console functionality will not work in Patchright. If you really need the console, you might be better off using Javascript loggers, although they also can be easily detected.

Command Flags Leaks

Patchright tweaks the Playwright Default Args to avoid detection by Command Flag Leaks. This (most importantly) affects:

  • --disable-blink-features=AutomationControlled (added) to avoid navigator.webdriver detection.
  • --enable-automation (removed) to avoid navigator.webdriver detection.
  • --disable-popup-blocking (removed) to avoid popup crashing.
  • --disable-component-update (removed) to avoid detection as a Stealth Driver.
  • --disable-default-apps (removed) to enable default apps.
  • --disable-extensions (removed) to enable extensions

General Leaks

Patchright patches some general leaks in the Playwright codebase. This mainly includes poor setups and obvious detection points.

Closed Shadow Roots

Patchright is able to interact with elements in Closed Shadow Roots. Just use normal locators and Patchright will do the rest.
Patchright is now also able to use XPaths in Closed Shadow Roots.


Stealth

With the right setup, Patchright currently is considered undetectable. Patchright passes:


Documentation and API Reference

See the original Playwright Documentation and API Reference

Extended Patchright API

evaluate Method (Frame.evaluate, Page.evaluate, Locator.evaluate, Worker.evaluate, JSHandle.evaluate)
  • Added isolatedContext to choose Execution Context (Main/Isolated). Bool (optional, Defaults to true)
object.evaluate(
    pageFunction: Function | string,
    arg?: Arg,
    ...,
+   isolatedContext: boolean = true
)
evaluateHandle Method (Frame.evaluateHandle, Page.evaluateHandle, Locator.evaluateHandle, Worker.evaluateHandle, JSHandle.evaluateHandle)
  • Added isolatedContext to choose Execution Context (Main/Isolated). Bool (optional, Defaults to true)
object.evaluateHandle(
    pageFunction: Function | string,
    arg?: Arg,
    ...,
+   isolatedContext: boolean = true
)
evaluateAll Method (Locator.evaluateAll)
  • Added isolated_context to choose Execution Context (Main/Isolated). Bool (optional, Defaults to True)
Locator.evaluateAll(
    pageFunction: Function | string,
    arg?: Arg,
    ...,
+   isolatedContext: boolean = true
)

Bugs

The bugs are documented in the Patchright Driver Repository.

TODO

The TODO is documented in the Patchright Driver Repository.

Development

Deployment of new Patchright versions are automatic, but bugs due to Playwright codebase changes may occur. Fixes for these bugs might take a few days to be released.


Support our work

If you choose to support our work, please contact @vinyzu or @steve_abcdef on Discord.


Copyright and License

© Vinyzu

Patchright is licensed Apache 2.0


Disclaimer

This repository is provided for educational purposes only.
No warranties are provided regarding accuracy, completeness, or suitability for any purpose. Use at your own risk—the authors and maintainers assume no liability for any damages, legal issues, or warranty breaches resulting from use, modification, or distribution of this code.
Any misuse or legal violations are the sole responsibility of the user.


Authors

Active Maintainer: Vinyzu
Co-Maintainer: Kaliiiiiiiiii

Frequently asked questions

Is patchright-nodejs free to use?

patchright-nodejs is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does patchright-nodejs do?

Undetected NodeJS version of the Playwright testing and automation library.

What is patchright-nodejs written in?

patchright-nodejs is primarily written in TypeScript. Its source is publicly available at https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs, and it has 803 GitHub stars.