Web Analytics
Help > Automation > Automation: Local API interface function

Automation: Local API interface function


Sep 27, 2025
14


"Automation - Local API Interface" Function Module
The Local API Interface module allows users to programmatically access features like retrieving environment configuration details, starting or closing browsers, and querying environments. It also integrates with automation frameworks like Selenium and Puppeteer for advanced browser automation.

To use it:

  • First, check the API interface status in “Environment Management → Settings” to ensure it's active. The default API address is http://localhost:50213 (port 50213, but confirm the exact address in the settings).
  • Use scripts or HTTP request tools to call the local API for operations like starting or closing browsers. All API parameters are strings, and POST requests use JSON format. Non-required parameters are optional and can be omitted.
  • To ensure stability, all interfaces have rate limits, allowing a maximum of 1 request per second per interface.

自动化:本地API接口功能


API Example 1: Check API Interface Availability (GET /status)Description: Verifies if the API interface is available.
Request Example: Send a GET request to http://localhost:50213/status.
Response Details:

  • code (int): Status code (0 = success, -1 = input format error, -2 = quantity retrieval error, -4 = account login error).
  • msg (string): Success or failure message.
    Success Response Example:

json

{

 "code": 0,

 "msg": "success"

}

Automation: Local API interface function

API Example 2: Start Browser (With Parameter Details and Request/Response Examples)Parameter Details:

  • headless (number, optional): Indicates whether to start the browser in headless mode (1 = yes).
    Request Example: Send a request to http://localhost:50213/api/v2/browser/start?account_id=d03ca5de08ec8e02c4b78558ee84d7fc (where account_id is the account identifier).
    Response Details:
  • Top-level code (int) and msg (string): Similar to the first example (0 = success; -1 = input format error, -2 = quantity retrieval error, -4 = account login error, -6 = unverified account).
  • data structure (returned if successful):

Automation: Local API interface function


Note: For more API details, consult the full documentation on the official website.


Was the content helpful?