Playwright with a UK home IP
Playwright takes the proxy when the browser launches. Use the HTTP port, and pass the username and password separately.
Before you start
You need a ProxyPi login. The free 100 MB trial is enough to test this guide. Copy HOST, PORT, USERNAME and PASSWORD from your dashboard. Examples that read PROXYPI_HTTP expect http://USERNAME:PASSWORD@HOST:PORT in that environment variable.
Python
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://HOST:PORT",
"username": "USERNAME",
"password": "PASSWORD",
})
page = browser.new_page(locale="en-GB", timezone_id="Europe/London")
page.goto("https://api.ipify.org")
print(page.inner_text("body"))
browser.close()
Node.js
import { chromium } from "playwright";
const browser = await chromium.launch({
proxy: { server: "http://HOST:PORT", username: "USERNAME", password: "PASSWORD" },
});
const page = await browser.newPage({ locale: "en-GB", timezoneId: "Europe/London" });
await page.goto("https://api.ipify.org");
console.log(await page.innerText("body"));
await browser.close();
Good to know
- Use the HTTP port for browsers. Chromium does not accept a username and password on a SOCKS5 proxy.
- Setting
localeandtimezone_idto the UK makes the browser match the IP, which matters for UK QA and ad checks.
Official documentation
Third-party APIs change. We checked these against the official docs on 23 November 2026. If something has moved, the linked docs win.
Try it on a real UK home line
The trial is 100 MB of UK residential data. No card needed. Your host, port and login are in your dashboard once you have signed up.
Use ProxyPi within the acceptable use policy and the terms of the sites and tools you use.