Hosted chromium browser for scraping: Setup, cost
What is a hosted Chromium browser for scraping? A Chromium instance on vendor servers that your code drives over CDP. Get the CDP setup, exit options and cost.
- hosted browser
- chromium
- web scraping
- cdp
- playwright
On this page
- What is a hosted Chromium browser for scraping?
- How do you connect Playwright or Puppeteer to a hosted Chromium browser for scraping?
- Why must fingerprint, exit IP and cookies stay consistent across a flow?
- Which exit should a hosted Chromium browser for scraping use?
- How much does a hosted Chromium browser for scraping cost?
- What are the limits of a hosted browser, and when should you self-host?
- Frequently asked questions
- How do I use a hosted Chromium browser for scraping?
- Is a hosted browser better than a scraping API?
- Can a hosted browser keep my login between runs?
- Does a hosted Chromium browser support Firefox or mobile emulation?
- What happens when a hosted browser session runs out of credits?
- Sources
A hosted Chromium browser for scraping runs on vendor servers and your code drives it over CDP through a WebSocket URL; opening the socket starts the session after a 45 to 50 second cold start. Connection start, consistent identity and exit, and open-page cost decide the choice between vendors. Use one for flows that carry state across pages, such as a login followed by a form.
A scraper that logs in fine on your laptop starts failing from a datacenter at volume: the login flow breaks, the cookie jar no longer matches the exit, and you end up maintaining a pool of browsers. A hosted browser moves that pool off your servers.
If you drive Playwright, Puppeteer or plain HTTP and keep getting blocked, you can connect a hosted browser over CDP, pick its exit, estimate the cost of a flow and decide whether to self-host instead.
Key Takeaways
- An unknown residential location is refused with close code 4007 instead of falling back to another country.
- Wayfern has no persistent profiles, no per-vector fingerprint switches, no mobile emulation and no free tier, and runs the Chromium family only.
- Hold one sticky residential IP and one open socket per flow, so cookies never arrive from an address that never received them.
What is a hosted Chromium browser for scraping?
A hosted Chromium browser for scraping is a Chromium instance on a vendor’s servers that your own code drives over the Chrome DevTools Protocol (CDP). You connect Playwright or Puppeteer to a WebSocket URL, the vendor runs the browser, display, fingerprint and exit IP, and you pay for browser time.
With a hosted Chromium browser for scraping, that socket ends on the vendor’s machine instead of localhost.
Playwright’s BrowserType reference says connectOverCDP “attaches Playwright to an existing browser instance using the Chrome DevTools Protocol”. It also warns that the connection is “significantly lower fidelity than the Playwright protocol connection via browserType.connect()“.
Puppeteer’s connect() method “attaches Puppeteer to an existing browser instance”, using a browserWSEndpoint URL.
A headed browser still needs a screen. The X.Org documentation describes Xvfb as an X server that “can run on machines with no display hardware and no physical input devices”, which is how a container runs a full browser window.
Three other kinds of tool get confused with a hosted Chromium browser for scraping:
- Scraping APIs take a request and return a page. Wayfern’s use-case page puts it this way: “A request/response endpoint returns one page and keeps nothing.” A job that logs in, fills a form and waits for an element needs a browser you hold open.
- Self-hosted stealth browsers use the same protocol on your own hardware. The rayobrowse README calls it “A self-hosted Chromium stealth browser for web scraping and automation” that “exposes standard CDP”, but you run the container, the upgrades, the fonts, the display and the proxy wiring.
- Desktop profile managers let a person operate many long-lived profiles. Wayfern’s buyer’s guide says “Anti-detect browser covers two things that share almost no engineering”, and a hosted browser is the kind that code drives.
If a person operates the profiles, buy a profile manager. If code does and one page is enough, use a scraping API.
If code does and the job carries state across pages, use a hosted browser, or self-host when running the infrastructure is the goal. The comparison of anti-detect browsers weighs specific products on each side.
How do you connect Playwright or Puppeteer to a hosted Chromium browser for scraping?
You connect Playwright or Puppeteer to a hosted browser by pointing a standard CDP client at one WebSocket URL that carries a link token. Wayfern’s docs put the rest plainly: “Opening that socket starts the session. There is no SDK to install.”
- Mint a link token under Browser links in your project. You can revoke the link at any time. The token goes in the URL; proxy credentials never do.
- Set your client’s connection timeout above the cold start. A cold start takes about 45 to 50 seconds, longer with a residential exit. A client left on a short default gives up before the browser answers, so allow 90 seconds or more.
- Connect Playwright: read the token from an environment variable and call
connectOverCDP(). In the URL,country=US®ion=CApicks a California residential exit, andsession=run42holds one IP for the flow.
import { chromium } from "playwright";
const url = `wss://api.wayfern.com/ws?token=${process.env.LINK_TOKEN}&country=US®ion=CA&session=run42`;
// The socket opening starts the session. No REST call, no queue to poll.
const browser = await chromium.connectOverCDP(url, { timeout: 90_000 });
const page = await browser.contexts()[0].newPage();
await page.goto("https://example.com/login"); - Connect Puppeteer by passing the same URL as
browserWSEndpoint.
import puppeteer from "puppeteer-core";
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://api.wayfern.com/ws?token=${process.env.LINK_TOKEN}`,
protocolTimeout: 120_000,
});
const page = await browser.newPage(); - Read the first message. Playwright and Puppeteer handle this frame for you; a raw CDP client should read it before sending commands.
The connection works when page.goto() resolves on the first context. Python Playwright and any other CDP client use the same URL.
A pooled instance is reused only for the same link token, workload and exit.
The self-hosted rayobrowse README documents a different pattern: an HTTP call returns a WebSocket URL, and you then connect to it. On Wayfern, the URL is the whole handshake.
The quickstart walks through a first connection, and the API reference lists the URL parameters: country, region, city, isp, session, width, height and proxy. Mint a link token and run the Playwright example to see the connected message arrive.
Why must fingerprint, exit IP and cookies stay consistent across a flow?
Fingerprint, exit IP and cookies must stay consistent because a site sees all three in one session and can compare them on every request.
The exit IP is your network identity, the properties JavaScript can read are your browser identity, and cookies and storage are your state. A mismatch between any two is a signal the site doesn’t have to work for.
Wayfern’s authenticated-scraping page says of web sessions: “A cookie issued to one IP and replayed from another is an easy signal for a site to read.”
Wayfern’s buyer’s guide makes the same point about fingerprints: a fingerprint that passes on page one is worth nothing if the cookie jar, local storage and exit IP change by page four.
In a login flow, you sign in from a US residential IP. If the exit changes before the third page, the sign-in cookie arrives from an address that never received it.
Add session=run42 to the /ws URL and the sticky session id holds one residential IP for the whole flow. Keeping the socket open keeps cookies and storage on the same instance, which is what a logged-in scraping flow needs.
Wayfern has no saved cookie jars and no cookie import or export.
The automation flag is part of the browser identity. MDN describes navigator.webdriver as indicating “whether the user agent is controlled by automation”, and the WebDriver specification defines it as returning the value of the webdriver-active flag. Any page script can read it.
Viewport has to agree with the rest. Set width=1280&height=800 on the URL and the real window is resized.
Emulation can leave those values disagreeing with each other.
The hosted browser runs headed on Xvfb, a virtual display. Chrome for Developers notes that the old headless mode was “a separate, alternate browser implementation”.
Which exit should a hosted Chromium browser for scraping use?
Pick the datacenter exit by default, a residential exit when the target requires a local consumer IP, and your own proxy when you already pay a proxy provider.
| Datacenter exit | Residential exit | Own proxy | |
|---|---|---|---|
| Selected with | Default | proxy=residential | proxy=own |
| Targeting | None | country, region, city, isp, sticky session | Whatever your provider offers |
| Billing | Egress free | Bandwidth | Not metered as residential bandwidth |
| Pick it when | The target accepts datacenter IPs | The target needs a local consumer IP | You already pay a proxy provider |
Wayfern’s pricing page sets the default exit to datacenter, and its datacenter egress is free.
Residential exits are chosen with country (ISO-3166), region, city and isp, and a sticky session id holds one IP for a whole flow. Our anti-detect browser sessions page covers the city and ISP targeting.
Oxylabs’ managed headless browser page advertises “175M+ premium residential proxies with country, city, and state geo-targeting”, so the ISP level is the part to compare.
Residential traffic is billed by bandwidth, so your cost follows the bytes your pages load. Blocking images and media in your script lowers it, and the per-GB rate is on the pricing page.
An unknown location fails loudly. Every code is checked against the live catalog before the browser is handed over, and the wayfern.com page states that “an unknown location is refused with close code 4007 instead of falling back to the wrong place.”
Handle it in code: on the socket close event, branch on code === 4007, log the location you sent and stop, because retrying the same value won’t succeed.
A bring-your-own proxy (http, https or socks5) is saved on the link with proxyMode: "own". Credentials never go in the URL, and the password is encrypted at rest.
How much does a hosted Chromium browser for scraping cost?
A hosted browser on Wayfern costs 8 credits per open-page hour, plus 320 credits per GB of residential bandwidth, and datacenter egress is free.
| Browser session | Scrape endpoint | Search API | |
|---|---|---|---|
| Billing unit | Open-page hour | Page | Provider results page |
| Rate | 8 credits | 1 credit | 2 credits |
| Fits | Sign-in, forms, waits | One public page | Results pages |
Metering is per second, with a 60-second minimum per page. The list rate is $0.0125 per credit.
Credits for a browser session follow from those published rates:
credits = (open seconds / 3600) x 8 + (residential GB x 320) A 10-minute logged-in flow on a datacenter exit is 600 / 3600 x 8 = 1.33 credits. A page open for 10 seconds is metered at the 60-second minimum: 60 / 3600 x 8 = 0.13 credits.
If the 10-minute flow also moves 0.1 GB through a residential exit, add 0.1 x 320 = 32 credits, for 33.33 in total.
Web Data API endpoints bill per page at their own rates: scrape, extract and crawl are 1 credit per page, and screenshot is 5. Wayfern’s pricing docs add that each response returns the exact credits charged, and failed Web Data work isn’t billed.
One public page belongs on the scrape endpoint. A flow with sign-in, a form fill or a wait for an element needs a held browser session.
The same balance pays for the Search API at 2 credits per provider results page. Captcha solving costs 1 credit per successful solve, and the MCP server draws on the same credits.
Hard stop at zero: nothing runs on credit you did not buy, and auto top-up is off until you turn it on. Plan, pack and concurrency details are on the Wayfern pricing page.
What are the limits of a hosted browser, and when should you self-host?
A hosted browser’s limits are the controls the vendor keeps, and self-hosting fits when you want to run the pool, upgrades, fonts, display and proxy wiring yourself.
| Wayfern (hosted) | rayobrowse (self-hosted) | Multilogin (desktop) | |
|---|---|---|---|
| Driven by | Code over CDP | Code over CDP | A person |
| Runs the pool, fonts, display server, proxy wiring | Wayfern | You | You |
| State between runs | Your code saves it | Your setup decides | Hand-managed profiles |
The honest catch for Wayfern:
- No customer-facing persistent profiles: no named profiles, saved cookie jars or cookie import/export, so your code saves and restores state between runs.
- No per-vector fingerprint switches: the fingerprint CDP methods need a licence token that stays server-side.
Wayfern publishes concurrency caps by plan, counted as pages open at once, on /pricing, and API rate limits on /docs/limits.
Because rayobrowse exposes standard CDP, the same Playwright or Puppeteer code can drive it. Self-hosting it means you run the pool, the upgrades, the fonts, the display server and the proxy wiring.
Rayobyte also sells a hosted rayobrowse, with 48 free browser hours, 5 browsers at a time and sessions that survive a disconnect. If a free trial or longer-lived sessions decide the purchase, look there first.
Each option fits a different operator:
- Wayfern fits code-driven scraping and automation where you’d rather pay for operations than run them.
- Self-hosted rayobrowse fits teams that want to own the infrastructure.
- Multilogin fits hand-managed, long-lived identities with per-vector control, where a person is the operator. The Wayfern vs Multilogin comparison covers the split in detail.
Frequently asked questions
How do I use a hosted Chromium browser for scraping?
Open a WebSocket to wss://api.wayfern.com/ws with your link token in the token parameter, then attach Playwright’s connectOverCDP() or Puppeteer’s connect(). Opening the socket creates the session, so no REST call comes first.
Is a hosted browser better than a scraping API?
Use the scrape endpoint for one page and a browser for a stateful flow such as a login. A request/response endpoint returns one page and keeps nothing, so multi-step work needs a session you hold.
Can a hosted browser keep my login between runs?
Not on Wayfern, which has no persistent profiles. Save cookies and storage in your own code when a run ends, then restore them at the next start.
Does a hosted Chromium browser support Firefox or mobile emulation?
Wayfern runs the Chromium family only, on a desktop device. Mobile-layout checks need another tool.
What happens when a hosted browser session runs out of credits?
Wayfern’s pricing page describes a hard stop at zero: nothing runs on credit you did not buy, and auto top-up stays off until you turn it on.
In the next week, estimate cost with the open-page hour formula, then choose per job between the scrape endpoint, the Search API and a held browser. For hand-managed identities, compare Multilogin and its alternatives; if running the infrastructure is the goal, try a self-hosted Chromium stealth browser for web scraping such as rayobrowse.
Start with the connection example, and check the published rates at /pricing before you commit credits to a hosted Chromium browser for scraping.
Sources
Chromium Stealth Browser for Web Scraping | Rayobyte · Wayfern docs quickstart · Anti-detect browser sessions · Playwright BrowserType · GitHub - rayobyte-data/rayobrowse · Best Anti-Detect Browsers for Automation, Compared · Pricing - Credits for Browsers & the Web Data API | Wayfern · Wayfern vs Multilogin. Every other source is linked where the article cites it.
See us more often in Google
One click marks Wayfern as a preferred source in Google, so our posts can show up more often in your Top Stories, AI Mode and AI Overviews.