Language

Python requests proxy setup

The requests library takes a proxies dict and routes every call through it. Drop in your gateway URL and you are scraping from residential IPs the target trusts — no browser, no SDK. Add targeting in the username to pick a country or pin an IP.

Get 1 GB of residential data — freeon your first $10+ top-upClaim it

Connection details

proxmint · gateway
Host : Port (HTTP)gw.proxmint.com:823
Host : Port (SOCKS5)gw.proxmint.com:824
UsernamePROXY_USER
PasswordPROXY_PASS

Swap PROXY_USER / PROXY_PASS for the credentials on your dashboard. New here? Create an account to generate a key.

Python (requests) proxy example

python
import requests

proxy = "http://PROXY_USER:PROXY_PASS@gw.proxmint.com:823"
proxies = {"http": proxy, "https": proxy}

r = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=30)
print(r.json())  # a fresh residential IP each call

# Target a country: put the targeting in the username
us = "http://PROXY_USER__cr.us:PROXY_PASS@gw.proxmint.com:823"
r = requests.get("https://api.ipify.org", proxies={"http": us, "https": us}, timeout=30)
print(r.text)

Steer the exit IP from the username

append to your username
CountryPROXY_USER__cr.us
Country + cityPROXY_USER__cr.us;city.newyork
Sticky IP (30 min)PROXY_USER__sessid.abc123;sessttl.30

Tips & gotchas

  • Set a timeout — residential exits are real connections and occasionally slow; retry on failure.
  • Pin one IP across a login flow with a sticky session: PROXY_USER__sessid.abc123;sessttl.30.

Python (requests), answered

How do I rotate IPs with Python requests?

Rotation is automatic on the rotating port — every request through the gateway gets a new residential IP. You do not manage an IP list; just reuse the same proxies dict.

How do I keep the same IP across several requests?

Add a sticky session id to the username: PROXY_USER__sessid.abc123;sessttl.30 keeps the same exit IP for up to 30 minutes, which is ideal for multi-step flows behind a login.

Ready to route Python (requests) through residential IPs?

Create an account, paste the code above, and we'll add your first 1 GB of residential free on your first top-up. Pay by the GB after that — no subscription.