Before You Start
Get your API key
Create a key at agent.tinyfish.ai/api-keys.
X-API-Key header. See Authentication for the full setup and troubleshooting guide.
Your First Request
What Success Looks Like
cdp_url:
Pass
cdp_url (the WebSocket URL) to connect_over_cdp. Do not use base_url — it is for polling session status via /pages, not for Playwright connections.When to Use Browser vs the Other APIs
- Use Browser when you want direct Playwright or CDP control.
- Use Agent when TinyFish should decide the browser actions from a goal.
- Use Fetch when you only need extracted content from one or more URLs.
- Use Search when you need ranked search results, not a browser session.
Session Lifecycle
| Behavior | Details |
|---|---|
| Startup navigation | If url was provided at session creation, the browser navigates there immediately. The 201 response is returned before navigation completes — the page may still be loading when you connect. |
| Inactivity timeout | Sessions automatically terminate after 1 hour of inactivity. A session is considered inactive when no CDP commands are being sent. |
| No explicit delete | There is no endpoint to delete a session. Sessions are cleaned up automatically when the inactivity timeout elapses. |
| Session isolation | Each session is a fully isolated browser instance. No cookies, storage, or state is shared between sessions. |
Read Next
API Reference
Request and response schema
Authentication
API key setup
Browser Profiles
Configure browser behavior for automation runs
Key Concepts
Understand when to use Agent vs Browser
For coding agents
One page that routes an agent to the right TinyFish API