The standard Python HTTP library Point it at one gateway host and every request exits from a different residential address, with country targeting when you need it.
HTTPS and SOCKS5 IP whitelist or user and password From $24.95/mo
You need an active plan, your gateway credentials from the dashboard, and either your server IP whitelisted or a user and password pair. Replace USER:PASS in the examples with your real credentials.
The rotating port gives a new IP on every request. Sticky ports hold one address for the life of the session, and both live on the same host, so you choose by port rather than by product.
A Session keeps the TCP connection open, so a rotating port may hand you the same address for consecutive requests on that connection. Open a new Session, or use a fresh request, when you need a guaranteed new IP each time.
requests takes a proxies dictionary. Set both http and https to the same gateway so every scheme routes through it.
import requests
PROXY = "http://USER:PASS@gateway.proxyrotator.com:11000"
proxies = {"http": PROXY, "https": PROXY}
r = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=30)
print(r.json())
Use a Session when you want connection reuse across many requests, which is faster and lighter on the gateway:
import requests
PROXY = "http://USER:PASS@gateway.proxyrotator.com:11000"
with requests.Session() as s:
s.proxies = {"http": PROXY, "https": PROXY}
for _ in range(5):
print(s.get("https://api.ipify.org").text)
Running more than one tool against the same gateway is normal. These cover the others.
One gateway, every proxy type, from $24.95/mo. Standard HTTPS and SOCKS5 so your existing code works unchanged.