コンテンツへスキップ

API

Introduction

With the API v1.5 in Undetectable, you will be able to get a list of profiles, create, launch, update, and close them. Additionally, with the obtained information, you can connect various automation tools such as Puppeteer, Playwright, and others to profiles on the Chromium core.

You can download Chromedriver for working with Selenium here:
Windows
MacOS M series
MacOS Intel

The program must be running to work with the API.

By default, the local server runs on port 25325. If this port is occupied, it will start on another port. You can check the port in the program settings and change it if necessary.

To access the local server, use the IP 127.0.0.1, localhost, or the local IP within your network, and the port from the settings + the path you want to execute, for example, http://localhost:25325/status.

All API responses look like:

{
"code": `<status code>`,
"status": `<status>`,
"data": `<return object>`,
}

where <status code> and <status> reflect the status:

<status code><status>Description
0”success”success
1”error”error, <return object> = {“error”:“error description”}

<return object> - various data sent by the API, for example, a list of profiles.

Errors have the following format:

{
"code":1,
"status":"error",
"data":
{"error": "error description"},
}

Requests

Status

  • Path: /status
  • Method: GET

Description: Returns the status of the local server, whether it is running or not.

Returning Data
{
"code":0,
"status":"success",
"data":{},
}

List of Profiles

  • Path: /list
  • Method: GET

Description: Returns a list of profiles on the Chromium browser available in the program.

Returning Data
{
"code": 0,
"status": "success",
"data" {
"profile_id1": {
"name": "Profile1", // Profile name in the program
"status": "Available", // profile status, can be: "Started", "Locked", "Available"
"debug_port": "xxxx", // browser debug port used for automation (empty if the profile is not running). Only for Chromium browser
"websocket_link": "ws://127.0.0.1:xxxx/devtools/browser/xxxxxx", // link to the browser used for automation (empty if the profile is not running). Only for Chromium browser
"folder": "Name", // Profile folder name
"tags": ["tag1", "tag2", "tag3"], // Profile tags
"cloud_id": "", // Cloud profile ID
"creation_date": 123456789, // Creation date Unix Timestamp
"modify_date": 123456789, // Modification date Unix Timestamp
},
"profile_id2": {
},
},
}

Create Profile

  • Path: /profile/create
  • Method: POST

Description: Creates a profile with the selected parameters. All parameters are optional and may not be present. List of browsers for the command: Chrome, Edge, FireFox, IE, Opera, Safari, Yandex. List of OS for the command: Windows, Windows 7, Windows 8, Windows 8.1, Windows 10, Android, iPhone, iPad, Linux, Mac. If there are no configurations with the selected OS or Browser, a random OS or Browser type will be used.
Format: JSON

リクエストパラメータ:
{
"name": "ランダムな設定のプロファイル", // プログラム内のプロファイル名
"os": "Windows", // 使用するOSの設定
"browser": "Chrome", // 使用するブラウザの設定
"cpu": 8, // コア数、可能な値: 32, 24, 20, 16, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
"memory": 8, // メモリ容量、可能な値: 8, 4, 2, 1, 0
"tags": ["tag1", "tag2"], // プロファイルにタグを設定
"geolocation": "12.44, 13.524", // ジオロケーションを設定。空または不正な値を入力すると、デフォルトの設定が使用されます
"resolution": "1024x768", // 画面解像度、可能な値: "800x600", "960x540", "1024x768", "1152x864", "1280x720", "1280x768", "1280x800", "1280x1024", "1366x768", "1408x792", "1440x900", "1400x1050", "1440x1080", "1536x864", "1600x900", "1600x1024", "1600x1200", "1680x1050", "1920x1080", "1920x1200", "2048x1152", "2560x1080", "2560x1440", "3440x1440", "3840x2160", "5120x1440"
"proxy": "socks5://127.0.0.1:5555:login:pass", // プロファイル内のプロキシを変更します(プロキシはhttp、https、socks5のいずれかで、ログイン/パスワードありまたはなしのバリエーションが可能です)
"notes": "テキスト", // プロファイル内のノートを変更します
"folder": "testFolder", // プロファイルが保存されるフォルダ
"language": "ru-RU, en-US", // 2つの言語を設定できます
"cookies": [{}], // プロファイルにクッキーをインポートします
"type": "cloud", // プロファイルのタイプ: cloud, local
"group": "group_example", // 入力されたグループがない場合、デフォルト設定から取得し、存在しない場合はエラーが表示されます
"configid": "id", // Config IDが入力されている場合、OSとブラウザの設定は無視され、他の設定は可能な限り適用されます。たとえば、Androidの場合、画面解像度は変更されません
"accounts": [ // 異なるサイトのアカウントをプロファイルにインポートします
{"website": "facebook.com", "username": "test@gmail.com", "password": "123456"},
{"website": "mail.com","username": "test@gmail.com","password": "123456"}
],
"timezone": "Pacific/Niue" ("Auto", "System") // set timezone or timezone mode
}
返されるデータ:
{
"code": 0,
"status": "success",
"data": {
"profile_id": "xxxxxxxx...", // プロファイルの一意のID
"name": "ランダムな設定のプロファイル" // プログラム内のプロファイル名
}
}

