// Shopping

Compare laptop specs across product pages

Search Staples, open the top three laptops and normalize their specs into one table.

stagehand code-mode agent (mcp facade), browserbase recording at 2× speed, no sound

11 agent tool calls, click to jump

++

Why it’s hard

Each product page hides the numbers you need behind a tab, in a slightly different layout.

  • Specs sit behind a tab below the fold that only renders once opened
  • Sponsored tiles are mixed into the search results
  • Only the first row of results renders until the page is scrolled

Stagehand vs. Playwright MCP

Given the same goal and model, the Stagehand code-mode agent finished for 74% less than an agent driving Playwright MCP.

stagehand code mode agent2/3 runs succeeded
$0.163
playwright mcp agent3/3 runs succeeded
$0.617

medians over successful runs, or over all runs when none succeeded; lower is better

Then run it as a script

Once the flow works, the cookbook runs it as plain Stagehand calls. With caching on, a re-run cost about the same as the first run.

cookbook, first run3/3 runs succeeded
$0.211
cookbook, cached re-run3/3 runs succeeded
$0.215

medians over successful runs, or over all runs when none succeeded; lower is better

anthropic/claude-sonnet-5 at $2 input · $0.2 cached · $2.5 cache write · $10 output per 1m tokens · stagehand 4.1.0 · playwright mcp 0.0.82 · agents stop after 60 llm calls · run on 2026-09-25 · methodology

++

Run it yourself

Give the same goal to Claude Code with Stagehand’s code-mode MCP server, which exposes three tools: run, snapshot and screenshot. Once the flow works, the cookbook runs it as a plain Stagehand script.

the goal both agents were given

Search Staples for "laptops 16gb ram". Open the first three laptops in the results that are not sponsored and, for each, report the name, current price in USD, processor, RAM in GB, storage in GB, screen size in inches, weight in pounds (null if not listed) and the product page URL.

++