Rotate Session Proxy
curl --request POST \
--url https://api.example.com/browser/sessions/{id}/proxy/rotateimport requests
url = "https://api.example.com/browser/sessions/{id}/proxy/rotate"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/browser/sessions/{id}/proxy/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}/proxy/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}/proxy/rotate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/browser/sessions/{id}/proxy/rotate")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}/proxy/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"newIp": "<string>"
}Session Proxy
Rotate Session Proxy
Rotate to a new exit IP while keeping the current provider and location.
POST
/
browser
/
sessions
/
{id}
/
proxy
/
rotate
Rotate Session Proxy
curl --request POST \
--url https://api.example.com/browser/sessions/{id}/proxy/rotateimport requests
url = "https://api.example.com/browser/sessions/{id}/proxy/rotate"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/browser/sessions/{id}/proxy/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}/proxy/rotate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}/proxy/rotate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/browser/sessions/{id}/proxy/rotate")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}/proxy/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"newIp": "<string>"
}Overview
Requests a fresh exit IP from the same provider and location currently attached to the session. Useful when the current IP has been rate-limited or blocked but you still want the same geography. To change provider or location, usePUT /browser/sessions/{id}/proxy. To go direct, use DELETE /browser/sessions/{id}/proxy.
Path Parameters
string
required
Browser session ID (UUID).
Example Request
curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/proxy/rotate" \
-H "Authorization: Bearer $SCRAPENGINE_API_KEY"
Response
Success Response (200)
boolean
True when rotation was requested successfully.
string
New exit IP, when reported by the provider.
{
"success": true,
"newIp": "203.0.113.42"
}
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing API key. |
404 | Session not found or not owned by the caller. |
409 | Session is not running with a managed proxy — nothing to rotate. |
503 | The proxy provider is temporarily unreachable. |
Notes
- Rotation is best-effort — some providers return a new IP synchronously, others rotate on the next outbound request.
- Rotation does not clear browser cookies, local storage, or open connections. Pair with a fresh session if you need a fully clean slate.
Was this page helpful?