Skip to main content
DELETE
https://searchcompany-main.up.railway.app
/
api
/
browser-session
/
{session_id}
curl -X DELETE "https://searchcompany-main.up.railway.app/api/browser-session/abc123-def456-ghi789"
{
  "status": "ended",
  "session_id": "abc123-def456-ghi789"
}
Public endpoint to clean up browser sessions when the user closes the ranking flow modal or navigates away.
This is a public endpoint - no authentication required. Used on the searchcompany.ai landing page ranking flow.

Path Parameters

session_id
string
required
The session ID returned from the create browser session endpoint

Response

status
string
Status of the operation (always β€œended” on success)
session_id
string
The session ID that was ended

How It Works

  1. Cancel Navigation - Cancels any in-progress background navigation task
  2. Release Session - Sends release request to Browserbase API
  3. Clear Cache - Removes session from internal cache
curl -X DELETE "https://searchcompany-main.up.railway.app/api/browser-session/abc123-def456-ghi789"
{
  "status": "ended",
  "session_id": "abc123-def456-ghi789"
}

Usage on Landing Page

// Clean up when modal closes
useEffect(() => {
  return () => {
    if (sessionId) {
      endBrowserSession(sessionId);
    }
  };
}, [sessionId]);

Rate Limiting

  • 10 requests/minute per IP address