WaQi

Raw Connection Flow

The API sequence to provision a cloud browser.

If you are not using our SDK, you must manually execute the connection sequence to provision an instance and retrieve its connection URL.

Provision a Browser Instance

Open a WebSocket connection to the /start endpoint. This connection acts as a "liveness probe" and must remain open. If this connection drops, the browser instance is terminated.

Endpoint: wss://api.browser.waqitech.com/start

Required Headers:

  • Authorization: Bearer <YOUR_API_KEY>

Response: A single text message containing your unique browser_id (e.g., br_12345).

Retrieve the CDP Debugger URL

Request the connection endpoint for your specific instance.

Endpoint: GET https://api.browser.waqitech.com/json/version

Required Headers:

  • Authorization: Bearer <YOUR_API_KEY>
  • X-Browser-ID: <YOUR_BROWSER_ID>

Response:

{
  "webSocketDebuggerUrl": "wss://api.browser.waqitech.com/devtools/browser/..."
}

Connect to the Instance

Open a new WebSocket to the returned webSocketDebuggerUrl. You must pass the same authentication headers to establish the connection.

Required Headers:

  • Authorization: Bearer <YOUR_API_KEY>
  • X-Browser-ID: <YOUR_BROWSER_ID>

On this page