@@ -1703,45 +1703,38 @@ <h3>Class variables</h3>
17031703 def cloud_browser_unblock(
17041704 self,
17051705 url: str,
1706- proxy_pool: Optional[str] = None,
17071706 country: Optional[str] = None,
17081707 os: Optional[str] = None,
17091708 browser_brand: Optional[str] = None,
1709+ session: Optional[str] = None,
17101710 timeout: Optional[int] = None,
17111711 browser_timeout: Optional[int] = None,
1712- headers: Optional[Dict] = None,
1713- body: Optional[str] = None,
1714- method: Optional[str] = None,
17151712 enable_mcp: Optional[bool] = None,
17161713 debug: Optional[bool] = None,
17171714 ) -> Dict:
17181715 """
17191716 Bypass anti-bot protection and get a ready-to-use browser session.
1717+
1718+ Unblock always uses a residential proxy (no proxy pool selection) and
1719+ always performs a GET — the endpoint's purpose is to harvest cookies /
1720+ clearance tokens via an ASP-bypass navigation, not to proxy arbitrary
1721+ HTTP requests.
1722+
17201723 :param url: Target URL to navigate to and bypass protection
1721- :param proxy_pool: Proxy pool: 'datacenter' or 'residential'
1722- :param country: ISO country code for proxy geolocation
1724+ :param country: ISO country code for residential proxy geolocation
17231725 :param os: Operating system fingerprint: 'linux', 'windows', 'macos'
17241726 :param browser_brand: Browser brand fingerprint: 'chrome', 'edge', 'brave', 'opera'
1727+ :param session: Named session for reconnection — reuses the existing ASP
1728+ session when one exists and disables auto-close on disconnect
17251729 :param timeout: Navigation timeout in seconds (max 300)
17261730 :param browser_timeout: Browser session timeout in seconds (max 1800)
1727- :param headers: Custom request headers
1728- :param body: Request body for POST/PUT/PATCH requests
1729- :param method: HTTP method: GET, POST, PUT, PATCH, DELETE
17301731 :param enable_mcp: Enable MCP streamable-HTTP endpoint on the session
17311732 :param debug: When True, the session is recorded and accessible via
17321733 cloud_browser_playback / cloud_browser_video using the returned run_id
17331734 :return: dict with ws_url, session_id, run_id
17341735 """
1735- proxy_pool_map = {
1736- 'datacenter': 'public_datacenter_pool',
1737- 'residential': 'public_residential_pool',
1738- }
1739-
17401736 json_body = {'url': url}
17411737
1742- if proxy_pool is not None:
1743- json_body['proxy_pool'] = proxy_pool_map.get(proxy_pool, proxy_pool)
1744-
17451738 if country is not None:
17461739 json_body['country'] = country
17471740
@@ -1751,21 +1744,15 @@ <h3>Class variables</h3>
17511744 if browser_brand is not None:
17521745 json_body['browser_brand'] = browser_brand
17531746
1747+ if session is not None:
1748+ json_body['session'] = session
1749+
17541750 if timeout is not None:
17551751 json_body['timeout'] = timeout
17561752
17571753 if browser_timeout is not None:
17581754 json_body['browser_timeout'] = browser_timeout
17591755
1760- if headers is not None:
1761- json_body['headers'] = headers
1762-
1763- if body is not None:
1764- json_body['body'] = body
1765-
1766- if method is not None:
1767- json_body['method'] = method
1768-
17691756 if enable_mcp is not None:
17701757 json_body['enable_mcp'] = enable_mcp
17711758
@@ -3027,7 +3014,7 @@ <h2 id="example">Example</h2>
30273014:return: dict with 'sessions' list and 'total' count</ p > </ div >
30283015</ dd >
30293016< dt id ="scrapfly.client.ScrapflyClient.cloud_browser_unblock "> < code class ="name flex ">
3030- < span > def < span class ="ident "> cloud_browser_unblock</ span > </ span > (< span > self,< br > url: str,< br > proxy_pool : str | None = None,< br > country : str | None = None,< br > os : str | None = None,< br > browser_brand : str | None = None,< br > timeout: int | None = None,< br > browser_timeout: int | None = None, < br > headers: Dict | None = None, < br > body: str | None = None, < br > method: str | None = None,< br > enable_mcp: bool | None = None,< br > debug: bool | None = None) ‑> Dict</ span >
3017+ < span > def < span class ="ident "> cloud_browser_unblock</ span > </ span > (< span > self,< br > url: str,< br > country : str | None = None,< br > os : str | None = None,< br > browser_brand : str | None = None,< br > session : str | None = None,< br > timeout: int | None = None,< br > browser_timeout: int | None = None,< br > enable_mcp: bool | None = None,< br > debug: bool | None = None) ‑> Dict</ span >
30313018</ code > </ dt >
30323019< dd >
30333020< details class ="source ">
@@ -3037,45 +3024,38 @@ <h2 id="example">Example</h2>
30373024< pre > < code class ="python "> def cloud_browser_unblock(
30383025 self,
30393026 url: str,
3040- proxy_pool: Optional[str] = None,
30413027 country: Optional[str] = None,
30423028 os: Optional[str] = None,
30433029 browser_brand: Optional[str] = None,
3030+ session: Optional[str] = None,
30443031 timeout: Optional[int] = None,
30453032 browser_timeout: Optional[int] = None,
3046- headers: Optional[Dict] = None,
3047- body: Optional[str] = None,
3048- method: Optional[str] = None,
30493033 enable_mcp: Optional[bool] = None,
30503034 debug: Optional[bool] = None,
30513035) -> Dict:
30523036 """
30533037 Bypass anti-bot protection and get a ready-to-use browser session.
3038+
3039+ Unblock always uses a residential proxy (no proxy pool selection) and
3040+ always performs a GET — the endpoint's purpose is to harvest cookies /
3041+ clearance tokens via an ASP-bypass navigation, not to proxy arbitrary
3042+ HTTP requests.
3043+
30543044 :param url: Target URL to navigate to and bypass protection
3055- :param proxy_pool: Proxy pool: 'datacenter' or 'residential'
3056- :param country: ISO country code for proxy geolocation
3045+ :param country: ISO country code for residential proxy geolocation
30573046 :param os: Operating system fingerprint: 'linux', 'windows', 'macos'
30583047 :param browser_brand: Browser brand fingerprint: 'chrome', 'edge', 'brave', 'opera'
3048+ :param session: Named session for reconnection — reuses the existing ASP
3049+ session when one exists and disables auto-close on disconnect
30593050 :param timeout: Navigation timeout in seconds (max 300)
30603051 :param browser_timeout: Browser session timeout in seconds (max 1800)
3061- :param headers: Custom request headers
3062- :param body: Request body for POST/PUT/PATCH requests
3063- :param method: HTTP method: GET, POST, PUT, PATCH, DELETE
30643052 :param enable_mcp: Enable MCP streamable-HTTP endpoint on the session
30653053 :param debug: When True, the session is recorded and accessible via
30663054 cloud_browser_playback / cloud_browser_video using the returned run_id
30673055 :return: dict with ws_url, session_id, run_id
30683056 """
3069- proxy_pool_map = {
3070- 'datacenter': 'public_datacenter_pool',
3071- 'residential': 'public_residential_pool',
3072- }
3073-
30743057 json_body = {'url': url}
30753058
3076- if proxy_pool is not None:
3077- json_body['proxy_pool'] = proxy_pool_map.get(proxy_pool, proxy_pool)
3078-
30793059 if country is not None:
30803060 json_body['country'] = country
30813061
@@ -3085,21 +3065,15 @@ <h2 id="example">Example</h2>
30853065 if browser_brand is not None:
30863066 json_body['browser_brand'] = browser_brand
30873067
3068+ if session is not None:
3069+ json_body['session'] = session
3070+
30883071 if timeout is not None:
30893072 json_body['timeout'] = timeout
30903073
30913074 if browser_timeout is not None:
30923075 json_body['browser_timeout'] = browser_timeout
30933076
3094- if headers is not None:
3095- json_body['headers'] = headers
3096-
3097- if body is not None:
3098- json_body['body'] = body
3099-
3100- if method is not None:
3101- json_body['method'] = method
3102-
31033077 if enable_mcp is not None:
31043078 json_body['enable_mcp'] = enable_mcp
31053079
@@ -3123,17 +3097,19 @@ <h2 id="example">Example</h2>
31233097
31243098 return response.json()</ code > </ pre >
31253099</ details >
3126- < div class ="desc "> < p > Bypass anti-bot protection and get a ready-to-use browser session.
3127- :param url: Target URL to navigate to and bypass protection
3128- :param proxy_pool: Proxy pool: 'datacenter' or 'residential'
3129- :param country: ISO country code for proxy geolocation
3100+ < div class ="desc "> < p > Bypass anti-bot protection and get a ready-to-use browser session.</ p >
3101+ < p > Unblock always uses a residential proxy (no proxy pool selection) and
3102+ always performs a GET — the endpoint's purpose is to harvest cookies /
3103+ clearance tokens via an ASP-bypass navigation, not to proxy arbitrary
3104+ HTTP requests.</ p >
3105+ < p > :param url: Target URL to navigate to and bypass protection
3106+ :param country: ISO country code for residential proxy geolocation
31303107:param os: Operating system fingerprint: 'linux', 'windows', 'macos'
31313108:param browser_brand: Browser brand fingerprint: 'chrome', 'edge', 'brave', 'opera'
3109+ :param session: Named session for reconnection — reuses the existing ASP
3110+ session when one exists and disables auto-close on disconnect
31323111:param timeout: Navigation timeout in seconds (max 300)
31333112:param browser_timeout: Browser session timeout in seconds (max 1800)
3134- :param headers: Custom request headers
3135- :param body: Request body for POST/PUT/PATCH requests
3136- :param method: HTTP method: GET, POST, PUT, PATCH, DELETE
31373113:param enable_mcp: Enable MCP streamable-HTTP endpoint on the session
31383114:param debug: When True, the session is recorded and accessible via
31393115cloud_browser_playback / cloud_browser_video using the returned run_id
0 commit comments