Prerequisites
Set your API token and base URL. The examples start 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 starts a one-time browser, scrapes a page, prints the result, and stops the browser. To keep cookies and login state between runs, start a persistent profile instead; the scrape call is the same.- curl
- Python
200 followed by HTML containing Example Domain.
Request parameters
POST /profiles/{internal_uuid}/scrape accepts:
wait_for with a selector for the content you need is more reliable than networkidle, which can time out on pages with background traffic. The whole request must finish within 120 seconds.
Read the response
success is about the Surfsky request. data.status is the target site’s HTTP status, so a 200 from Surfsky can carry a 403 or a challenge page from the site. Check both. screenshot is present only when requested; decode it with Base64 to get a PNG.
Scrape several pages
Send an array of request objects to the same endpoint:data comes back as an array in request order; failed items carry error and status_code instead of a page. Keep a batch within the 120-second limit. For parallel work, use several browsers.
Stop the session
Stop the browser through the API with theinternal_uuid from the start response, as the examples do: