Using our proxies with Playwright
Playwright takes a proxy object when you launch the browser or create a context, so each context can have its own exit IP. This suits QA and geo-testing of your own sites.
Pick a proxyCompatibility
- The proxy option has server (required), bypass, username and password; it can be set at launch or per browser context.
- server accepts HTTP and SOCKS proxies, e.g. http://host:3128 or socks5://host:3128; host:port without a scheme is treated as HTTP.
- Playwright documents username and password for HTTP proxies that require authentication.
- Chromium does not support username/password authentication for SOCKS5 (per Chromium's proxy documentation); use HTTP with credentials, or SOCKS5 with an IP allowlist.
- Protocols:
- HTTP, HTTPS (CONNECT), SOCKS5
- Connection:
- Username and password, IP allowlist
Configuration
# check_ip.py
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://PROXY_HOST:PORT",
"username": "USERNAME", # omit both fields for IP allowlist
"password": "PASSWORD",
})
page = browser.new_page()
page.goto("https://api.ipify.org?format=json")
print(page.inner_text("body"))
browser.close()The sample launches Chromium through an HTTP proxy with credentials and prints the JSON from the test endpoint. For per-context proxies, pass the same object to browser.new_context(proxy=...). For IP allowlist access, omit username and password.
PROXY_HOST, PORT, USERNAME and PASSWORD are placeholders. After we select proxies for your task, we send you the real host, port and credentials.
Check the result
python check_ip.py
# expected output: {"ip":"<exit IP>"}- Run the script and confirm the printed ip equals the exit IP we sent you.
- Look up the exit IP in two independent GeoIP services and confirm both show the country (and city, if you asked for one) from your request. GeoIP databases can disagree; tell us if they do.
- Open a page of your own site in the same context and confirm language, currency, consent banner and redirects match the requested country.
What to put in the request
- Browser engine you run (Chromium, Firefox, WebKit) and whether you need one proxy per context.
- Protocol: HTTP with username/password, or SOCKS5 with IP allowlist.
- Countries (and cities, if needed) for your test matrix.
- Session mode: static IP for repeatable QA runs, or sticky sessions per test.
- The sites under test and confirmation that you own them or are permitted to test them.
Common pitfalls
- Putting credentials into a socks5:// server URL for Chromium: SOCKS5 authentication is not supported there and the connection fails.
- Using bypass too broadly, so some requests skip the proxy and the page loads assets from your own IP.
- Reusing one context across countries: cookies and storage from the previous country can change what the page shows.
Recommended proxy types
Sources
Not sure which proxy fits?
Describe the task in two sentences. We reply with a concrete setup and price, usually within one business day.
Availability, exact parameters and price are confirmed in our reply after manual selection. Nothing is charged automatically.