Runs API

Start a new run. Return ID of the run, WS endpoints.

Available parameters

Profile ID, can be found on Dashboard / Profiles.

If this param is missing, first available random profile will be picked automatically.

Proxy ID, can be found on Dashboard / Proxies.

If this param is missing, proxy from the profile will be picked automatically.

Proxy URL in format: proto://user:pass@host:port.

If this param is missing, the proxy will be picked based on browsers settings of the profile and groups.

You should use either proxyId or proxyUrl, it doesn't make sense to use both params in your request.

One of off, detect, detectAndSolve. Overrides the "CAPTCHA behavior" browser setting of the profile for this run only. See CAPTCHA.

If this param is missing, the setting from the profile and groups is used.

Any other value returns the error "Invalid captchaBehavior."

You can also call startRun via WebSockets. It could be useful, for example, with Puppeteer, when you just want to replace browserWSEndpoint and don't write any extra code.

For WebSockets endpoints, use wss://ws.rebrowser.net/

Take a look at the example below. You can use all the same parameters as in startRun.

1
2
3
4
5
6
7
const rebrowserParams = {
  apiKey: 'YOUR_API_KEY',
  // captchaBehavior: 'detectAndSolve',
}
const browser = await puppeteer.connect({
  browserWSEndpoint: `wss://ws.rebrowser.net/?${new URLSearchParams(rebrowserParams)}`,
})

Finish the run. All CDP sessions will be immediately disconnected.

Available parameters

Run ID, can be found on Dashboard / Runs.

Get runs and its data such as events, downloaded files, and other. Runs are returned newest first.

Available parameters

Run ID, can be found on Dashboard / Runs. Returns only this run.

Profile ID, can be found on Dashboard / Profiles. Returns only runs of this profile.

If the profile does not exist or belongs to another account, the request fails with a 404 error.

Maximum number of runs to return, from 1 to 100.

Value of meta.nextCursor from a previous response. Returns the next page of older runs.

Treat the cursor as an opaque string. A malformed cursor fails with a 400 error.

Response

The response contains meta and runs. meta.totalCount is the number of runs in this response. meta.nextCursor is the value to pass as cursor to get the next, older page of runs. It is null on the last page.

Each run has a results.events array of events, each with type, date, and data. These events tell you how a run ended:

  • apiFinish: the run was finished through the API with /finishRun.
  • warning with clientActionTimeout in data: the run finished automatically because your client sent no CDP commands for the idle time.
  • warning with maxRunDurationReached in data: the run reached the maximum run duration of 6 hours and finished automatically.

If a run failed because of a system problem, errors[].code contains the failure code, for example, connectBrowser-connect when the connection to the browser could not be re-established.

Download a file from a run. It might take up to 10 seconds to transfer file from the remote browser to our server.

Available parameters

Unique file ID, could be acquired from CDP event Page.downloadWillBegin.