Path: /api/v1/browser/start
Method: GET
Description: To open a browser, you need to specify the profile ID. After a successful launch, you can obtain the browser's debug interface for executing Selenium and Puppeteer automation. Selenium requires the use of a Webdriver that matches the corresponding browser's core version. Ensure that your application is updated to version 3.4.1 or higher. After launching the browser, you can retrieve the path to the corresponding Webdriver from the return value.
Optional parameters in the query can be omitted.
Name | Necessary | Default | Example | Description | Remarks |
---|---|---|---|---|---|
user_id | YES | - | h1yynkm | Unique profile ID, generated after creating profile | |
serial_number | NO | - | 123 | Priority will be given to user id when user id is filled. | |
open_tabs | NO | 0 | 1 | Open a platform or historical page. 0: Open (Default setting); 1: Close | should update to V2.4.2.9 or above |
ip_tab | NO | 1 | 0 | Whether to open the ip detection page, 0: not open, 1: open (default) | should update to V2.5.7.9 or above |
new_first_tab | NO | 0 | 1 | Whether to use the new version of the ip detection page: 1: new version, 0: old version (default) | should update to V2.6.6.9 or above |
launch_args | NO | - | ["--window-position=400,0","--blink-settings=imagesEnabled=false", "--disable-notifications"] | Browser startup parameters. eg: --blink-settings=imagesEnabled=false: Prohibit image loading. --disable-notifications: Disable notifications p.s.: If launch_args are set both for API and the profile, priority will be given to the ones in API settings. | should update to V2.4.6.7 or above |
headless | NO | 0 | 1 | Whether to start the headless browser 0:NO (Default) 1:YES | should update to V2.4.6.7 or above |
disable_password_filling | NO | 0 | 1 | Whether to disable the function of filling password 0:NO (Default) 1:YES | should update to V2.4.6.7 or above |
clear_cache_after_closing | NO | 0 | 1 | Whether to delete the cache after closing the browser 0:NO (Default) 1:YES | should update to V2.4.7.6 or above. If the disk space is insufficient, it is recommended to set this parameter to 1 |
enable_password_saving | NO | 0 | 1 | Whether to allow password saving 0:NO (Default) 1:YES | should update to V2.4.8.7 or above |
cdp_mask | No | 1 | 1 | Whether to mask the cdp detection. 1: Yes (default), 0: No. | |
device_scale | NO | - | 1 | Only valid for mobile OS. Range 0.1 to 2, 1 is 100%. |
//Operation succeeded
{
"code":0,
"data":{
"ws":{
"selenium":"127.0.0.1:xxxx", //Browser debug interface, used for selenium automation
"puppeteer":"ws://127.0.0.1:xxxx/devtools/browser/xxxxxx" //Browser debug interface, used for puppeteer automation
},
"debug_port": "xxxx", //debug port
"webdriver": "C:\\xxxx\\chromedriver.exe" //webdriver path
},
"msg":"success"
}
//Operation failed
{
"code":-1,
"data":{},
"msg":"failed"
}