Skip to main content

browser-use-proxyhat

Route browser-use AI agents through ProxyHat residential proxies — a sticky residential IP pinned for the whole agent session, plus geo-targeting and rotation.

CI Compatible with browser-use latest PyPI License: MIT

[!TIP] Recommended proxies — ProxyHat residential IPs. Every feature in this package is tested end-to-end against ProxyHat and works great. First-class integration; also works with any proxy, or none.

Why

Browser agents driving a real browser from a datacenter IP get flagged, CAPTCHA-walled, and blocked. This package plugs ProxyHat's residential IPs (50M+ across 148+ countries) into any browser-use agent through its first-class proxy= option — one pinned residential IP for the whole session by default, so cookies and fingerprint stay consistent while the agent works. No fork, no boilerplate.

Install

pip install browser-use-proxyhat

browser-use is a peer dependency — bring your own version (and its Playwright browser). proxyhat_proxy() (the proxy dict builder) works on its own; proxyhat_browser_session() needs browser-use installed:

pip install browser-use-proxyhat browser-use

Quick start

from browser_use import Agent, ChatOpenAI
from browser_use_proxyhat import proxyhat_browser_session

# An API key auto-selects an active residential sub-user:
agent = Agent(
    task="Find the cheapest flight from SFO to Tokyo next month.",
    llm=ChatOpenAI(model="gpt-4o-mini"),
    browser_session=proxyhat_browser_session(country="us"),  # sticky US IP for the whole session
)
await agent.run()

Get an API key at proxyhat.com.

Just want the proxy dict for your own Browser / BrowserSession / BrowserProfile?

from browser_use import BrowserSession
from browser_use_proxyhat import proxyhat_proxy

session = BrowserSession(proxy=proxyhat_proxy(country="de", sticky="1h"))
# proxyhat_proxy(...) -> {"server": "http://gate.proxyhat.com:8080", "username": ..., "password": ...}

Credentials

Pass them explicitly or via environment variables — options win over env:

Option Env var Notes
api_key PROXYHAT_API_KEY Auto-selects an active sub-user with remaining traffic
sub_user PROXYHAT_SUBUSER Pick a specific sub-user by uuid or name (with an API key)
username PROXYHAT_USERNAME Explicit gateway proxy_username (skips the API)
password PROXYHAT_PASSWORD Explicit gateway proxy_password

Targeting

proxyhat_browser_session(
    protocol="http",   # or "socks5"
    country="us",      # ISO code or "any" (default)
    region="california",
    city="new_york",
    filter="high",     # AI IP-quality tier
    sticky="30m",      # session lifetime (default); sticky=False rotates every request
    headless=True,     # any extra kwarg is forwarded to BrowserSession
)

Sticky IP per agent session (default)

A browser agent takes many steps against the same site — logging in, clicking, scrolling. If the exit IP changed mid-session the site would see a user teleporting between cities and block it. So this package is sticky by default: one residential IP is pinned for the whole BrowserSession (sticky="30m", renewed as the agent works), keeping cookies and fingerprint coherent.

Want a fresh IP on every request instead (e.g. many independent one-shot fetches)? Turn stickiness off:

proxyhat_browser_session(country="us", sticky=False)  # rotating residential IP per connection

Set a custom lifetime with sticky="2h".

How it works

proxyhat_proxy(...) resolves your gateway credentials (via the official proxyhat SDK — an API key auto-picks an active sub-user, or pass username/password), then builds a Playwright-style proxy dict: server is the ProxyHat gateway (http://gate.proxyhat.com:8080, or socks5://…:1080), and username carries ProxyHat's targeting grammar (<user>-country-us-sid-<id>-ttl-30m). proxyhat_browser_session(...) passes that dict to browser-use's proxy= parameter on a BrowserSession — which browser-use hands to Playwright. A sticky username pins one residential IP; a rotating one makes the gateway hand out a fresh IP per connection.

License

MIT © ProxyHat

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browser_use_proxyhat-0.1.1.tar.gz (238.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browser_use_proxyhat-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file browser_use_proxyhat-0.1.1.tar.gz.

File metadata

  • Download URL: browser_use_proxyhat-0.1.1.tar.gz
  • Upload date:
  • Size: 238.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for browser_use_proxyhat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ab4c951ddf76163c4bc438ab624af808dab7522d4d5279f06e77a6aa862c05ed
MD5 95b4d6178b0a5c15630010c763096041
BLAKE2b-256 49168bf432bef33487454cf591d33855026291a3f86420a0a27ca4a39213eeb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for browser_use_proxyhat-0.1.1.tar.gz:

Publisher: ci.yml on ProxyHatCom/browser-use-proxyhat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file browser_use_proxyhat-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for browser_use_proxyhat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 558982114cbace1dae13d24f8e215ae03477ea6551e0190101fbfd17f34ecf33
MD5 3f5849f2c0eec608a46d04c523301c05
BLAKE2b-256 13d592a78d7ca6b9ef6b495426a2df0ddad075fb92ad5a7c4b066100c74bd975

See more details on using hashes here.

Provenance

The following attestation bundles were made for browser_use_proxyhat-0.1.1-py3-none-any.whl:

Publisher: ci.yml on ProxyHatCom/browser-use-proxyhat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page