Sessions
By default, every request rotates to a new IP. When you need the same IP across multiple requests, open a sticky session.
Per-request rotation
Section titled “Per-request rotation”Send requests with no sid flag. Each request uses a different IP.
curl -x customer-USERNAME-country-us:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json# 72.14.201.44
curl -x customer-USERNAME-country-us:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json# 98.207.12.9Sticky session
Section titled “Sticky session”Add sid-<id> to the username. The id is any string you choose; subsequent requests with the same id return the same IP until the TTL expires or the IP drops upstream. ttl-<seconds> is optional and only valid alongside sid — it overrides the default lifetime (120 seconds, minimum 1). The panel’s endpoint builder also defaults to 120.
customer-USERNAME-country-us-sid-order42 # default 120s lifetimecustomer-USERNAME-country-us-sid-order42-ttl-600 # custom 10-minute lifetimecurl -x customer-USERNAME-sid-order42-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json# 72.14.201.44
curl -x customer-USERNAME-sid-order42-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json# 72.14.201.44 (same)Choosing a session id
Section titled “Choosing a session id”- Pick something unique per workflow (
order-42,user-a7f3,checkout-2024-11-21-1). - Two separate runs sharing the same id at the same time will collide on one sticky IP.
- The id is arbitrary; Shifter does not parse it. It is used as a cache key.
When the session expires
Section titled “When the session expires”- After
ttlseconds, the mapping drops and the next request rotates to a new IP (targeting flags are preserved). - If the underlying residential IP disconnects sooner, the session ends early and the next request rotates.
Combining with geo-targeting
Section titled “Combining with geo-targeting”Sticky sessions respect your other flags. A session id locks in one IP from within your filter:
customer-USERNAME-country-us-city-los_angeles-sid-scrape1 # default 120scustomer-USERNAME-country-us-city-los_angeles-sid-scrape1-ttl-300 # custom 5-minAll requests with the same id stay on one Los Angeles IP for the duration of the TTL.
- Geo-targeting, narrow the pool before pinning.
- Integrations, session ids in Scrapy, Puppeteer, Playwright.