Playwright supports proxies natively, including credentials in the launch options (no authenticate() dance like Puppeteer) and — the killer feature — a different proxy per browser context. One Chromium process, N countries.
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://residentialboson.quantumproxies.io:10000",
"username": "YOUR_USERNAME-country-us-session-pw1-lifetime-30",
"password": "YOUR_PASSWORD",
})
page = browser.new_page()
page.goto("https://ipinfo.io/json")
print(page.inner_text("body"))browser = p.chromium.launch(proxy={"server": "per-context"})
us = browser.new_context(proxy={
"server": "http://residentialboson.quantumproxies.io:10000",
"username": "YOUR_USERNAME-country-us-session-us1-lifetime-30",
"password": "YOUR_PASSWORD",
})
jp = browser.new_context(proxy={
"server": "http://residentialboson.quantumproxies.io:10000",
"username": "YOUR_USERNAME-country-jp-session-jp1-lifetime-30",
"password": "YOUR_PASSWORD",
})This is the cheapest way to check localized pricing, ad delivery, or search results side-by-side — each context is an isolated cookie jar exiting from its own country, but you pay the launch cost of a single browser.
Run the demo (prints your exit IP from 3 countries):
pip install playwright && playwright install chromium
QP_USER=... QP_PASS=... python example.py
- Use the sticky port
10000with a-session-flag: a browser context firing 50 sub-requests from 50 different IPs is an instant block. - Mobile pages? Swap in 4G/5G mobile proxies — carrier-grade IPs that mobile-first sites treat as real phones.
Credentials come from QuantumProxies — residential and mobile pools, 195+ countries, per-GB billing. Register at app.quantumproxies.io.