Skip to main content
chromedp connects to a Surfsky browser through a remote allocator instead of launching one itself. The browser runs in Surfsky’s cloud, so you do not need Chrome on your machine.
Use human-emulation commands for clicks, typing, and scrolling. Keep chromedp for navigation, selectors, waiting, and page content.

Prerequisites

Go 1.26 or newer for the current chromedp release. Set your API token and base URL, then create a project:
The example starts a browser with an empty request body, which uses your account’s default proxy pool. Proxy, fingerprint, and other start options are in the API reference.

Run an example

The example uses a one-time profile. To reuse a saved login, start a persistent profile instead; the connection code is the same. Save as main.go:
Run it:
Expected output:
chromedp.NoModifyURL keeps Surfsky’s WebSocket address as returned. Without it chromedp rewrites the URL and the connection fails.

Click, type, and scroll

Prefer human emulation over chromedp.Click, chromedp.SendKeys, and scripted scrolling. Add "github.com/chromedp/cdproto/cdp" to the imports and this action to the existing chromedp.Run call, with a selector from your own page:

Stop the session

Stop the session through the API with the internal_uuid from the start response, as the deferred stopSession call does above. chromedp.Cancel(ctx) and the cancel functions only disconnect. chromedp sends Browser.close only for browsers it launched itself, so the remote browser keeps running until you stop it or the inactivity timeout expires. Register the deferred stop call before connecting so it also runs after a connection failure. Avoid log.Fatal after starting the session because it skips deferred calls. The same request from the shell:
Otherwise the browser stops after the inactivity timeout.