Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Nick:
Nicolas309bee59099f
diff --git a/apps/api/src/config.ts b/apps/api/src/config.tsindex 05da7bc8b..80656945e 100644--- a/apps/api/src/config.ts+++ b/apps/api/src/config.ts@@ -224,6 +224,7 @@ const configSchema = z.object({SANDBOX_POD_URL_TEMPLATE: z.string().optional(),SANDBOX_HEADLESS_SERVICE: z.string().optional(),CDP_PROXY_URL: z.string().default("ws://localhost:9222"),+ LIVE_VIEW_BASE_URL: z.string().optional(),NUQ_PREFETCH_WORKER_HEARTBEAT_URL: z.string().optional(),});diff --git a/apps/api/src/controllers/v2/browser.ts b/apps/api/src/controllers/v2/browser.tsindex 2acd7040b..a049a3f66 100644--- a/apps/api/src/controllers/v2/browser.ts+++ b/apps/api/src/controllers/v2/browser.ts@@ -27,7 +27,7 @@ import { RequestWithAuth } from "./types";const browserCreateRequestSchema = z.object({ttlTotal: z.number().min(30).max(3600).default(300),ttlWithoutActivity: z.number().min(10).max(3600).optional(),- streamWebView: z.boolean().default(false),+ streamWebView: z.boolean().default(true),});type BrowserCreateRequest = z.infer<typeof browserCreateRequestSchema>;@@ -36,6 +36,7 @@ interface BrowserCreateResponse {success: boolean;id?: string;cdpUrl?: string;+ liveViewUrl?: string;error?: string;}@@ -63,6 +64,7 @@ interface BrowserListResponse {id: string;status: string;cdpUrl: string;+ liveViewUrl: string;streamWebView: boolean;createdAt: string;lastActivity: string;@@ -293,16 +295,21 @@ page = await context.new_page()});}+ // Build the live view URL+ const liveViewUrl = `${config.LIVE_VIEW_BASE_URL}/${feBrowserId}`;+logger.info("Browser session created", {sessionId,browserId: feBrowserId,cdpUrl,+ liveViewUrl,});return res.status(200).json({success: true,id: sessionId,cdpUrl,+ liveViewUrl,});}@@ -472,6 +479,7 @@ export async function browserListController(id: r.id,status: r.status,cdpUrl: r.cdp_url,+ liveViewUrl: `${config.LIVE_VIEW_BASE_URL}/${r.browser_id}`,streamWebView: r.stream_web_view,createdAt: r.created_at,lastActivity: r.updated_at,diff --git a/apps/js-sdk/firecrawl/src/v2/types.ts b/apps/js-sdk/firecrawl/src/v2/types.tsindex fb8ccd833..709758b08 100644--- a/apps/js-sdk/firecrawl/src/v2/types.ts+++ b/apps/js-sdk/firecrawl/src/v2/types.ts@@ -689,6 +689,7 @@ export interface BrowserCreateResponse {success: boolean;id?: string;cdpUrl?: string;+ liveViewUrl?: string;error?: string;}@@ -707,6 +708,7 @@ export interface BrowserSession {id: string;status: string;cdpUrl: string;+ liveViewUrl: string;streamWebView: boolean;createdAt: string;lastActivity: string;diff --git a/apps/python-sdk/firecrawl/v2/methods/aio/browser.py b/apps/python-sdk/firecrawl/v2/methods/aio/browser.pyindex 26a468087..eb92ed4fd 100644--- a/apps/python-sdk/firecrawl/v2/methods/aio/browser.py+++ b/apps/python-sdk/firecrawl/v2/methods/aio/browser.py@@ -19,6 +19,8 @@ def _normalize_browser_create_response(payload: Dict[str, Any]) -> Dict[str, Anyout = dict(payload)if "cdpUrl" in out and "cdp_url" not in out:out["cdp_url"] = out["cdpUrl"]+ if "liveViewUrl" in out and "live_view_url" not in out:+ out["live_view_url"] = out["liveViewUrl"]return out@@ -30,6 +32,8 @@ def _normalize_browser_list_response(payload: Dict[str, Any]) -> Dict[str, Any]:ns = dict(s)if "cdpUrl" in ns and "cdp_url" not in ns:ns["cdp_url"] = ns["cdpUrl"]+ if "liveViewUrl" in ns and "live_view_url" not in ns:+ ns["live_view_url"] = ns["liveViewUrl"]if "streamWebView" in ns and "stream_web_view" not in ns:ns["stream_web_view"] = ns["streamWebView"]if "createdAt" in ns and "created_at" not in ns:diff --git a/apps/python-sdk/firecrawl/v2/methods/browser.py b/apps/python-sdk/firecrawl/v2/methods/browser.pyindex f76b85f81..ba945284e 100644--- a/apps/python-sdk/firecrawl/v2/methods/browser.py+++ b/apps/python-sdk/firecrawl/v2/methods/browser.py@@ -20,6 +20,8 @@ def _normalize_browser_create_response(payload: Dict[str, Any]) -> Dict[str, Anyout = dict(payload)if "cdpUrl" in out and "cdp_url" not in out:out["cdp_url"] = out["cdpUrl"]+ if "liveViewUrl" in out and "live_view_url" not in out:+ out["live_view_url"] = out["liveViewUrl"]return out@@ -31,6 +33,8 @@ def _normalize_browser_list_response(payload: Dict[str, Any]) -> Dict[str, Any]:ns = dict(s)if "cdpUrl" in ns and "cdp_url" not in ns:ns["cdp_url"] = ns["cdpUrl"]+ if "liveViewUrl" in ns and "live_view_url" not in ns:+ ns["live_view_url"] = ns["liveViewUrl"]if "streamWebView" in ns and "stream_web_view" not in ns:ns["stream_web_view"] = ns["streamWebView"]if "createdAt" in ns and "created_at" not in ns:diff --git a/apps/python-sdk/firecrawl/v2/types.py b/apps/python-sdk/firecrawl/v2/types.pyindex fcf34ab66..b05c6ddbd 100644--- a/apps/python-sdk/firecrawl/v2/types.py+++ b/apps/python-sdk/firecrawl/v2/types.py@@ -817,6 +817,7 @@ class BrowserCreateResponse(BaseModel):success: boolid: Optional[str] = Nonecdp_url: Optional[str] = None+ live_view_url: Optional[str] = Noneerror: Optional[str] = None@@ -841,6 +842,7 @@ class BrowserSession(BaseModel):id: strstatus: strcdp_url: str+ live_view_url: strstream_web_view: boolcreated_at: strlast_activity: str