Floppydata Floppydata

Sessions are free — pay only for traffic

Run Playwright in the Cloud

Point your Playwright scripts and tests at Chromium running in Floppydata's cloud. One API request starts a browser, connectOverCDP() connects to it, and the rest of your code stays as it is.

  • Connect with connectOverCDP() — no browsers to install
  • Node.js, Python and Playwright Test
  • Free with Floppydata proxies — you pay only for traffic

How to Run Playwright in the Cloud

Create a session with one API request, then hand its connectUrl to Playwright. The example follows the Cloud Browser guide in our documentation.

Three steps

  1. 1 Create a Client API key in your Floppydata account.
  2. 2 Send POST /v2/browser/sessions. The response has a connectUrl.
  3. 3 Pass it to connectOverCDP() and work as usual. Closing the browser stops the session.
run.mjs
import { chromium } from 'playwright';const res = await fetch('https://api.floppydata.net/v2/browser/sessions', {    method: 'POST',    headers: {        'X-Api-Key': process.env.FLOPPY_API_KEY,        'Content-Type': 'application/json',    },    body: JSON.stringify({        proxy: { type: 'residential', location: { countryCode: 'US' } },    }),});const { connectUrl } = await res.json();const browser = await chromium.connectOverCDP(connectUrl);const page = await browser.contexts()[0].newPage();await page.goto('https://example.com/');console.log(await page.title());await browser.close(); // stops the session

Create a session, connect, open a page.

From Local Playwright to Cloud Playwright

Locally, every Playwright worker starts its own Chromium. As a test suite or a scraper grows, those browsers compete for CPU and memory, and every CI runner has to download them first.

With Floppydata Cloud Browser, Chromium runs remotely. Your code connects over the Chrome DevTools Protocol, so playwright-core is enough on your side, and every run gets a browser session of its own.

Local Playwright before
const browser =
    await chromium.launch();
Floppydata Cloud Browser after
const browser =
    await chromium.connectOverCDP(connectUrl);

Everything after this line stays the same. connectUrl comes from the create request above.

Playwright with Built-in Proxies

Every session runs through Floppydata proxies, so there is no proxy server to set up in Playwright. Pick the IP type, the country and the rotation, and send the result as the body of the create request.

Configure your Playwright cloud session

Proxy type
Rotation
POST /v2/browser/sessions
{
  "proxy": {
    "type": "residential",
    "location": {
      "countryCode": "US"
    },
    "rotation": {
      "mode": "sticky"
    }
  }
}

A city, a state or an ASN can be targeted in the same request. Residential IPs cover 148 countries, mobile 150 and datacenter 71.

Local vs Cloud Playwright

Local Playwright compared with Playwright on Floppydata Cloud Browser
Local Playwright Playwright on Cloud Browser
Chromium Installed and updated on every machine Runs in Floppydata's cloud
Browsers in CI Downloaded on every runner Not needed: playwright-core is enough
Proxies Set up by you for every launch Built in: residential, mobile or datacenter
Parallel browsers Limited by your CPU and RAM Up to 100 sessions per account
Cost of the browser Your servers' time Free: only proxy traffic is billed
Connection Playwright protocol, every browser engine CDP with connectOverCDP(), Chromium only

connectOverCDP() covers what most scripts do (navigation, locators, clicks, forms, waits and JavaScript), but it is not the full Playwright protocol. Check anything unusual against your own scripts.

Scale and Shape Each Session

Every setting is an optional field of the create request: send only the ones you need, or send nothing and get a residential proxy, a coherent fingerprint and a 10-minute timeout.

Debug Playwright Runs in a Live Browser

When a script stops on a screen it didn't expect, like a consent banner or an extra login step, open a live view of the session in your own browser and see exactly what the page shows.

Playwright and the live view take turns on one session, so the run can continue where it stopped instead of starting over. More about UI mode

  1. 1 Create the session with keepAlive: true, so disconnecting doesn't stop it.
  2. 2 When a run stops on an unexpected screen, disconnect Playwright.
  3. 3 Request a live view and open it: see the page and deal with it by hand.
  4. 4 Get the session again and reconnect Playwright with the fresh connectUrl.

Free for Floppydata Proxy Users

Cloud Browser has no subscription, runtime or per-session fee. Every session runs through Floppydata proxies, and the proxy traffic it uses is the only thing you pay for: from $1.00 per GB, one rate for residential, mobile and datacenter.

If you already buy Floppydata proxies, Cloud Browser is included: the same balance, the same API key. Run up to 100 sessions at once on one account, or ask support to raise the limit.

Common Playwright Cloud Connection Errors

What the API or the connection says when something goes wrong, and what to do about it.

Cloud Browser connection errors and how to fix them
Error What it means What to do
unauthorized The signed connectUrl has expired or is invalid. Get the session again and connect with its fresh connectUrl.
connection_in_use Another client or a live view is already connected: one connection per session. Close the other connection, then retry.
session_not_active The session has stopped, timed out or failed. Create a new session; for long jobs, raise runtime.timeoutSeconds.
Connection closes A single message went over about 1 MiB, such as a full-page screenshot or a screencast frame. Take viewport or element screenshots, or clip the area you need.
upstream_error A browser service operation failed for a moment. Retry: stopping a session is safe to repeat.

Frequently Asked Questions

Which browsers are supported?
Chromium. Sessions connect over the Chrome DevTools Protocol, which Playwright supports for Chromium only, so Firefox and WebKit projects can't use them. Puppeteer connects to the same sessions.
What is the difference between connect() and connectOverCDP()?
connect() speaks Playwright's own protocol and needs a Playwright server on the other end. connectOverCDP() attaches to Chromium over the Chrome DevTools Protocol, which is what a Floppydata session exposes, so use connectOverCDP() (connect_over_cdp() in Python). It covers navigation, locators, clicks, forms, waits and JavaScript, but it is not the full Playwright protocol, so check anything unusual against your own scripts.
Can I take screenshots in a cloud session?
Yes, with one limit: a single message over the connection can be about 1 MiB, so a very large full-page screenshot or a screencast frame can close it. Take viewport or element screenshots, or clip the area you need.
How many Playwright sessions can I run in parallel?
Up to 100 at the same time on one account. If your suite needs more, contact support to raise the limit.
How long can a session run?
From 60 seconds to 6 hours; the default is 10 minutes. By default, closing the Playwright connection also stops the session. With keepAlive set to true you can disconnect and reconnect until the session expires.
Can I keep cookies and logins between runs?
Yes. Each session returns a settings ID that restores the same browser identity and state next time, and an account can keep up to 20 saved settings. You can also import up to 100 cookies before launch.

Explore Other Cloud Browser Solutions