Base URL
Use the API base URL assigned to your account in the Surfsky dashboard.https://YOUR_API_HOST is a placeholder for that URL. Calling a host that does not serve your account returns 403 namespace_not_allowed.
The shell examples use SURFSKY_API_BASE_URL and SURFSKY_API_TOKEN; set them as shown in credentials. In the API playground, enter your full API base URL in baseUrl.
Authentication
Send the API token with REST management requests:Content-Type: application/json for JSON request bodies. Extension uploads use multipart form data.
Keep tokens in server-side environment variables or your secret store. Live CDP, DevTools, ChromeDriver, and screencast URLs carry access through the session identifier; keep those URLs private too.
Response shape
Read the schema for the endpoint you are calling. The API has several success formats:
For example, a start response looks like this:
success: false, msg, data, and code, but forwarded errors can differ. See errors.
Starting a browser
A one-time session starts without a saved profile. Its profile state is discarded when it stops. A persistent profile saves the storage types you enable and can be started again.profile_uuid identifies a saved profile. Use the returned internal_uuid for stop, scrape, and live browser connections. These values may be equal; do not assume a new or different internal ID on every start. See session lifecycle.
Start one-time session
POST /profiles/one_time starts and returns a running browser. Configure fingerprints, proxies, Human actions, and CAPTCHA solving for the work you need.Stop session
POST /profiles/{internal_uuid}/stop releases a running browser. Put this call in cleanup code so it also runs after failed navigation or framework connection.Active sessions
GET /profiles/active lists one-time and persistent browsers currently running. Useone_time to distinguish them.
POST /profiles/stop stops all browsers on the account. Check its failed list; use individual stop calls when other workers share the account.
Persistent profiles
Create with a title and a fingerprint containing
os. Stop a profile before editing or deleting it. Starting an already running profile can return the existing session.
Cookies
Use export cookies and import cookies on a stopped persistent profile. See the cookie guide for JSON and Netscape formats and login-state requirements.Scraping
POST /profiles/{internal_uuid}/scrape returns rendered HTML, cookies, and an optional screenshot from a running browser. Read Scraping API for a full lifecycle example and batch behavior.Proxy reference
Use the proxy guide to choose a tier, target a location, provide a VPN, block domains, or route domains through different connections. Location lookup starts with countries or geographic pools. Shared proxies have their own country list.GET /proxies/quota is a legacy alias for premium quota, not a combined quota for both tiers. Check shared quota separately. Premium and shared traffic statistics report time windows.
Fingerprint reference
Look up renderers, screens, and device models. Leave fields generated unless your workload needs a specific value; see fingerprints.Extensions
Upload a ZIP and use the returned UUID when starting a browser. The extension guide covers packaging, loading, updating metadata, and deletion.CAPTCHA solving
Enableanti_captcha on the start request, then use the CAPTCHA CDP commands. GET /captcha/balance reports configured solver balances.
Endpoints that are not generated
The endpoints below forward live browser protocol traffic or expose account information outside the generated reference.CDP over WebSocket
ws_url. See the framework guides for the exact connection and cleanup steps.
DevTools HTTP
/json/list and /json/version. See debugging to open a page’s inspector.
ChromeDriver
enable_chromedriver: true, then use this URL as Selenium’s remote server. See the Selenium quickstart.
Screencast
inspector.screencast from the start response to receive live JPEG frames. See Screencast for a viewer example.
Account limits
See limits for response details and how each limit affects a job.
Rate limits
Profile responses report minute and hour request limits inX-Ratelimit-Limit, X-Ratelimit-Limit-Hour, X-Ratelimit-Remaining, and X-Ratelimit-Remaining-Hour.
Exhausting either window returns 429 rate_limits_reached. Other 429 codes represent browser or quota limits. Use the error code to decide what to do next.