Skip to content
Login Sign up

Sessions

By default, every request rotates to a new IP. When you need the same IP across multiple requests, open a sticky session.

Send requests with no sid flag. Each request uses a different IP.

Terminal window
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.9

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 lifetime
customer-USERNAME-country-us-sid-order42-ttl-600 # custom 10-minute lifetime
Terminal window
curl -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)
  • 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.
  • After ttl seconds, 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.

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 120s
customer-USERNAME-country-us-city-los_angeles-sid-scrape1-ttl-300 # custom 5-min

All requests with the same id stay on one Los Angeles IP for the duration of the TTL.