Session Types
Rotating IP (Default)
Behavior: You get a new IP address on every single request.
Use Case: Ideal for large-scale scraping tasks where you need maximum diversity of IPs to avoid rate limits and blocks.
How to use: Send requests with your base username, without any session parameters.
Use Case: Ideal for large-scale scraping tasks where you need maximum diversity of IPs to avoid rate limits and blocks.
How to use: Send requests with your base username, without any session parameters.
Sticky IP (Sticky Session)
Behavior: You get a single IP address and can reuse it for a specific period.
Use Case: Essential for any multi-step workflow on a website, such as logging in, adding items to a cart, or navigating through paginated results.
How to use: Add the
Use Case: Essential for any multi-step workflow on a website, such as logging in, adding items to a cart, or navigating through paginated results.
How to use: Add the
-session parameter to your username.Session Control Parameters
These parameters work together to give you full control over your sticky sessions.Session ID (-session)
This is the primary parameter for enabling a sticky session.
Parameter Details
Parameter Details
- Format:
-session-[id] - Value: Any alphanumeric string you choose. This string is your unique identifier for a session.
- Dependencies: None. Note the reverse dependency, though:
-time,-constand the targeting parameters you send are all bound to the session ID at the moment the session starts (see the warning below). - How it works: All requests sent with the same session ID will be routed through the same exit IP for the duration of the session. To get a new IP or a new configuration, change the session ID.
- Example Usernames:
...-my_scraper-session-user123(gets IP A)...-my_scraper-session-user123(still gets IP A)...-my_scraper-session-user456(gets a new IP, IP B)
Session Time (-time)
By default, a sticky session lasts for 10 minutes. The -time parameter allows you to change this duration.
Parameter Details
Parameter Details
- Format:
-time-[minutes] - Value: A whole number.
- Dependencies: Must be used together with a
-sessionparameter. - Example Username:
...-my_scraper-session-user123-time-30 - Result: The sticky session for
user123will now last for 30 minutes instead of the default 10. - Error Case: Using
-time-30without-sessionwill result in an error.
Strict Session (-const)
This parameter changes the behavior of the gateway when a session IP goes offline.
Parameter Details
Parameter Details
- Format:
-const(this is a flag, it has no value). - Dependencies: Must be used together with a
-sessionparameter. - Default Behavior (without
-const): If your session IP goes offline, we automatically assign a new IP to your session. This ensures your scraper continues working. - Behavior with
-const: If your session IP goes offline, we do not assign a replacement. Instead, your request will fail with a502 Bad Gatewayerror and anX-2extract-Error: Session IP is offlineheader. - Use Case: Use this only when your workflow is critically dependent on using the exact same IP from start to finish, and you would rather have the process fail than continue with a new IP.
- Example Username:
...-my_scraper-session-user123-time-60-const
Forcing a New IP (/change_ip)
Sometimes you need a fresh exit IP without waiting for the session to expire and without changing the session ID - typically when driving a browser profile by hand.
Parameter Details
Parameter Details
- Format: an HTTP request to
{scheme}://{username}:{password}@proxy.2extract.net:5555/change_ip, where{scheme}matches the protocol your proxy is configured with (httporhttps) - Dependencies: only meaningful for a username that carries a
-sessionparameter. A rotating proxy already changes IP on every request. - How it works: the request releases the exit IP pinned to that session ID. The replacement IP is assigned on your next request through the proxy, not at the moment you call the URL.
- What stays the same: username, password, session ID and all targeting parameters. The new IP is drawn from the same targeting you already set.
- Works with
-const: yes.-constprevents silent automatic rotation, while calling/change_ipis a deliberate action.
Anti-detect browsers expose this as an IP change link field on the proxy profile, and the ready-made URL is shown in the Verify & Connect block of the Integration tab. See Anti-Detect Browsers for the full walkthrough.