Thanks to visit codestin.com
Credit goes to docs.browserbase.com

Skip to main content
Most of the web has no API. A browser agent does real work on the web where scripts break: it reasons about each page instead of following fixed selectors, so it adapts to sites that change, block bots, or hide data behind forms and JavaScript. Browserbase is the browser agent platform. One API key gives your agent everything it needs: headless browsers, Agents, Search, Fetch, Agent Identity, Functions, and the Model Gateway.

Agent or script?

Browser agents are a spectrum, not one thing. The decision axis is risk versus scale: risk pushes toward deterministic control, and scale pushes toward agency. If a wrong click costs money or fails an audit, you want a script. If you can’t enumerate the sites, layouts, or workflows ahead of time, scripting becomes a losing fight and you want an agent. The browser agent autonomy levels post covers the full spectrum.
Where you sitWhat it looks likeBrowserbase tool
Script owns the flow, AI handles individual stepsDeterministic code with self-healing act and extract callsStagehand
Script hands off to an agent for the hard stepsA scripted backbone that calls an agent for the steps that need reasoningStagehand + Agents
Agent owns the loop, you ask for a resultA fully autonomous run from a natural language goalAgents
The rest of this page maps concrete technical challenges to the right tool.

Use cases and technical solutions

Use caseBrowserbase solution
Automate sites that constantly changeAn Agent renders the page and reacts to popups and layout changes
Reach data behind logins and formsAn Agent navigates and fills forms; variables for inputs; downloads for files
Extract data from JavaScript-heavy appsA real browser executes JavaScript so dynamic content renders
Pull the same data on a scheduleFind the underlying request, then replay it with Fetch
Run deep research across the webSearch to discover, Fetch for cheap context, an Agent to act
Scale across hundreds of sitesOne reusable Agent instead of N brittle scripts

Automate sites that constantly change

Sites like squareup.com change their markup often and throw interstitials, cookie banners, and modal popups that break selector-based scripts. A browser agent reads each page and decides what to do, so it dismisses the popup, waits for the right state, and adapts when the layout shifts. For protected sites, Agent Identity gets the agent past anti-bot systems and CAPTCHAs. Use Agents for a fully autonomous run, or Stagehand when you want self-healing steps inside your own code.

Reach data behind logins and forms

When the data sits behind a login, a multi-step form, or a series of nested pages, there is no URL to fetch. A browser agent works through the flow the way a person would: it logs in, fills fields, advances steps, and opens the record. Pass dynamic inputs like URLs or instructions as variables so the agent fills them without exposing them inline. When the result is a file, the agent works with it in its sandbox and you retrieve it through Downloads. See managing files for the document workflow.

Extract data from JavaScript-heavy apps

Plenty of pages load their real content after the initial HTML, through XHR or POST calls fired by JavaScript. A plain HTTP fetch sees an empty shell. A real headless browser session executes that JavaScript, so the dynamic content renders and an Agent can read it. Reach for Fetch when a simple GET already returns what you need, and a browser when it does not.

Pull the same data on a schedule

When you need the same data repeatedly, such as monitoring prices or inventory, driving the full UI on every run is slow and expensive. Drive the page once in a browser and watch the network traffic through session observability to find the request that returns the data. Once you know that endpoint, replay it cheaply with the Fetch API for repeat pulls, no browser required.

Run deep research across the web

Research tasks combine discovery and reading. Use the Search API to find relevant pages without a browser, the Fetch API to pull page content cheaply for recon, and then hand off to a browser Agent for the pages that need interaction or structured extraction. This keeps token usage and latency low while still reaching the parts of the web that need a real browser.

Scale across hundreds of sites

Writing and maintaining one script per site stops scaling once you reach dozens of targets that each change on their own schedule. Create one reusable Agent with a systemPrompt and resultSchema and run it across hundreds of portals instead of maintaining hundreds of scripts. Deploy it with Functions for low-latency execution next to the browser, and scale across concurrent browser sessions on demand.

Agent Identity and trust

Different Agents need different levels of trust. Browserbase supports a layered identity model, so you can match the access level to your use case.
What your Agent needsHow to get it
Access Browserbase browsersAPI key: standard SDK authentication
Log into third-party sites1Password: secure credential access from vaults
Bypass bot detection on partner sitesWeb Bot Auth: Cloudflare Signed Agents
Prove it’s human-backed (permissionless)AgentKit: proof-of-humanity via Tools for Humanity on x402
The x402 integration pairs well with autonomous agents: pay with crypto, prove humanity with AgentKit, and get premium Verified browsers with residential proxies.

Agent Identity overview

Learn about every identity layer available to your agents

Next steps

Agents quickstart

Run your first browser agent with one API call

How it works

The execution loop, built-in tools, and run lifecycle

Stagehand

The SDK for browser agents

Agent Identity

Access any website without getting blocked

Functions

Deploy and run agents on Browserbase

Model Gateway

One API key, access to every model