BROWSER-USE + PROXIES.SX

browser-use is a Python library that lets an LLM drive a real Chromium browser through Playwright: you give an Agent a task in plain English and it clicks, types and reads pages until the task is done.

Sign up Get an API key

RUNNABLE SAMPLE

Replace ACCOUNT_ID and PROXY_PASSWORD with the values from GET https://api.proxies.sx/v1/gateway/credentials (header X-API-Key: psx_...). The proxy password is set once in the portal and is not your login password.

# pip install browser-use   (Python 3.11+, then: playwright install chromium)
import asyncio, uuid
from browser_use import Agent, BrowserSession, BrowserProfile, ChatOpenAI

sid = uuid.uuid4().hex[:12]                       # one session id per run
proxy = {
    "server": "http://gw.proxies.sx:7000",
    "username": f"psx_ACCOUNT_ID-peer-us-rot-sticky-sid-{sid}",   # sticky US exit for the whole task
    "password": "PROXY_PASSWORD",
}

async def main():
    session = BrowserSession(browser_profile=BrowserProfile(proxy=proxy))
    agent = Agent(
        task="Open https://api.ipify.org?format=json and tell me the ip field",
        llm=ChatOpenAI(model="gpt-4o-mini"),
        browser_session=session,
    )
    print(await agent.run())

asyncio.run(main())

browser-use 0.2+ takes the proxy on BrowserProfile; older releases used BrowserConfig(proxy=...). Both accept the same server/username/password dict.

ROTATION FOR BROWSER-USE

Use: sticky, one -sid- per Agent run. A browser task is a session: cookies, logins and carts only make sense if every request in the run leaves from the same device. Generate a session id per run and pin it with -rot-sticky. Use auto10 only for stateless crawls.

Sticky pins the device for that session id, not the exit IP - mobile carriers re-NAT on their own schedule, so a pinned modem can still surface a new address. Without a -sid-, sticky and auto modes do nothing across connections. Unknown tokens are dropped silently, so -session- is not a substitute for -sid-.

CHANGE COUNTRY OR POOL

Edit the username only: peer-us, peer-jp, mbl-gb. peer covers ~127 countries; mbl is carrier modems in US, GB, FR, NL, PL and GE (Georgia). Check stock before you pick: GET https://api.proxies.sx/v1/gateway/pool/stock. $4/GB, $2.40/GB at 250 GB+, duration free.

MORE

/pool/skill.md (full username DSL and API contract) · /pool/ (Pool Gateway) · all integrations · skill.md for this section