# Playwright migration with Zenrows · Keep the code

> Rewrite in-house Playwright or Puppeteer scrapers as one Zenrows call. The browser farm, proxy pool, stealth patches and retries become flags.

## Reference Keep the scraper. Scroll the rest away.

Your Playwright job, line by line, as the browser farm, proxies, stealth and retries collapse into the call on the right.

import { chromium } from "playwright" ; import { newInjectedContext } from "fingerprint-injector" ; const proxies = require ( "./proxies.json" ); let attempt = 0 ; while (attempt < MAX_RETRIES) { const proxy = rotate (proxies); const browser = await chromium. launch ({ headless: true , proxy }); const ctx = await newInjectedContext (browser); const page = await ctx. newPage (); await page. route ( "**/*" , blockResources); try { await page. goto (url, { waitUntil: "networkidle" }); await page. waitForSelector ( ".price" , { timeout: 15000 }); await solveCaptcha (page); const html = await page. content (); const data = parsePrice (html); await browser. close (); return data; } catch (e) { attempt++; await browser. close (); } } scraper.sh · Zenrows curl "https://api.zenrows.com/v1/" \ -d url=https://store.example/p/123 \ -d js_render =true \ -d premium_proxy =true \ -d wait_for =.price \ -d autoparse =true Browser, stealth, proxies and retries are ours to run now.

## Delete the browser farm.

Everything you stand up to make a headless browser look human, and keep it that way, stops being yours.

- A pool of headless Chromium instances autoscaled, patched, restarted

- Residential & datacenter proxy contracts rotated, scored, rebought

- Fingerprint & stealth patches chased every Chrome release

- CAPTCHA-solver budget per-solve, unpredictable

- The 2am page when a site changes on-call, every week

## Every line you babysat is a flag.

Pick a thing your code used to handle. The flag on the right is what replaces all of it.

const ctx = await newInjectedContext(browser); await solveCaptcha(page); // + chase every Chrome fingerprint release One flag -d js_render=true A real browser with a real fingerprint, kept current by us.

## Drag the maintenance away.

The stack you own is on top. Drag the handle right and watch it give way to the one call underneath. Same data out either way.

curl "https://api.zenrows.com/v1/" \ -d url=https://store.example/p/123 \ -d js_render=true \ -d premium_proxy=true \ -d autoparse=true 1 call browser, proxies, stealth and retries are ours to run your stack · in-house ~24 files & configs Browser pool & autoscaling Proxy rotation & scoring Stealth / fingerprint patches CAPTCHA solving Retry & backoff logic HTML parsing & cleanup On-call when a site changes you maintain every layer above, patched and on-call The output doesn't change. Point your existing parser at the response. Same fields, same shape, sourced through one call instead of a fleet.

{ "title" : "Aurora 14\" Laptop" , "price" : 1299.00 , "currency" : "USD" , "in_stock" : true , "rating" : 4.6 } Playwright · Puppeteer · Selenium · Scrapy + Splash · Cypress · Selenium Grid · undetected-chromedriver · Playwright · Puppeteer · Selenium · Scrapy + Splash · Cypress · Selenium Grid · undetected-chromedriver · Keep the code. Drop the infrastructure. The logic that makes your scraper yours stays. The plumbing that made it fragile becomes a line you never touch again.

## Migrate one job this afternoon.

Take the scraper that breaks most, point its URL at Zenrows, and delete the parts you were never paid to maintain.

Web data infrastructure for AI, data and automation teams.

Product

