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
The session ID returned from the create browser session endpoint
Response
Status of the operation (always βendedβ on success)
The session ID that was ended
How It Works
- Cancel Navigation - Cancels any in-progress background navigation task
- Release Session - Sends release request to Browserbase API
- 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