Stagehand
Reasonable, with limits. 6th of 10 web scraping and HTML parsing.
Stagehand is a TypeScript SDK from Browserbase. It drives a Chrome browser and uses an AI model to act on pages and pull typed data out of them. It is a good pick when page layouts change or are unknown. For deterministic scraping at volume it is slower, costs more per page and is less predictable than Puppeteer, Crawlee or Cheerio.
Best for: TypeScript teams that want AI-assisted extraction and actions on sites they do not control, mixed with normal browser code.
Scores
Overall6.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.5, likely 5.0 to 7.5
Stagehand is the strongest JavaScript pick for AI-assisted extraction and actions on sites whose layout you cannot rely on, and it is growing fast with heavy investment. For the category's core job, deterministic page loading and HTML reading, Puppeteer, Crawlee and Cheerio are cheaper, faster and more predictable. Frequent breaking majors and the 2025 supply-chain compromise also hold it back. Its standing among peers rests on a narrower use case, which keeps the range wide.
- dev.to/alexcloudstar/ai-browser-agents-in-2026-stagehand-vs-browser-use-vs-playwright-38ob: Recommends it for scoped AI steps, not for every workflow
- pkgpulse.com/guides/stagehand-vs-playwright-ai-vs-browser-use-ai-web-2026: Plain browser automation is more reliable for deterministic flows
- peers Puppeteer / Cheerio: Far larger adoption for classic scraping
- advisories: One malicious-version incident in the last 24 months
GPT-6.2 Sol: 7.1, likely 6.0 to 8.2
Stagehand is a strong pick when browsing and extracting from changing pages would otherwise require frequent selector maintenance. Its typed extraction, browser controls and active maintenance earn that recommendation, with some uncertainty from the recent v4 rewrite and limited evidence on extraction accuracy. Cheerio is the simpler choice for static HTML, and Puppeteer is the better default when browser steps can be scripted reliably.
- docs.stagehand.dev/v4/basics/extract: Typed, schema-validated extraction from rendered pages.
- docs.stagehand.dev/v4/migrations/v3: Details the lifecycle, API and result changes in v4.
- github.com/webdriverio/benchmark/blob/main/results/2026-10-05-run-37268739610/report.md: Independent comparison shows competitive agent performance with substantial task failures.
- cheerio.js.org/docs/intro: Cheerio covers static HTML parsing without launching a browser.
- pptr.dev/api/puppeteer.page.content: Puppeteer exposes rendered HTML directly through its page API.
Needed by many4.2
How many developers need a tool for this job?
Claude Opus 5.5: 4.5, likely 3.0 to 6.0
Many developers load pages and read HTML, but Stagehand's AI-driven approach suits a smaller group: people who build agents or scrape sites whose layout they cannot rely on. It needs an LLM key and a real browser, so it is too heavy for plain HTML parsing. The share is growing as more teams build AI agents.
- project.note: Drives a browser with an AI model: a specialised take on the category
- pkgpulse.com/guides/stagehand-vs-playwright-ai-vs-browser-use-ai-web-2026: Recommends it for unstable UIs, prototypes and agents, not bulk deterministic work
GPT-6.2 Sol: 3.9, likely 2.8 to 5.2
Stagehand is most useful when pages need a real browser and the task calls for interpreting changing layouts or content. Static HTML and sites with stable selectors rarely need its AI layer. Scraping surveys show demand for browser tooling, but give little indication of how many JavaScript developers need model-driven extraction.
- get.apify.com/hubfs/apify-state-of-web-scraping-report-2026.pdf: Scraping survey lists Selenium, Puppeteer, Playwright and Scrapy as the most used frameworks.
- github.com/browserbase/stagehand/blob/main/packages/docs/v4/first-steps/introduction.mdx: Documents the Chromium runtime and the focus on browser automation and agents.
- cheerio.js.org/docs/intro: Shows how much static scraping can be done with an HTML parser.
Helps a lot6.9
How well does it do the job for those who need it?
Claude Opus 5.5: 6.5, likely 5.0 to 8.0
Its act, extract and observe primitives work well, Zod-typed extraction is useful, and it ships TypeScript types. An independent author calls it the most reliable AI option for extraction on pages you do not control, with failures that show up as normal stack traces. Limits keep it in the middle range: outside estimates put per-step reliability at about 85–95%, every AI step costs tokens, and fast API churn makes it hard for AI coding agents to write current code.
- dev.to/alexcloudstar/ai-browser-agents-in-2026-stagehand-vs-browser-use-vs-playwright-38ob: Calls v3 much more reliable and the best of the three for extraction; poor at open-ended tasks
- pkgpulse.com/guides/stagehand-vs-playwright-ai-vs-browser-use-ai-web-2026: 85–95% reliability per step and $0.003–$0.01 per act() call
- browserbase.com/blog/stagehand-v4: v4 moves the core into the browser and changes the API in many places
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 7.3, likely 6.1 to 8.4
Stable 4.4.0 combines typed extraction with documented selectors, DOM reads and reusable browser sessions. A recent user report shows how an extracted value can satisfy its schema and still be wrong. LangChain found that agents did better writing Playwright-style code than using the native Stagehand interface in its setup. The available comparisons say more about agent workflows than about extraction accuracy across a large set of sites.
- npmjs.com/package/%40browserbasehq/stagehand?activeTab=versions: Confirms 4.4.0 is latest and 3.7.4 is tagged v3-latest.
- docs.stagehand.dev/v4/basics/extract: Documents inferred types, Zod validation, timeouts and extraction scoped to a locator.
- docs.stagehand.dev/v4/reference/page: Documents typed page evaluation and browser controls.
- github.com/browserbase/stagehand/issues/3234: User reports element IDs appearing in fields intended to hold URLs.
- langchain.com/blog/how-we-optimized-browser-use-for-deep-agents: The native API scored 5.3 percentage points lower than the Playwright-style interface in one agent comparison.
Holds up over time7.3
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 5.5 to 8.5
Work on it is very active: 858 commits, 48 GitHub releases and 31 npm versions in the last year, 52 contributors and 1,891 merged pull requests. Browserbase is a funded company that sells a cloud product built around it. The pace of breaking changes lowers the score: v3 in late 2025 and v4 in August 2026 both changed the API. 332 open pull requests suggest a review backlog.
- github commitsLastYear / releasesLastYear: 858 commits and 48 releases in the last year
- github openPullRequests: 332 open pull requests against 1,891 merged
- browserbase.com/blog/stagehand-v4: v4 brings breaking changes to startup, getters, caching and locators
- docs.stagehand.dev/v3/migrations/v2.md: The v2-to-v3 migration guide shows another recent break
GPT-6.2 Sol: 7.5, likely 6.1 to 8.6
Browserbase actively maintains Stagehand, and the repository's commit activity is close to Puppeteer's and Crawlee's. A recent navigation wait report led to fix work within days, though 332 open pull requests leave review turnaround uncertain. The v4 rewrite changed core APIs, and Mastra's upgrade issue shows the work that downstream integrations can face.
- github commitsLastYear, contributors, releasesLastYear, openPullRequests: 858 commits, 52 contributors, 48 releases and 332 open pull requests across the repository.
- peers Puppeteer and Crawlee commitsLastYear: Puppeteer logged 903 commits and Crawlee logged 781.
- browserbase.com/changelog/stagehand-4-4: Browserbase shipped browser reconnection and crash cleanup in November.
- github.com/browserbase/stagehand/issues/3370: November user report on navigation waits links to follow-up fixes.
- github.com/mastra-ai/mastra/issues/24221: Downstream maintainers document the API changes and redesign work for v4.
Used widely5.8
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
npm downloads went from 1.8M to 10.7M per 4 weeks. That ratio of 5.9 is above the 4.1 median, so it is gaining ground. Part of the volume likely comes from agent frameworks and CI that install it transitively, and ecosyste.ms has no dependents count. It has 26k stars, about level with Crawlee, but its downloads and use stay far below Puppeteer, Cheerio and jsdom.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 10.67M vs 1.82M, a ratio of 5.9 against a 4.1 median
- github stars: 26,109 stars, similar to Crawlee and below Puppeteer and Cheerio
- dependents: null, so direct use cannot be confirmed
- bluesky posts: 20 posts, more attention than most peers
GPT-6.2 Sol: 5.5, likely 3.8 to 7.0
Four-week npm downloads rose 5.9-fold, ahead of the 4.1-fold catalog median and faster than Puppeteer, Cheerio and Crawlee. Stagehand also has more Bluesky links than any listed peer, though its repository covers several SDKs and a CLI. npm lists 115 dependent packages, and the missing comparable repository count leaves a wide range for direct adoption because repeat installs and integrations also generate downloads.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo; medianDownloadsRatio: 10.67 million versus 1.82 million downloads, or 5.9-fold growth against a 4.1-fold median.
- github stars; bluesky posts; peers: 26,109 stars and 20 Bluesky posts, compared with 0 to 12 posts per listed peer.
- dependents: The collector has no comparable dependent count for this scoped package.
- npmjs.com/package/%40browserbasehq/stagehand?activeTab=versions: npm lists 115 dependent packages.
- npmjs.com/package/browse?activeTab=readme: Browserbase's Browse CLI installs a pinned Stagehand SDK from the shared repository.
Vouched for6.1
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
Several independent blog comparisons review it and mostly recommend it for targeted AI steps, and agent frameworks integrate it. No developer survey covers it, and the speed and reliability numbers mostly come from Browserbase or from guides of unclear quality. Hacker News attention in the bundle is minimal.
- dev.to/alexcloudstar/ai-browser-agents-in-2026-stagehand-vs-browser-use-vs-playwright-38ob: Independent comparison that is favourable for extraction
- pkgpulse.com/guides/stagehand-vs-playwright-ai-vs-browser-use-ai-web-2026: Third-party guide with a mixed verdict
- hackerNews: One story with 1 point
- github description: Mentions integrations with Claude Code, Codex and Mastra
GPT-6.2 Sol: 7.2, likely 5.9 to 8.3
LangChain ships Stagehand in Managed Deep Agents, and Crawlee released a dedicated Stagehand crawler. In a separate WebdriverIO benchmark, Stagehand led the tested setups with 32 of 50 tasks completed. These results support its browser-agent use case, while results for everyday scraping are thinner and some integrations still target older releases.
- langchain.com/blog/browser-use-in-managed-deep-agents: LangChain runs Stagehand in its managed product and reports 90 of 100 WebVoyager tasks passed.
- github.com/apify/crawlee/blob/master/website/blog/2026/02-06/index.md: Crawlee shipped a crawler built on Stagehand.
- github.com/webdriverio/benchmark/blob/main/results/2026-10-05-run-37268739610/report.md: WebdriverIO's October agent benchmark put Stagehand 4.1 first on task completion.
- developers.cloudflare.com/browser-run/stagehand: Cloudflare documents a first-party integration limited to Stagehand 2.5.x.
Safe5.9
How safe is it to depend on?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Version 3.0.4 was published with credential-stealing malware during the Shai-Hulud 2.0 worm in November 2025, after an npm account takeover. Later versions are clean. The package has 4 dependencies and an MIT licence, but no OpenSSF Scorecard is available, so it is unclear whether publishing has been hardened since. By design it sends page content to a third-party LLM, which adds data-exposure risk.
- advisories MAL-2025-191198: Malicious code advisory published 2025-11-25
- osv.dev/vulnerability/MAL-2025-191198: Version 3.0.4 affected by the Shai-Hulud 2.0 worm
- advisories.gitlab.com/npm/@browserbasehq/stagehand-docs/GMS-2025-55: Related Browserbase packages were hit on 24 Nov 2025; the payload harvests credentials
- npm dependencies / scorecard: 4 dependencies; no Scorecard data
GPT-6.2 Sol: 6.3, likely 4.8 to 7.6
The November 2025 Shai-Hulud incident affected npm version 3.0.4, which was removed from the registry. Stable 4.4.0 falls outside the affected version, has four direct dependencies and uses the permissive MIT license. The project publishes through GitHub Actions and has a private security reporting policy. The missing Scorecard and limited public detail on removal timing and publishing access widen the range.
- osv.dev/vulnerability/MAL-2025-191198: OSV identifies 3.0.4 as the compromised version.
- security.snyk.io/vuln/SNYK-JS-BROWSERBASEHQSTAGEHAND-14103765: Snyk confirms removal of the malicious release from npm.
- github.com/browserbase/stagehand/blob/main/.github/workflows/release.yml: Public TypeScript release workflow uses GitHub Actions and Changesets.
- github.com/browserbase/stagehand/security: Private vulnerability reporting and a security fix policy for the latest release.
- npm dependencies, license; scorecard: Four direct dependencies, MIT license and no Scorecard in the bundle.
Good
- extract() with a Zod schema returns typed data, so you do not write brittle selectors.
- It calls the AI model only for the steps that need it, so it costs less than fully autonomous agents.
- It is developed very actively: 858 commits and 48 GitHub releases last year, and TypeScript, Python and Go SDKs at the same feature level since v4.
- It pulls in only 4 direct dependencies and is MIT-licensed.
Bad
- Results are not deterministic, and every AI step costs model tokens, so long multi-step flows need retries.
- Three major versions (v2, v3, v4) in about a year each brought breaking API changes.
- Version 3.0.4 was published with credential-stealing malware during the Shai-Hulud 2.0 npm worm in November 2025.
- Page content goes to an LLM provider, and some features, such as CAPTCHA handling, work best on the paid Browserbase cloud.
The numbers
- npm downloads, 4 weeks
- 11M ×5.9 in a year
- GitHub stars
- 26k
- Commits, 12 months
- 858
- npm version
- 4.4.0 Nov 2026
- Versions, 12 months
- 31
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
It drives a browser with an AI model.
Read on 21 November 2026 from GitHub (browserbase/stagehand), npm (@browserbasehq/stagehand), OSV and the OpenSSF Scorecard.
Web scraping and HTML parsing
- 8.1Cheerio
- 7.9Puppeteer
- 7.8Crawlee
- 7.3htmlparser2
- 7.1jsdom
- 6.8Stagehand
- 6.8Readability
- 5.5Happy DOM
- 5.4LinkeDOM
- 5.2Selenium WebDriver