How to Use ProxyOmega Proxies with Playwright
Playwright drives Chromium, Firefox and WebKit from a single API in Node, Python, Java and .NET. It is the standard choice for cross-browser scraping and end-to-end testing. Unlike Puppeteer, Playwright accepts proxy credentials directly on the launch options object.
Quick start
Use the Premium Unlimited endpoint below — it accepts the username-modifier syntax used throughout this guide. Other plans use the same code shape with a different host and port (see the endpoint table at the bottom).
// npm install playwright
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({
proxy: {
server: 'http://premium.proxyomega.com:8000',
username: '<USERNAME>',
password: '<PASSWORD>'
}
});
const page = await browser.newPage();
await page.goto('https://api.ipify.org');
console.log(await page.textContent('body'));
await browser.close();
})();Rotation: sticky session vs rotating
Append -session-<id>-ttl-<seconds> to your username to hold the same exit IP. Drop the suffix entirely for a fresh IP on every request.
# pip install playwright && playwright install chromium
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
# Rotating — bare username
rotating = {"server": "http://premium.proxyomega.com:8000",
"username": "<USERNAME>", "password": "<PASSWORD>"}
# Sticky — keep IP for 600s
sticky = {"server": "http://premium.proxyomega.com:8000",
"username": "<USERNAME>-session-cart-ttl-600",
"password": "<PASSWORD>"}
browser = p.chromium.launch(proxy=sticky)
page = browser.new_page()
page.goto("https://api.ipify.org")
print(page.content())Country targeting
Add -country-XX (ISO 3166 alpha-2) to your username. State and city modifiers are supported on Premium Unlimited, Platinum and Mobile.
const browser = await chromium.launch({
proxy: {
server: 'http://premium.proxyomega.com:8000',
username: '<USERNAME>-country-jp',
password: '<PASSWORD>'
}
});
// All requests in this browser context exit via Japan IPs.Authentication: username/password vs IP whitelist
Two ways to authenticate. Username/password is set on every request and is what every example in this guide uses. IP whitelist is configured in the ProxyOmega dashboard — once your runner IP is listed, drop the credentials from the proxy URL and the connection is authorised by source IP.
Playwright sends Proxy-Authorization correctly from the launch options. Per-context proxies are also supported in newer versions — pass the proxy object to browser.newContext() instead of launch() for multi-identity setups.
Common errors and fixes
Wrong username or password, or the credentials contain a special character that was not URL-encoded. Re-copy from the dashboard.
Either the runner IP is not on your whitelist (if you use IP auth) or your network blocks outbound on the proxy port. Test with curl first.
Residential exits sometimes have tail latency. Raise client timeout to 30–60 s and enable retry. If timeouts persist across many sessions, the target is rate-limiting your country — switch country.
You have a -session- suffix in your username, or HTTP keep-alive is reusing the connection. Drop the session suffix and disable keep-alive on the client to force new exits.
Recommended plan
All endpoints
| Plan | Host | Port | Notes |
|---|---|---|---|
| Budget Unlimited | residential.proxyomega.com | 10000–10099 | Per-port country / rotation set in the dashboard. No username suffixes. |
| Premium Unlimited | premium.proxyomega.com | 8000 | Username modifiers: -country-XX, -session-{id}-ttl-{seconds}. |
| Platinum | platinum.proxyomega.com | 20228 | ASN / state / city targeting via username modifiers. |
| Mobile | mobile.proxyomega.com | 20229 | Real 4G/5G carrier IPs. Same username modifier syntax. |
| IPv6 | ipv6.proxyomega.com | 9000 | IPv6 exits, supports UDP_ASSOCIATE. |
FAQ
Can I use a different proxy per BrowserContext?
Yes — pass proxy to browser.newContext(). Each context can hit a different country or use a different sticky session, which is ideal for parallel account-isolated scrapes.
Does Playwright support SOCKS5?
Yes, prefix the server with socks5://. ProxyOmega primarily exposes HTTP CONNECT; talk to support if SOCKS5 is a hard requirement.
How do I see which IP a page used?
Visit https://api.ipify.org from the page after navigation, or read response.serverAddr() on a response handler.
Why does my Firefox-channel launch ignore the proxy?
Playwright Firefox uses a patched build that respects proxy settings — make sure you ran playwright install firefox, not just chromium.