プロファイルの起動

  • パス: /profile/start/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロファイルを起動します。リンクのパラメータには次のようなパラメータを追加できます:

  • chrome_flags には、URLエンコーディングでエンコードされた任意の起動フラグを渡すことができます。例: ?chrome_flags=—blink-settings%3DimagesEnabled%3Dfalse%20—disable-webgl2
  • start-pages には、URLエンコーディングでエンコードされたスタートページを指定できます。例: ?start-pages=https%3A%2F%2Fgoogle.com%2Chttps%3A%2F%2Fya.ru
返されるデータ
{
"code":0,
"status":"success",
"data":{
"name": "Profile1" // プログラム内のプロファイル名
"websocket_link":"ws://127.0.0.1:xxxx/devtools/browser/xxxxxx", // 自動化に使用されるブラウザへのリンク(プロファイルが起動していない場合は空の値)。Chromiumブラウザのみ
"debug_port": "xxxx", // Chromiumブラウザのデバッグポート(プロファイルが起動していない場合は空の値)。Chromiumブラウザのみ
"folder": "Name", // プロファイルのフォルダ名
"tags": ["tag1", "tag2", "tag3"] // プロファイルのタグ
},
}

プロファイルの終了

  • パス: /profile/stop/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロファイルを終了します。

データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

プロフィールの更新

  • パス: /profile/update/<profileID>
  • メソッド: POST

説明: <profileID> のプロフィールの情報を更新します。すべてのパラメータはオプションであり、存在しない場合もあります。
フォーマット: JSON

リクエストパラメータ:
{
"proxy": "socks5://127.0.0.1:5555:login:pass", // プロフィールのプロキシを変更します(プロキシはhttp、https、socks5であり、ログイン/パスワードありとなしのバリエーションが可能です)
"notes": "テキスト", // プロフィールのメモを変更します
"name": "プロフィール名", // プロフィールの名前を変更します
"folder":"テストフォルダ", // プロフィールのフォルダを変更します
"tags": ["tag1", "tag2"], // プロフィールにタグを設定します。既存のタグは上書きされます。配列が空の場合、プロフィールからすべてのタグが削除されます
"geolocation": "12.44, 13.524", // ジオロケーションを設定します。空または不正な値を入力すると、デフォルトの設定が使用されます
"cookies":[{}], // プロフィールにクッキーをインポートします
"type": "cloud", // プロフィールのタイプ: cloud, local
"group": "group_example", // 入力されたグループが存在しない場合、デフォルトの設定から取得します。存在するが正しくない場合、エラーが表示されます
"accounts": [ // 異なるサイトのアカウントをプロフィールにインポートします
{"website": "facebook.com", "username": "test@gmail.com", "password": "123456"},
{"website": "mail.com","username": "test@gmail.com","password": "123456"}
],
"timezone": "Pacific/Niue" ("Auto", "System") // set timezone or timezone mode
}
データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

プロフィールの削除

  • パス: /profile/delete/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロフィールを削除します。

データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

プロフィールのデータのクリア

  • パス: /profile/cleardata/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロフィールのすべてのデータ(クッキー、履歴、メモ、キャッシュなど)をクリアします。

データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

Clear profile cookies

  • Path: /profile/clearcookies/<profileID>
  • Method: GET

Description: Clear only cookies from profile with selected <profileID>

Returning Data:
{
"code": 0,
"status": "success",
"data": {}
}

プロフィールのクッキー

  • パス: /profile/cookies/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロフィールのクッキーをリクエストします。

データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

クラウドへの送信

  • パス: /profile/tocloud
  • メソッド: POST

説明: 選択したプロフィールをクラウドに送信します。
フォーマット: JSON

リクエストパラメータ:
{
"profiles": ["9b24cd2604d1b8260123242ab1f30c", "f4cbe3c89618bfc9647ba8a47c13f6"],
"group": "test"
}
データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

