/interact to start taking actions in that page: click buttons, fill forms, extract dynamic content, or navigate deeper. Just describe what you want, or write code if you need full control.
AI prompts
Describe what action you want to take in the page
Code execution
Interact via code execution securely with playwright, agent-browser
Live view
Watch or interact with the browser in real time via embeddable stream
How It Works
- Scrape a URL with
POST /v2/scrape. The response includes ascrapeIdindata.metadata.scrapeId. If you want persistent browser state, passprofileon this request. - Interact by calling
POST /v2/scrape/{scrapeId}/interactwith apromptor with playwrightcode. Do not passprofilehere; the interact session inherits the profile from the scrape job. - Stop the session with
DELETE /v2/scrape/{scrapeId}/interactwhen you’re done. For writable profiles, changes are saved when the session stops.
Quick Start
Scrape a page, interact with it, and stop the session:Response
Interact via prompting
The simplest way to interact with a page. Describe what you want in natural language and it will click, type, scroll, and extract data automatically.output field with the agent’s answer:
Response
Keep Prompts Small and Focused
Prompts work best when each one is a single, clear task. Instead of asking the agent to do a complex multi-step workflow in one shot, break it into separate interact calls. Each call reuses the same browser session, so state carries over between them.Running Code
For full control, you can execute code directly in the browser sandbox. Thepage variable (a Playwright Page object) is available in Node.js and Python. Bash mode has agent-browser pre-installed. You can also take screenshots within the session: use (await page.screenshot()).toString("base64") in Node.js, await page.screenshot(path="/tmp/screenshot.png") in Python, or agent-browser screenshot in Bash.
Node.js (Playwright)
The default language. Write Playwright code directly.page is already connected to the browser.
Python
Setlanguage to "python" for Playwright’s Python API.
Bash (agent-browser)
agent-browser is a CLI pre-installed in the sandbox with 60+ commands. It provides an accessibility tree with element refs (@e1, @e2, …), which is ideal for LLM-driven automation.
Live View
Every interact response returns aliveViewUrl that you can embed to watch the browser in real time. Useful for debugging, demos, or building browser-powered UIs.
Response
Interactive Live View
The response also includes aninteractiveLiveViewUrl. Unlike the standard live view which is view-only, the interactive live view allows users to click, type, and interact with the browser session directly through the embedded stream. This is useful for building user-facing browser UIs, such as login flows or guided workflows where end users need to control the browser.
CDP URL
Every interact response also returns acdpUrl: the raw Chrome DevTools Protocol (CDP) WebSocket URL for the browser session. Use it to connect to the live session directly from Playwright, Puppeteer, or any CDP client and drive the browser with your own code.
Session Lifecycle
Creation
The firstPOST /v2/scrape/{scrapeId}/interact continues the scrape session and starts the interaction.
Reuse
Subsequent interact calls on the samescrapeId reuse the existing session. The browser stays open and maintains its state between calls, so you can chain multiple interactions:
Cleanup
Stop the session explicitly when done:Persistent Profiles with Scrape + Interact
By default, each scrape + interact session starts with a clean browser. Withprofile, you can save and reuse browser state (cookies, localStorage, sessions) across scrapes. This is useful for staying logged in and preserving preferences.
Pass the profile object to the initial POST /v2/scrape request. Do not pass profile to POST /v2/scrape/{scrapeId}/interact; the interact session reuses the scrape job’s browser session and profile settings. Stop the interact session with DELETE /v2/scrape/{scrapeId}/interact so writable profile changes can be saved.
cURL
- Create the scrape with
profile.nameandsaveChanges: true. - Run prompt or code interactions against the returned
scrapeId. - Stop the session to save cookies, localStorage, and other browser state.
- Start a later scrape with the same
profile.name. UsesaveChanges: falsewhen you only want to read existing state without writing changes back.
Only one session can save to a profile at a time. If another session is already saving, you’ll get a
409 error. You can still open the same profile with saveChanges: false, or try again later.Validate Persistence
You can test persistence without relying on a real login flow by writing a localStorage value in one session, stopping it, then reading the value in a second session with the same profile.cURL
localStorage as "saved" and cookie as true.
Profiles created through the API may not appear in Dashboard > Interact > Profiles yet. The dashboard currently does not provide a complete inventory of API-created persistent profiles.
When to Use What
Interact vs Browser Sandbox: Interact is built on the same infrastructure as Browser Sandbox but provides a better interface for the most common pattern: scrape a page, then go deeper. Browser Sandbox is better when you need a standalone browser session that isn’t tied to a specific scrape.
Pricing
- Code-only (no
prompt): 2 credits per session minute - With AI prompts: 7 credits per session minute
- Scrape: billed separately (1 credit per scrape, plus any format-specific costs)
API Reference
- Execute Interact:
POST /v2/scrape/{scrapeId}/interact - Stop Interact:
DELETE /v2/scrape/{scrapeId}/interact
Request Body (POST)
Response
Have feedback or need help? Email [email protected] or reach out on Discord.

