Playwright
Playwright is a modern browser automation library from Microsoft that supports Chromium, Firefox, and WebKit. It has built-in proxy support, making it straightforward to route traffic through HypeProxy.io proxies.
Setting Up HypeProxy.io with Playwright
JavaScript / TypeScript
const { chromium } = require('playwright');
const browser = await chromium.launch({
proxy: {
server: 'http://fr.hypeproxy.host:port',
username: 'your_username',
password: 'your_password'
}
});
const page = await browser.newPage();
await page.goto('https://api.ipify.org');
console.log(await page.textContent('body'));
await browser.close();
Python
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
'server': 'http://fr.hypeproxy.host:port',
'username': 'your_username',
'password': 'your_password'
})
page = browser.new_page()
page.goto('https://api.ipify.org')
print(page.text_content('body'))
browser.close()
SOCKS5 Proxy
const browser = await chromium.launch({
proxy: {
server: 'socks5://fr.hypeproxy.host:port',
username: 'your_username',
password: 'your_password'
}
});
Per-Context Proxy
You can also set proxies per browser context for multi-account scenarios:
const browser = await chromium.launch();
const context = await browser.newContext({
proxy: {
server: 'http://fr.hypeproxy.host:port',
username: 'your_username',
password: 'your_password'
}
});
const page = await context.newPage();
Tips
- Playwright handles proxy authentication natively — no extensions or workarounds needed.
- Use per-context proxies to manage multiple accounts in a single browser instance.
- Combine with HypeProxy.io API for automatic IP rotation between scraping runs.
- Playwright supports all three browser engines — test with the one that best matches your target site.
