Skip to Content
Browser API

Connection URL

The wss:// connection URL, every login modifier, priority rules, and how to encode a customer proxy.

Format

wss://<login>[-<modifier>-<value>...]:<password>@browser.runharvester.com

The connection uses port 443 over TLS only. Puppeteer's puppeteer.connect({ browserWSEndpoint: url }) and Playwright's chromium.connectOverCDP(url) turn the userinfo part of the URL into an HTTP Basic Authorization header themselves.

  • Credentials are accepted only from that header. A URL that carries a query string (?...) is refused with HTTP 400 INVALID_CONNECTION_PARAMS.
  • The login is 20 random hexadecimal characters and is not related to your user. The password is 24 letters and digits, or a custom one of 16 to 64 letters and digits that you choose in the dashboard.
  • Keep the URL secret: it contains the password.

Modifiers

Modifiers are appended to the login, each as -<name>-<value> (or -captcha-auto). The grammar is strict: an unknown, repeated, or invalid modifier is an error (400 INVALID_CONNECTION_PARAMS), never ignored. Modifiers can be in any order, except that proxy must be last.

ModifierValueMeaning
country-<iso2>Two-letter country code, case-insensitiveExit country, for example country-de.
type-<kind>datacenter, residential, own, or customProxy kind. own uses your own RunHarvester Node computers and proxy nodes. custom uses a proxy that you supply.
pid-<profileId>64 hexadecimal charactersPersistent profile. The id is signed and issued by the dashboard; a made-up id is refused with 400 INVALID_PROFILE_ID. A signed id the server has not seen yet creates the profile on the first connection.
session-<id>1 to 64 letters, digits, or underscoresNames the session, so a dropped client can reconnect to the same browser and tabs within 60 seconds.
ttl-<minutes>Integer from 0 to 120Sticky exit-IP time: keep the same exit address for up to this many minutes. The provider may release the address earlier. ttl-0 or no ttl means no stickiness beyond the session itself. Applies to platform proxies and own nodes.
proxy-<base64url>Base64url of a proxy URLA customer proxy. Implies type-custom. Must be the last modifier. See Customer proxy.
captcha-autononeTurn on automatic captcha solving for this session. See Captcha.

type-custom without a proxy modifier is refused with 400 INVALID_CONNECTION_PARAMS.

Priority

When the same setting is given in several places, the first of these wins:

  1. URL modifiers.
  2. The profile's settings.
  3. The browser account's settings.
  4. The default, datacenter.

The browser never exits from RunHarvester's own address.

Examples

A bare URL uses the account's and profile's settings, or the defaults:

wss://<login>:<password>@browser.runharvester.com

A German residential exit:

wss://<login>-country-de-type-residential:<password>@browser.runharvester.com

A named session that keeps the same exit address for up to 30 minutes:

wss://<login>-session-job42-ttl-30:<password>@browser.runharvester.com

A persistent profile in a chosen country:

wss://<login>-country-us-pid-<64 hex characters>:<password>@browser.runharvester.com

A customer proxy (the proxy modifier is last):

wss://<login>-country-de-proxy-<base64url of the proxy URL>:<password>@browser.runharvester.com

Customer proxy

The value of proxy- is the base64url encoding of a proxy URL. The proxy URL must use http://, https://, or socks5://, must include a port, and must not have a path. It must be reachable from the internet at a public address; otherwise the connection is refused with 503 PROXY_UNREACHABLE.

const proxyUrl = "http://proxy-user:proxy-pass@203.0.113.10:8080";
const encoded = Buffer.from(proxyUrl).toString("base64url");

const url = `wss://${process.env.BROWSER_LOGIN}-proxy-${encoded}:${process.env.BROWSER_PASSWORD}@browser.runharvester.com`;

Proxy traffic is billed in the custom_proxy class. See Billing.

Last updated on

On this page