PLAYWRIGHT + PROXIES.SX

Playwright is Microsoft's browser-automation library for Chromium, Firefox and WebKit, with first-class proxy support at launch time and per-context.

Sign up Get an API key

RUNNABLE SAMPLE

Replace ACCOUNT_ID and PROXY_PASSWORD with the values from GET https://api.proxies.sx/v1/gateway/credentials (header X-API-Key: psx_...). The proxy password is set once in the portal and is not your login password.

// npm i playwright   (then: npx playwright install chromium)
import { chromium } from "playwright";
import { randomUUID } from "node:crypto";

const sid = randomUUID().slice(0, 12);            // one session id per context
const browser = await chromium.launch({
  proxy: {
    server: "http://gw.proxies.sx:7000",
    username: `psx_ACCOUNT_ID-peer-gb-rot-sticky-sid-${sid}`,      // sticky UK exit
    password: "PROXY_PASSWORD",
  },
});
const page = await browser.newPage();
await page.goto("https://api.ipify.org?format=json");
console.log(await page.textContent("body"));
await browser.close();

Python Playwright is identical: chromium.launch(proxy={"server": ..., "username": ..., "password": ...}). SOCKS5 with auth is not supported by Chromium's proxy stack, so use the HTTP port :7000 here.

ROTATION FOR PLAYWRIGHT

Use: sticky per browser context; ondemand for one-shot fetches. Pin one session id per context so a login survives navigation. If you open many contexts in parallel, give each its own -sid- and they each get their own device.

Sticky pins the device for that session id, not the exit IP - mobile carriers re-NAT on their own schedule, so a pinned modem can still surface a new address. Without a -sid-, sticky and auto modes do nothing across connections. Unknown tokens are dropped silently, so -session- is not a substitute for -sid-.

CHANGE COUNTRY OR POOL

Edit the username only: peer-us, peer-jp, mbl-gb. peer covers ~127 countries; mbl is carrier modems in US, GB, FR, NL, PL and GE (Georgia). Check stock before you pick: GET https://api.proxies.sx/v1/gateway/pool/stock. $4/GB, $2.40/GB at 250 GB+, duration free.

MORE

/pool/skill.md (full username DSL and API contract) · /pool/ (Pool Gateway) · all integrations · skill.md for this section