Sticky sessions
Keep the same residential IP for 1 to 30 minutes with the session and ttl username flags — session ids, expiry behaviour and patterns for logins and checkouts.
On this page
A sticky session pins your residential traffic to one IP for a fixed time. Sessions have been available since 2023 and were extended to 30 minutes in September 2024.
Syntax#
Add -session-<id>-ttl-<minutes> after the country (and city) flags:
px4k2m9q7a-country-nl-session-a8k2m4q9-ttl-10
px4k2m9q7a-country-fr-city-paris-session-shop0001-ttl-30
| Flag | Format | Meaning |
|---|---|---|
session |
exactly 8 letters or digits | Your session id. Same id = same IP while the session lives. |
ttl |
integer, 1–30 | Maximum lifetime in minutes. Values outside the range are clamped. |
The session id is yours to choose. Generate random ids for parallel workers (secrets.token_hex(4) in Python gives 8 hex characters) and reuse an id for as long as one logical "user" needs the same IP.
Lifecycle#
- The first request with a new session id picks an IP in the requested location.
- Every request with the same id, login, country and city goes out through that IP.
- The session ends after
ttlminutes counted from its first request — it is not extended by activity. - The session also ends early if the residential peer goes offline (the device disconnects or changes network). The next request then gets a new IP for the same session id, in the same location.
Plan for the early end: residential IPs belong to real household connections. Most sessions reach their full TTL, but long sessions are more exposed to peers disconnecting. Check the exit IP where it matters (before a login, before payment) and restart the flow if it changed.
import secrets, requests
session = secrets.token_hex(4) # e.g. '3f9a0c7e'
user = f"px4k2m9q7a-country-nl-session-{session}-ttl-10"
proxy = f"http://{user}:[email protected]:7000"
s = requests.Session()
s.proxies = {"http": proxy, "https": proxy}
ip_before = s.get("https://api.ipify.org", timeout=30).text
# ... multi-step flow ...
ip_after = s.get("https://api.ipify.org", timeout=30).text
if ip_before != ip_after:
raise RuntimeError("exit IP changed mid-session — restart the flow")
Choosing a TTL#
| Task | Suggested TTL |
|---|---|
| Paginating search results | 2–5 min |
| Login + a few page views | 10 min |
| Checkout / form with several steps | 15–20 min |
| Long manual browsing in an antidetect profile | 30 min, and a new session id per profile |
Shorter TTLs recover faster from a slow peer. If you need the same IP for hours or days, use a static ISP proxy or a mobile proxy instead.
Many sessions at once#
There is no limit on the number of concurrent session ids. To generate a list of sticky endpoints — one id per line — use Dashboard → Residential → Endpoints → Sticky or:
curl "https://proxuno.com/api/v1/residential/endpoints?country=de&session=sticky&ttl=15&count=100&format=url" \
-H "Authorization: Bearer $PROXUNO_API_KEY"
Each line carries its own random session id, so a tool that picks lines at random still keeps one IP per line.
Something unclear, outdated or wrong on this page? Tell us — documentation issues are fixed in the next release at the latest.
Report an issue with this page