Public endpoint used on the marketing website to show a live browser scanning animation. Uses Browserbase API with Playwright for fast, reliable browser sessions.
This is a public endpoint - no authentication required. Used on the
searchcompany.ai landing page ranking flow.
Request Body
Website URL to navigate to. If omitted, creates a pre-warmed session without navigation.
region
string
default: "us-west-2"
Browserbase region for the session. Valid values: us-west-2, us-east-1, eu-central-1, ap-southeast-1
Optional custom viewport dimensions Viewport height in pixels
If provided, navigates an existing session instead of creating a new one
Response
Unique identifier for the browser session
URL to embed the live browser view (iframe-compatible)
How It Works
Pre-warm (no URL) - Creates a new Browserbase session and returns immediately
Navigate (with URL) - Navigates an existing session to the URL in the background
Session Reuse - Sessions are cached per client IP + viewport for 5 minutes
The endpoint supports a two-phase flow:
First call without URL to pre-warm the session (fast)
Second call with URL and session_id to start navigation
Pre-warm Session
Navigate Session
curl -X POST "https://searchcompany-main.up.railway.app/api/browser-session" \
-H "Content-Type: application/json" \
-d '{
"region": "us-west-2",
"viewport": {"width": 1280, "height": 720}
}'
{
"session_id" : "abc123-def456-ghi789" ,
"live_url" : "https://www.browserbase.com/devtools-fullscreen/abc123?navbar=false"
}
Usage on Landing Page
// 1. Pre-warm session when user starts typing
const { session_id , live_url } = await createBrowserSession (
undefined , // no URL yet
{ width: 1280 , height: 720 }
);
// 2. Show live_url in iframe immediately
iframeRef . src = live_url ;
// 3. Navigate when user submits URL
await createBrowserSession ( userUrl , undefined , session_id );
Rate Limiting
60 requests/minute per IP address