Python (Recommended)
# Use the new session() method instead
from smooth import SmoothClient
client = SmoothClient(api_key="YOUR_API_KEY")
with client.session(url="https://example.com") as session:
session.run_task("Click the login button")
session.close()curl --request POST \
--url https://api.smooth.sh/api/v1/browser/session \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"profile_id": "<string>",
"live_view": true,
"device": "desktop",
"url": "<string>",
"proxy_server": "<string>",
"proxy_username": "<string>",
"proxy_password": "<string>",
"extensions": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: '<string>',
live_view: true,
device: 'desktop',
url: '<string>',
proxy_server: '<string>',
proxy_username: '<string>',
proxy_password: '<string>',
extensions: ['<string>']
})
};
fetch('https://api.smooth.sh/api/v1/browser/session', 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.smooth.sh/api/v1/browser/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'profile_id' => '<string>',
'live_view' => true,
'device' => 'desktop',
'url' => '<string>',
'proxy_server' => '<string>',
'proxy_username' => '<string>',
'proxy_password' => '<string>',
'extensions' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smooth.sh/api/v1/browser/session"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.smooth.sh/api/v1/browser/session")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smooth.sh/api/v1/browser/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"r": {
"profile_id": "<string>",
"live_id": "<string>",
"live_url": "<string>"
}
}Profile
Open Browser Session (Deprecated)
deprecated
Deprecated: Use POST /task with task=null instead, and send actions via POST /task/{task_id}/event.
Opens an interactive browser instance for 5 minutes.
POST
/
browser
/
session
Python (Recommended)
# Use the new session() method instead
from smooth import SmoothClient
client = SmoothClient(api_key="YOUR_API_KEY")
with client.session(url="https://example.com") as session:
session.run_task("Click the login button")
session.close()curl --request POST \
--url https://api.smooth.sh/api/v1/browser/session \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"profile_id": "<string>",
"live_view": true,
"device": "desktop",
"url": "<string>",
"proxy_server": "<string>",
"proxy_username": "<string>",
"proxy_password": "<string>",
"extensions": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: '<string>',
live_view: true,
device: 'desktop',
url: '<string>',
proxy_server: '<string>',
proxy_username: '<string>',
proxy_password: '<string>',
extensions: ['<string>']
})
};
fetch('https://api.smooth.sh/api/v1/browser/session', 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.smooth.sh/api/v1/browser/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'profile_id' => '<string>',
'live_view' => true,
'device' => 'desktop',
'url' => '<string>',
'proxy_server' => '<string>',
'proxy_username' => '<string>',
'proxy_password' => '<string>',
'extensions' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smooth.sh/api/v1/browser/session"
payload := strings.NewReader("{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.smooth.sh/api/v1/browser/session")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smooth.sh/api/v1/browser/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": \"<string>\",\n \"live_view\": true,\n \"device\": \"desktop\",\n \"url\": \"<string>\",\n \"proxy_server\": \"<string>\",\n \"proxy_username\": \"<string>\",\n \"proxy_password\": \"<string>\",\n \"extensions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"r": {
"profile_id": "<string>",
"live_id": "<string>",
"live_url": "<string>"
}
}Authorizations
Body
application/json
Request model for opening a browser session (deprecated).
The profile ID to use. If not provided, a new profile will be created.
Request a live URL to interact with the browser.
Device type for the browser session.
Available options:
desktop, mobile Starting URL to open.
Proxy server address.
Proxy server username.
Proxy server password.
List of extension IDs to load.
Response
Session opened.
Response model for browser session (deprecated).
Show child attributes
Show child attributes
⌘I