Skip to main content
By default every /getPageSource call can leave through a different IP. Add session=<id> and every call with that id leaves through the same IP, as long as the session is in use. Use it when a site ties something to the visitor’s address: a cart, a search session, a paginated listing, a rate limit you want to keep predictable.

Request

How a session behaves

When the IP changes

Unblocking comes first: when the session’s IP cannot get the page (the site blocks it, the IP does not answer), the call is answered through another IP rather than failing. Such an answer carries the response header:
and the session moves to the IP that served the page, so the next call continues there. The same header marks an answer that did not come over the session’s IP for any other reason: a parallel call over the limit, or a call that switched the session’s country. When the header is absent, the page came over the session’s IP. If your flow must not continue on another IP (for example a multi-step form), check for X-Session-Changed and restart the flow when it appears.

Combining with other parameters

session works with every other /getPageSource option: parsed_data, markdown, get_cookies, get_headers, steps, capture_xhr and proxy_country. A call with steps or capture_xhr runs once on the session’s IP and is not retried through another IP, because a step may submit a form.
A session keeps the IP. Cookies are not carried between calls: pass the ones you need yourself, for example from a get_cookies answer.