ローカルに変更

  • パス: /profile/tolocal
  • メソッド: POST

説明: 選択したプロフィールをローカルに変更します。
フォーマット: JSON

リクエストパラメータ:
{
"profiles": ["9b24cd2604d1b8260123242ab1f30c", "f4cbe3c89618bfc9647ba8a47c13f6"]
}
データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

ブラウザのバージョンの更新

  • パス: /profile/updatebrowser/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロフィールのブラウザのバージョンを更新します。
フォーマット: JSON

データの返却:
{
"code": 0,
"status": "success",
"data": {}
}

設定のリスト

  • パス: /configslist
  • メソッド: GET

説明: アクティブな設定のリストを返します。
フォーマット: JSON

データの返却:
{
"code":0,
"status":"success",
"data": {
"config_id1":
{
"os": "Windows 10" // オペレーティングシステム
"browser":"Chrome 115", // ブラウザの種類とバージョン
"useragent": "xxxx", // 設定のUserAgent
"webgl": "Apple GPU", // 設定のWebGL
"screen": "1024x768", // 画面の解像度
},
"config_id2":
{
},
},
}

グループリスト

  • パス: /groupslist
  • メソッド: GET

説明: グループのリストを返します
フォーマット: JSON

データの返却:
{
"code":0,
"status": "success",
"data": {["group1", "group2"]},
}

プロファイル情報

  • パス: /profile/getinfo/<profileID>
  • メソッド: GET

説明: 選択した <profileID> のプロファイル情報を要求します
フォーマット: JSON

データの返却:
{
"code":0,
"status": "success",
"data": {
"name": "Profile1" // プログラム内のプロファイル名
"status": "Available", // プロファイルのステータス、"Started","Locked", "Available" のいずれか
"debug_port": "xxxx", // ブラウザのデバッグポート、自動化に使用されます(プロファイルが起動していない場合は空の値)
"websocket_link": "ws://127.0.0.1:xxxx/devtools/browser/xxxxxx", // ブラウザへのリンク、自動化に使用されます(プロファイルが起動していない場合は空の値)
"configid": "id" // Config ID
"cloud_id": ""
"type": "cloud" // プロファイルのタイプ: cloud, local
"proxy": "socks5://127.0.0.1:5555:login:pass", // プロファイルのプロキシ
"folder": "Name", // プロファイルのフォルダ名
"tags": ["tag1", "tag2", "tag3"], // プロファイルのタグ
"notes": "Text", // プロファイルのノート
"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.43", // プロファイルのUserAgent
"browser": "Edge 114.0.1823.43", // プロファイルのブラウザ
"os": "Windows 10", // プロファイルのオペレーティングシステム
"screen": "1366x768", // プロファイルの画面解像度
"language": "en-US,en;q=0.9,ak-GH;q=0.8,ak;q=0.7", // プロファイルの言語
"cpu": 8, // コア数
"memory": 4, // メモリ容量
"creation_date": 123456789, // 作成日時のUnixタイムスタンプ
"modify_date": 123456789, // 変更日時のUnixタイムスタンプ
},
}

Check IP

  • Path: /profile/getinfo/<profileID>
  • Method: GET

Description: Checks the connection in the profile with the selected , if the check fails, an error is returned
Format: JSON

Returning Data:
{
"code":0,
"status": "success",
"data": {
"ip": "127.0.0.1" // Returns the IP address in this profile
}
}

Get timezones list

  • Path: /timezoneslist
  • Method: GET

Description: Returning timezones list
Format: JSON

Returning Data:
{
"code":0,
"status": "success",
"data": {
"Pacific/Niue": "GMT-11:00",
"America/Cambridge_Bay": "GMT-7:00",
...
},
}

Get proxies list

  • Path: /proxies/list
  • Method: GET

Description: Returning proxies list
Format: JSON

Returning Data:
{
"code":0,
"status": "success",
"data": {
"proxy_id1":
{
"name": "Proxy1"
"type": "http",
"host": "127.0.0.1",
"port": "2222",
"login": "12345",
"password": "12345",
"ipchangelink": "",
}
"proxy_id2":
{
},
}
}

Add proxy

  • Path: /proxies/add
  • Method: POST

Description: Add a proxy to the proxy manager, the parameters login, password, ipchangelink are optional, the rest are required
Format: JSON

Request parameters:
{
"name": "Proxy1",
"type": "http",
"host": "127.0.0.1",
"port": "2222",
"login": "12345",
"password": "12345",
"ipchangelink": ""
}
Returning Data:
{
"code": 0,
"status": "success",
"data": {
"proxy_id": "12345"
}
}

