Sessions & rotation
Rotate to a fresh IP on every request (a new -session value per request) or hold a single IP across many requests (sticky). This is controlled by the -session parameter you append to your username.
-session-<id> each request for a new IP every time, or keep the same -session-<id> to reuse one IP.Rotating sessions
To get a different IP on every request, send a fresh -session value on each request. Every unique session id maps to its own IP, and one port can serve many session ids at once, so N unique session ids give you N distinct concurrent IPs.
The two behaviours:
- Omit
-sessionentirely. The port holds one IP and rotates it automatically on your configured interval (from 1 minute up to 24 hours). Requests made before the interval elapses return the same IP. - Send a unique
-sessionvalue each time (for example a random string or an incrementing counter). Each new value maps to a new IP, which is the pattern to use for per-request rotation.
In this example there is no session parameter, so both calls exit on the endpoint's current IP until it rotates:
# Two requests, no session tag = the SAME exit IP
curl -x "http://USERNAME-country-us:[email protected]:20228" https://api.ipify.org
curl -x "http://USERNAME-country-us:[email protected]:20228" https://api.ipify.org
A fresh session value on every request gives per-request rotation:
# A new -session value each time = a new IP each time
curl -x "http://USERNAME-country-us-session-$RANDOM:[email protected]:20228" https://api.ipify.org
-session parameters — each port's rotation interval and auto-replace behaviour is set per port in the dashboard instead. See Per-port configuration on the Budget Unlimited page. To inspect a port's current IP and next rotation time, or force a rotation programmatically, use the Session API on the Public API page.Sticky sessions
To hold the same IP across multiple requests, pick a session id and keep sending it unchanged. The same -session-<id> value maps to the same IP for the life of the session. Use sticky sessions when you need continuity, such as logging in, browsing behind a session cookie, or completing a multi-step flow that must come from one IP.
Here the same -session-abc123 on both requests reuses one IP:
# Same -session value = same exit IP across requests (sticky)
curl -x "http://USERNAME-country-us-session-abc123:[email protected]:20228" https://api.ipify.org
curl -x "http://USERNAME-country-us-session-abc123:[email protected]:20228" https://api.ipify.org
The session id can be any string you choose (letters and numbers). Change it, or drop it, whenever you want a fresh IP.
Session TTL
By default a sticky IP is held for a standard window. To control that window yourself, append -ttl-<minutes>. The value is always in minutes and sets how long that session's IP is held before it is released.
# Hold this session's IP for 30 minutes
curl -x "http://USERNAME-country-us-session-abc123-ttl-30:[email protected]:20228" https://api.ipify.org
-ttl-30 means thirty minutes, not thirty seconds. Keep the TTL short if you want the IP to refresh often, or raise it (up to your product's maximum below) if you need the same IP to persist longer.Maximum sticky duration by product
Each product caps how long a single sticky IP can be held. Beyond the maximum, the session rotates to a new IP.
| Product | Sticky support | Maximum sticky duration |
|---|---|---|
| Budget Unlimited | Per port (dashboard) | Rotation interval set per port, 1 minute to 24 hours |
| Premium Unlimited | Yes | Up to 24 hours |
| Residential / ISP | Yes | Up to 60 hours |
| Mobile | No | Not supported; rotation is automatic |
| IPv6 | Yes | Sticky supported |
| Static ISP | Permanently pinned | IP never rotates |
Which products accept session and TTL
Not every product accepts both parameters. Check here before you build your username string:
| Product | -session | -ttl |
|---|---|---|
| Budget Unlimited | Configured per port in the dashboard, not via username parameters | |
| Premium Unlimited | Yes | Yes |
| Residential / ISP | Yes | Yes |
| Mobile | No | No |
| IPv6 | Yes | No |
| Static ISP | Not applicable; each port is a fixed dedicated IP | |
Best practices
- Use a unique session id per worker or thread. Give each concurrent task its own
-sessionvalue so their IPs don't collide, and each worker keeps a consistent identity. - Rotate on a ban. If a target blocks a session, change the
-sessionvalue (or drop it) to move that worker onto a fresh IP immediately. - Keep the TTL short if you need fresh IPs often. A low
-ttl-<minutes>refreshes the IP more frequently. Raise it only when you genuinely need the same IP to persist. - Match the session length to the job. Multi-step flows like login, checkout, or paginated browsing want a stable sticky IP, whereas one-off lookups are usually better rotating.
-session and -ttl strings automatically, which is a quick way to get the exact format for your product.Next steps
Targeting
Combine sessions with country, state, city, and ASN targeting in the same username string.
Code examples
Ready-to-run rotating and sticky examples in bash, Python, and JavaScript.
Last updated July 10, 2026