# Node Unblocker for Web Scraping: Setup, Where It Breaks, and Upstream Proxies > Source: https://scrape.do/blog/node-unblocker/ Published: 2026-11-23 · Updated: 2026-11-23 · Authors: Serhat Kurtulus · Categories: Proxy This guide sets up Node Unblocker on Express and uses it as a scraping proxy on three pages: a plain HTML catalog, a JavaScript-rendered page, and a G2 review page behind DataDome. Then it adds an upstream proxy and sends the same pages through the Scrape.do API. Every result below comes from scripts we ran, and the code is here so you can run them yourself. ## What Is a Node Unblocker? Node Unblocker is an open-source web proxy for Node.js by Nathan Friedly. You mount it as Express middleware. When a client asks your server for `/proxy/https://example.com/`, your server fetches that page, rewrites it so its links point back through the proxy, and sends it on. The basics: | | | |---|---| | npm package | `unblocker` | | Source | `nfriedly/node-unblocker` on GitHub | | License | AGPL-3.0 | | Mounts as | Express middleware | The GitHub description opens with "Web proxy for evading internet censorship". Scraping is a side use, and that origin explains most of this article: it is built to show pages to a person in a browser. It is also not an HTTP proxy in the usual sense. You don't put it in the `proxy` option of an HTTP client the way our [Axios proxy guide](/blog/nodejs-axios-proxy/) does. You prepend its address to the URL you want. And unlike a [reverse proxy](/blog/reverse-proxy/), which sits in front of one site, it fetches whatever site the URL names.  ## How Do I Set Up Node Unblocker? Create a folder and install the package: ```bash mkdir unblocker-test && cd unblocker-test npm init -y npm install unblocker@2.3.1 ``` Express arrives as a dependency of `unblocker`, so the server below runs without a second install. In a real project, add `express` to your own `package.json` so an update to `unblocker` can't remove it from under you. Before you put it on a public server, check its dependencies with `npm audit` or the OSV database. When we tested, the package itself had no advisories, but two of its dependencies, `cookie` and `send`, had low-severity ones, and the version ranges `unblocker` asks for did not allow the fixed releases. Do not leave the server open to the internet either. With no login, it fetches any URL for anyone who finds it, so put it behind authentication or a firewall. Save this as `server.js`: ```javascript const express = require("express"); const Unblocker = require("unblocker"); const app = express(); const unblocker = Unblocker({ prefix: "/proxy/", requestMiddleware: [ (data) => { data.headers["user-agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"; }, ], }); app.use(unblocker); app.listen(8090).on("upgrade", unblocker.onUpgrade); console.log("unblocker on http://localhost:8090/proxy/"); ``` Each function in `requestMiddleware` runs before the request leaves your server. This one swaps in a browser user agent. Node Unblocker copies the client's headers onto the outgoing request, and Node's built-in `fetch()` sends the user agent `node` (we checked it against httpbin), so without this function the target sees `node`. The `upgrade` handler lets the proxy pass WebSocket connections through. Start it with `node server.js`, then open `http://localhost:8090/proxy/https://books.toscrape.com/` in a browser or with curl. You should get the catalog page back, served through your own server. ## How Do I Scrape a Website With Node Unblocker? From your scraper's side, using Node Unblocker means one thing: put `http://localhost:8090/proxy/` in front of every URL. This script pulls the book titles and prices from the first catalog page with Node's built-in `fetch()`: ```javascript // scrape.mjs: scrape books.toscrape.com through a local Node Unblocker (node scrape.mjs) const PROXY = "http://localhost:8090/proxy/"; const target = "https://books.toscrape.com/"; const res = await fetch(PROXY + target); const html = await res.text(); const books = [...html.matchAll( /
([^<]+)<\/p>/g )].map(([, href, title, price]) => ({ title, price, url: new URL(href, target).href })); const next = html.match(/