Delete proxy

  • Path: /proxies/delete/<ProxyID>
  • Method: GET

Description: Removes a proxy with the selected ID. Proxy will be deleted for all profiles with that proxy, the same as during normal deletion from the manager
Format: JSON

Returning Data:
{
"code":0,
"status":"success",
"data": {
},
}

Update proxy

  • Path: /proxies/update/<ProxyID>
  • Method: POST

Description: Updates the proxy with the selected ID, all parameters are optional
Format: JSON

Request parameters:
{
"name": "Proxy1",
"type": "http",
"host": "127.0.0.1",
"port": "2222",
"login": "12345",
"password": "12345",
"ipchangelink": ""
}
Returning Data:
{
"code": 0,
"status": "success",
"data": {
}
}

Puppeteer (Node.js)

Node.js Puppeteerで特定の名前のプロファイルを起動し、そのプロファイルでundetectable.ioのページを開く方法:

const puppeteer = require('puppeteer');
const axios = require('axios');
const port = 25325; // ポート
const ip = '127.0.0.1'; // ローカルIP
const profileName = ‘TestProfile; // プロファイル名
const sleep = (ms) => {
return new Promise((resolve) => setTimeout(resolve, ms));
};
axios.get('http://' + ip + ':' + port + '/status').then(response => {
if (response.data.code == 0) {
axios.get('http://' + ip + ':' + port + '/list').then(async response => {
for (var profile in response.data.data) {
///// 特定のプロファイルの開始とページへの移動
if (response.data.data[profile].name == profileName ) {
axios.get('http://' + ip + ':' + port + '/profile/start/' + profile).then(async response => {
try {
const browser = await puppeteer.connect({
browserWSEndpoint: response.data.data.websocket_link,
defaultViewport: null
});
const page = await browser.newPage();
await sleep(1000);
await page.goto('https://undetectable.io');
} catch (e) {
console.log(e);
}
})
.catch(error => {
console.log(error);
});
}
}
})
.catch(error => {
console.log(error);
});
}
})
.catch(error => {
console.log(error);
});

Selenium (Python)

Python + Seleniumで特定のフォルダにあるプロファイルを起動し、複数のサイトを開く方法:

from time import sleep
import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
address = "127.0.0.1" # ローカルAPIのIPアドレス(同じネットワーク内の別のコンピュータで作業している場合や、ルーターの設定でポートが開いている場合は、ローカルAPIにリモートでアクセスできるため、このアドレスを変更する必要があります)
port_from_settings_browser = '25325' # ローカルAPIのポート(プログラムの設定で見つけることができます)
chrome_driver_path = "chromedriver.exe" # v110用のchromedriverのパス
ser = Service(chrome_driver_path)
chrome_options = Options()
list_response = requests.get(f'http://{address}:{port_from_settings_browser}/list').json()['data'] # プロファイルのリストを取得するためにローカルAPIにリクエストを送信します
profile_id = ''
for key, value in list_response.items(): # プロファイルのリストをループして、1つずつ起動します
if value['folder'] == 'test': # 必要なプロファイルのみを起動するためのチェックを追加できます(この例では、'test'フォルダにあるプロファイルを起動しています)
profile_id = key
if value['status'] == 'Available': # プロファイルが起動されていない場合、プロファイルを起動してdebug_portを取得します
start_profile_response = requests.get(f'http://{address}:{port_from_settings_browser}/profile/start/{profile_id}', timeout=5).json()['data']
debug_port = start_profile_response['debug_port']
if value['status'] == 'Started': # プロファイルが起動されている場合、利用可能なデータからdebug_portを取得します
debug_port = value['debug_port']
if value['status'] == 'Locked': # プロファイルがロックされている場合、スキップします
continue
if debug_port: # ブラウザに接続ポートがあるかどうかを確認します(WebEngineプロファイルにはポートがないため、直接閉じます)
chrome_options.debugger_address = f'{address}:{debug_port}'
driver = webdriver.Chrome(service=ser, options=chrome_options)
driver.get("https://whoer.net/") # アクティブなタブでwhoer.netを開きます
driver.switch_to.new_window('tab') # 新しいタブを作成し、それに切り替えます
driver.get(url='https://browserleaks.com/js') # アクティブなタブでbrowserleaks.com/jsを開きます
# ここに他のアクションを追加できます
sleep(5) # 5秒待ちます
requests.get(f'http://{address}:{port_from_settings_browser}/profile/stop/{profile_id}') # プロファイルを停止します