Session Control
Learn how to manage a session ID parameter, which allows you to keep the same IP address to run multiple requests.
Establishing session
The session ID parameter allows you to keep the same IP address to run multiple requests. To reuse the same IP multiple times, use sessid parameter after username with randomly created alphanumeric string, for example, sessid-abcd1234.
The standard session time is 10 minutes or up to 60s of inactivity (no requests). After that, a new IP address is assigned automatically. To adjust desired session time please refer to Session time.
For example, your initial query with sessid-abcd1234 assigned proxy IP address 1.1.1.1. As long as you keep sending new requests with the same session ID and that IP address is online and available, the system will route your queries through 1.1.1.1. If you stop sending requests for 60 seconds or the IP address is no longer online, the system will assign a new proxy IP. Your next query with sessid-abcd1234 will be routed through a different IP address e.g. 1.1.1.2.
Credentials list example:
Example represents a list of credentials that establish different sessions.
Code example
In this example, we are using German IP with sessid-abcd1234 in the username with the first request. All following requests will keep the same German IP with further queries:
Session time
The sesstime parameter goes together with sessid, and allows you to prolong the session above 10 minutes or set a particular time for it.
The sessid_oneip parameter is an alternative to sessid for cases where you must keep the exact same IP for the entire session.
With a regular sessid, if the assigned exit node goes offline before the session time expires, the system automatically assigns a new IP and your session continues.
With sessid_oneip, the session is bound to a single exit node: once that IP is no longer available, instead of rotating to a new one, the request fails with an HTTP 502 response. At that point you should start a new session with a fresh sessid_oneip value. sessid_oneip can be combined with sesstime in the same way as sessid.
You can use the sesstime parameter to maintain the same IP for up to 1440 minutes (24 hours).
However, because the residential proxy pool is dynamic, your connection may end sooner. If that happens, start a session with a new session parameter.
Session time parameter does not ensure that all your queries are finished by the end of the session. The session will expire within the time limit set, even if requests are not finished.
sessid_oneip is an optional alternative to sessid. The default sessid behavior (automatic rotation to a new IP when the exit node expires) is unchanged.
Credentials list example:
Example represents a list of credentials that establish different sessions with different sessions time (minutes).
Code example
We chose the same German IP as in the previous example, this time we are adding sessid string and sesstime parameter for 7 minutes:
Was this helpful?