- [Fetch](https://www.zenrows.com/products/fetch)

- [Extract](https://www.zenrows.com/products/extract)

- [Browser Sessions](https://www.zenrows.com/products/browser-sessions)

- [Batch](https://www.zenrows.com/products/batch)

Agents

- [Agent Toolkit](https://www.zenrows.com/agents)

- [Skills](https://www.zenrows.com/agents/skills)

- [Plugins](https://www.zenrows.com/agents/plugins)

- [Workflows](https://www.zenrows.com/agents/workflows)

Solutions

- [AI Agents](https://www.zenrows.com/solutions/ai-agents)

- [Pricing intelligence](https://www.zenrows.com/solutions/pricing-intelligence)

- [Competitive intel](https://www.zenrows.com/solutions/competitive-intelligence)

- [Lead enrichment](https://www.zenrows.com/solutions/lead-enrichment)

- [E-commerce](https://www.zenrows.com/solutions/ecommerce)

- [Finance & alt-data](https://www.zenrows.com/solutions/finance)

- [All solutions](https://www.zenrows.com/solutions)

Scrape

- [Amazon](https://www.zenrows.com/scrape/amazon)

- [Zillow](https://www.zenrows.com/scrape/zillow)

- [Idealista](https://www.zenrows.com/scrape/idealista)

- [eBay](https://www.zenrows.com/scrape/ebay)

- [LinkedIn](https://www.zenrows.com/scrape/linkedin)

- [Google](https://www.zenrows.com/scrape/google)

- [All targets](https://www.zenrows.com/scrape)

Anti-bot

- [Cloudflare](https://www.zenrows.com/bypass/cloudflare)

- [DataDome](https://www.zenrows.com/bypass/datadome)

- [Akamai](https://www.zenrows.com/bypass/akamai)

- [PerimeterX](https://www.zenrows.com/bypass/perimeterx)

- [reCAPTCHA](https://www.zenrows.com/bypass/recaptcha)

- [All anti-bot](https://www.zenrows.com/bypass)

Compare

- [vs Firecrawl](https://www.zenrows.com/compare/firecrawl)

- [vs Bright Data](https://www.zenrows.com/compare/bright-data)

- [vs Apify](https://www.zenrows.com/compare/apify)

- [vs Browserbase](https://www.zenrows.com/compare/browserbase)

- [All comparisons](https://www.zenrows.com/compare)

- [Alternatives](https://www.zenrows.com/alternatives)

Developers

- [Documentation](https://docs.zenrows.com/first-steps/welcome)

- [MCP Server](https://www.zenrows.com/mcp)

- [SDK](https://www.zenrows.com/products/sdk)

- [CLI](https://www.zenrows.com/cli)

- [Integrations](https://www.zenrows.com/integrations)

- [Resources](https://www.zenrows.com/resources)

- [Glossary](https://www.zenrows.com/glossary)

- [Changelog](https://www.zenrows.com/changelog)

Company

- [About](https://www.zenrows.com/about)

- [Customer Stories](https://www.zenrows.com/customers)

- [Case Studies](https://www.zenrows.com/case-studies)

- [Blog](https://www.zenrows.com/blog)

- [Community](https://www.zenrows.com/community)

- [Careers](https://www.zenrows.com/careers)

- [Trust Center](https://trust.zenrows.com/)

- [Reliability](https://www.zenrows.com/reliability)

- [Status](https://status.zenrows.com/)

- [Enterprise](https://www.zenrows.com/for/enterprise)

- [For teams](https://www.zenrows.com/for)

- [Partners](https://www.zenrows.com/partners)

- [Media kit](https://www.zenrows.com/media)

- [Legal](https://www.zenrows.com/legal)

- [Contact](https://www.zenrows.com/contact)

© 2026 Zenrows. All rights reserved. · [Privacy](https://www.zenrows.com/legal/privacy) · [Terms](https://www.zenrows.com/legal/terms) · [Cookies](https://www.zenrows.com/legal/cookies) · [Legal](https://www.zenrows.com/legal) · [Sign in](https://app.zenrows.com)

_Canonical HTML: https://www.zenrows.com/agents/workflows/playwright-migration_

## Site Navigation

### Global Hub
- [Home](https://www.zenrows.com/index.md)
- [Pricing](https://www.zenrows.com/pricing.md)
- [Products](https://www.zenrows.com/products.md)
- [Agent Toolkit](https://www.zenrows.com/agents.md)
- [Compare](https://www.zenrows.com/compare.md)
- [Alternatives](https://www.zenrows.com/alternatives.md)
- [Blog](https://www.zenrows.com/blog)
- [Docs](https://docs.zenrows.com)
- [llms.txt](https://www.zenrows.com/llms.txt)
- [Agent skill](https://www.zenrows.com/SKILL.md)

### On This Topic
- [Agents overview](https://www.zenrows.com/agents.md)
- [Skills catalog](https://www.zenrows.com/agents/skills.md)
- [Plugins · client integrations](https://www.zenrows.com/agents/plugins.md)
- [Workflows · composed primitives](https://www.zenrows.com/agents/workflows.md)
- [Price monitoring](https://www.zenrows.com/agents/workflows/price-monitoring.md)
- [Competitor intelligence](https://www.zenrows.com/agents/workflows/competitor-intel.md)
- [Lead enrichment](https://www.zenrows.com/agents/workflows/lead-enrichment.md)
- [SERP monitoring](https://www.zenrows.com/agents/workflows/serp-monitoring.md)
- [Marketplace catalog ingestion](https://www.zenrows.com/agents/workflows/marketplace-catalog.md)
- [Protected site debug](https://www.zenrows.com/agents/workflows/protected-site-debug.md)
