Proxy guide

How to Rotate Proxies in Node.js

Node.js scraping and automation scripts often need a clean way to fetch, rotate, and replace proxies. The Proxy11 Node SDK provides an async rotator over the proxy API.

SDKs

Example

npm install proxy11
const { ProxyClient } = require("proxy11");

const client = new ProxyClient("YOUR_API_KEY");
const rotator = await client.rotator({
  country: "us",
  proxyType: "anonymous",
  autoRefresh: true,
});

const proxy = await rotator.next();
console.log(proxy);

Practical Tips

  • Use the rotator for scripts that need many requests over time.
  • Call markDead(proxy) when a proxy fails in your request layer.
  • Use the raw API when you only need a simple exported list.

Proxy API

Fetch proxy lists in TXT, JSON, CSV, or XML formats.

API documentation

Python SDK

Install with pip and use rotators or requests sessions.

Python GitHub repo

Node.js SDK

Install with npm and use async proxy helpers.

Node.js GitHub repo