Skip to main content
The Scraping API accepts HTTP requests to load pages in a Surfsky browser and return rendered HTML. It supports waiting for content, screenshots, CAPTCHA solving, and human input emulation without a framework connection. Use it when you need HTML or a screenshot and do not want to hold a WebSocket connection. For forms, multiple tabs, or click sequences, use a framework or an SDK.

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.
Expected output: 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:
Pages run one after another in the same browser and share its cookies. 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 the internal_uuid from the start response, as the examples do:
Otherwise the browser stops after the inactivity timeout, 30 seconds by default. Do not mix the Scraping API with CDP automation in the same browser; the scraper takes over the page and closes extra tabs.