No KYC — no ID, no selfie, no documents · Pay in crypto: BTC, USDT, USDC, ETH, SOL, LTC · Top up from $25
Language: English
See pricing

Guide · Playwright

Playwright static proxy setup in Python and Node.js

Pass the static IP's server, username and password to the browser or to each context, then check the exit IP before real work.

Last updated: · 5 min read

Quick answer

How do I set up a static proxy in Playwright?

For a Playwright static proxy, pass a proxy with server, username and password to chromium.launch(), or give each browser context its own proxy to run several static IPs in one browser. Then open api.ipify.org to check the exit IP. SteadyProxy static IPs are rented for 30 days, from $2.24 per IP as of October 2026, with no KYC and crypto payment.

What are the key facts?

Launch optionproxy = server, username, password (HTTP proxy login)
Per contextbrowser.newContext({ proxy }) gives each context its own static IP
SOCKS5Supported by Playwright; the docs describe username and password for HTTP(S) proxies, so pair SOCKS5 with the IP allowlist
SteadyProxy authenticationUsername and password, or an IP allowlist (up to 10 IPs)
Checkapi.ipify.org for the exit IP, ipinfo.io/json for the network
Code checksPython passed py_compile and Node.js passed node --check on 19 October 2026 (Playwright 1.60)

How do I set a static proxy in Playwright for Python?

Give the proxy at launch when the whole browser should use one static IP. The server is the HTTP address of your IP, http://host:port; the username and password go in their own fields, not in the URL. Playwright answers the proxy's login request for you, so no sign-in box appears. The example opens api.ipify.org, then ipinfo.io/json, and prints both.

playwright_sync.py: one static IP for the whole browser
"""Playwright (Python) through one static proxy.

Install: python -m pip install playwright && python -m playwright install chromium
"""
import os

from playwright.sync_api import sync_playwright

PROXY = {
    "server": "http://" + os.environ.get("PROXY_HOST", "gw.steadyproxy.com") + ":"
    + os.environ.get("PROXY_PORT", "7777"),
    "username": os.environ.get("PROXY_USER", "USERNAME"),
    "password": os.environ.get("PROXY_PASS", "PASSWORD"),
}

with sync_playwright() as p:
    browser = p.chromium.launch(proxy=PROXY)
    context = browser.new_context()
    page = context.new_page()
    page.goto("https://api.ipify.org?format=json", timeout=30000)
    print("Exit IP:", page.inner_text("body"))
    page.goto("https://ipinfo.io/json", timeout=30000)
    print("Network:", page.inner_text("body"))
    browser.close()

How do I run several static IPs in one Playwright browser?

Create one browser context per IP. The Playwright documentation states that a proxy can be set for the entire browser or for each browser context individually. Contexts do not share cookies or storage, so each one acts like a separate profile on its own IP. The Node.js example loops over two IPs, opens api.ipify.org in each context and closes the context after use. Fill the list with the host, port, username and password of each IP from your dashboard.

playwright_contexts.mjs: one context per static IP (Node.js)
// Playwright (Node.js): one browser, one context per static IP.
// Install: npm i playwright && npx playwright install chromium
import { chromium } from 'playwright';

// Copy host, port, username and password of each IP from your dashboard.
const staticIps = [
  { name: 'client-a', host: 'gw.steadyproxy.com', port: '7777', username: 'USERNAME', password: 'PASSWORD' },
  { name: 'client-b', host: 'gw.steadyproxy.com', port: '7777', username: 'USERNAME', password: 'PASSWORD' },
];

const browser = await chromium.launch();
try {
  for (const ip of staticIps) {
    const context = await browser.newContext({
      proxy: { server: `http://${ip.host}:${ip.port}`, username: ip.username, password: ip.password },
    });
    const page = await context.newPage();
    await page.goto('https://api.ipify.org?format=json', { timeout: 30000 });
    console.log(ip.name, await page.innerText('body'));
    await context.close();
  }
} finally {
  await browser.close();
}

Should I use HTTP or SOCKS5 in Playwright?

Use the HTTP port with username and password in most cases. It is the combination the Playwright documentation describes for proxy login, and HTTPS pages travel through a CONNECT tunnel. Use SOCKS5 with a socks5:// server only when your machine is on the IP allowlist, so no login is needed. Both ports of one static IP give the same exit IP. SteadyProxy supports HTTP, HTTPS (CONNECT) and SOCKS5.

How do I keep logins between runs on the same static IP?

Save the context's storage state after you log in, and load it next time with the same proxy. In Python, context.storage_state(path='client-a.json') writes cookies and local storage; browser.new_context(storage_state='client-a.json', proxy=...) restores them. Keep one state file per IP and per account, and never load one account's state on another account's IP. Treat these files as secrets.

What goes wrong most often?

Four errors cover most cases. ERR_PROXY_CONNECTION_FAILED means the host or port is wrong or blocked on your side. A 407 response means a wrong login, or a source IP missing from your allowlist. ERR_TUNNEL_CONNECTION_FAILED means the proxy refused the target; check the blocked list: Banking, government, payment-portal and ticketing sites, plus SMTP (email-sending) ports 25, 465 and 587. A timeout on every page points to a fault on the IP; test it with curl, then contact support.

What else do people ask about Playwright and static proxies?

Can I put the username and password in the server URL?

Use the separate username and password fields instead. They are the documented way to log in to an HTTP proxy in Playwright, and they avoid URL-encoding problems with special characters. The server field then holds only the scheme, host and port of your static IP.

Does each Playwright page get its own IP?

No. Pages inherit the proxy of their context, and contexts inherit the browser's proxy unless they set their own. All pages in one context share one static IP. For several IPs, create several contexts, as in the Node.js example, or several browsers.

Can I use Firefox or WebKit with a static proxy in Playwright?

Yes. The proxy option has the same shape for chromium, firefox and webkit launches. Test each engine with api.ipify.org, because engines differ in how they handle some proxy errors. For QA across engines, keep the same static IP for every engine so results stay comparable.

Should I set the locale and timezone to match the IP?

For local QA and geolocation testing, yes: browser.new_context(locale='de-DE', timezone_id='Europe/Berlin') makes your site render as it would for a local visitor. It changes what your test browser asks for, not the IP, which still decides the country your site detects. See geolocation QA for test plans.

How do I check that every context uses the right IP?

Open api.ipify.org first in each new context and compare the answer with the IP list in your dashboard. Fail the run if it does not match. The cost is one light request per context, and it prevents a whole run from going out on the wrong IP.

How much does it cost to run 10 Playwright contexts on 10 static IPs?

As of October 2026, 10 ISP IPs cost $20.86 and 10 dedicated datacenter IPs cost $12.69, each for 30 days. Billing is per IP, not per GB. Payment is in crypto, with no KYC. See pricing for all plan sizes.

Which sources does this guide use? (3)
  1. Network: HTTP proxy (Python) — Playwright (2026-10-19)
  2. Network: HTTP proxy (Node.js) — Playwright (2026-10-19)
  3. ipify API — ipify (2026-10-19)

From $2.24 per ISP IP · 30 days · no KYC

See pricing