Integrations / Browser automation

Use Proxys with Playwright

Run Playwright browsers through Proxys. Use one sticky session per browser context.

Steps

  1. Pass server, username and password in the proxy option.
  2. Add -session-<id> to keep one IP for a whole browsing session.
JavaScript
const browser = await chromium.launch({
  proxy: { server: "http://gw.proxys.co:8000", username: "USERNAME-country-us-session-s1", password: "PASSWORD" },
});
const page = await browser.newPage();
await page.goto("https://ipinfo.io/json");
Python
browser = p.chromium.launch(proxy={"server": "http://gw.proxys.co:8000", "username": "USERNAME-country-us-session-s1", "password": "PASSWORD"})

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1