serp.fast

TypeScript and Python SDK for driving browsers with natural language

Nathan Kessler
By Nathan KesslerUpdated

Each tool is evaluated against our methodology using public docs, vendor demos, and hands-on testing.

Stagehand website

What is Stagehand?

TypeScript and Python SDK by Browserbase for building AI-powered web automation – act, extract, and observe with natural language commands.

Our verdict

Elegant API design – act(), extract(), and observe() map perfectly to how AI agents interact with web pages. 23K+ GitHub stars and Browserbase backing ensure continued development. It now ships both TypeScript and Python SDKs, widening its reach beyond the original TS-only audience. Still tightly coupled with Browserbase for cloud execution. The open-source framework is free but production use naturally leads to Browserbase spend.

Categories:

Agentic extraction tools use AI models (often vision-language models) to autonomously understand and interact with web pages. Instead of writing CSS selectors or XPath queries, you describe what data you want in natural language and the AI figures out how to get it. This approach is more resilient to website changes and can handle complex, multi-step extraction workflows.

Share:

Cloud browser infrastructure for agents, with the Stagehand SDK

FreemiumMar 2026Browser Infrastructure

Hands any website to an AI agent, the top browser-automation repo

Freemium98K+Browser Infrastructure

Python library that scrapes sites from plain-English prompts

Freemium27K+Agentic Extraction

How Stagehand compares

ScrapeGraphAI

ScrapeGraphAI focuses on extraction specifically, while Stagehand handles broader page interaction and navigation.

Frequently asked questions

Is Stagehand open source?

Yes. Stagehand is open source under the MIT license, maintained by Browserbase on GitHub. As of v3 it talks to the browser directly over the Chrome DevTools Protocol rather than depending on Playwright, and layers natural-language primitives on top for driving a browser. The MIT license permits commercial use and modification. The framework is free to install and run. Your costs come from the LLM provider you connect for the natural-language calls, plus any Browserbase cloud usage you choose to add.

How much does Stagehand cost?

The Stagehand SDK is free. Spending comes from two external pieces. First is the LLM provider whose API key you supply, billed per token for the act, extract, and observe calls. Second is Browserbase cloud browsers, an optional layer for production that has its own free and paid tiers. Running locally against your own browser avoids Browserbase charges entirely, leaving only the LLM token cost.

Can Stagehand be self-hosted?

Yes. Stagehand runs locally against a browser it drives on your own machine or infrastructure, using an LLM API key you provide. You are not required to use Browserbase. The Browserbase cloud is an optional layer for managed sessions and zero-infrastructure deployment. Many teams develop and run Stagehand entirely self-hosted, then connect Browserbase only when they need hosted browsers at scale.

What language does Stagehand use, TypeScript or Python?

Both. Stagehand started as a TypeScript SDK and now also ships an official Python SDK, which matters for AI teams whose machine-learning tooling lives in Python. Whichever language you use, the core primitives stay the same: act for actions, extract for structured data, observe for inspecting the page, and a higher-level agent flow for multi-step tasks.

Does Stagehand handle JavaScript-rendered pages and structured extraction?

Yes. Stagehand drives a real browser over the Chrome DevTools Protocol, so it renders JavaScript-heavy pages before acting on them. Its extract method takes a schema, typically a Zod schema in TypeScript, and returns typed JSON matching that shape. A live browser plus schema-constrained output is the main reason teams pick it for agent-style scraping where they need predictable data structures rather than raw HTML.

How does Stagehand compare to Browser Use?

Both turn natural-language instructions into browser actions. Browser Use is Python-first and leans toward autonomous agents that decide their own steps. Stagehand gives you lower-level primitives (act, extract, and observe), so you script the flow and call the model only where you need it, which makes runs more deterministic and easier to debug. Pick Browser Use for open-ended autonomous tasks. Pick Stagehand when you want repeatable, controlled automation with typed extraction.

Visit

Stagehand

Visit