Embed a real-time browser view in your app using the streaming URL
Every TinyFish automation provides a streaming_url, a live feed of the browser as it runs. Drop it in an iframe to show users what’s happening in real time.You’ll see our little fish swimming through the web for you, navigating pages, clicking buttons, and extracting data while you watch.
Start an automation, listen for the STREAMING_URL event in the SSE stream, and set it as the iframe source to display the live browser.
import { TinyFish, EventType } from "@tiny-fish/sdk";const client = new TinyFish();const stream = await client.agent.stream( { url: "https://example.com/products", goal: "Extract all product names and prices", }, { onStreamingUrl: (event) => { // Set iframe src to show the live browser const iframe = document.getElementById("preview"); if (iframe) { iframe.setAttribute("src", event.streaming_url); } }, },);for await (const event of stream) { if (event.type === EventType.COMPLETE) { console.log("Result:", event.result); }}
from tinyfish import TinyFish, StreamingUrlEventclient = TinyFish()with client.agent.stream( url="https://example.com/products", goal="Extract all product names and prices",) as stream: for event in stream: if isinstance(event, StreamingUrlEvent): # Use this URL in an iframe to show the live browser print("Embed this:", event.streaming_url) break
Keep your API key server-side. Call the SSE endpoint from your backend and pass the streaming_url to the frontend. The streaming URL itself is safe to expose to the browser.
Show a loading state. The streaming URL arrives a few seconds after the automation starts, so show a spinner or placeholder until then.
The iframe is read-only. Users can watch but can’t interact with the browser session.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TinyFish","colors":{"primary":"#D74B28","light":"#D74B28","dark":"#D74B28"},"logo":{"light":"https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/logo/TF_Horizontal.svg?fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=3ff7a57ebbe744005f4f984e986f16b9","dark":"https://mintcdn.com/tinyfish/VrMSbq950IKhOmzd/logo/dark.svg?fit=max\u0026auto=format\u0026n=VrMSbq950IKhOmzd\u0026q=85\u0026s=78303ae67f6f601a47cdfd79f978f941","href":"https://agent.tinyfish.ai"},"favicon":"https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/logo/TF_ICON.svg?fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=9151d20cf17b84686c03e299a8997a32","navbar":{"primary":{"type":"button","label":"Get API Key","href":"https://agent.tinyfish.ai/api-keys"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/tinyfish-ai","x":"https://x.com/Tiny_Fish","discord":"https://discord.gg/tinyfish","youtube":"https://www.youtube.com/@TinyFish-AI"}},"integrations":{"ga4":{"measurementId":"G-P52K96QP6R"},"posthog":{"apiKey":"phc_NJaHVgJntoRghYPq3Q92cniMBBbLRh4cE2S5xX1XVyL"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tinyfish","hasAudioNarration":false,"actualSubdomain":"tinyfish","customDomains":["docs.tinyfish.ai"],"gitSource":{"type":"github","owner":"tinyfish-io","repo":"ux-labs","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae564f117d5a8dc0716df10","collectionId":"43dcf051-c3cb-4172-8423-b92056d812fe","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae564f117d5a8dc0716df10"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae564f117d5a8dc0716df10","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":84},{"language":"default","tag":"Documentation","count":54},{"language":"default","tag":"Agent \u0026 Runs","count":28},{"language":"default","tag":"Browser Context Profiles","count":10},{"language":"default","tag":"Datasets","count":9},{"language":"default","tag":"Agent API","count":8},{"language":"default","tag":"Tools \u0026 Integrations","count":8},{"language":"default","tag":"Monitor","count":8},{"language":"default","tag":"Capabilities","count":7},{"language":"default","tag":"Runs","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"live-preview","slug":"/live-preview","pageMetadata":{"title":"Live Browser Preview","description":"Embed a real-time browser view in your app using the streaming URL","href":"/live-preview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Embed a real-time browser view in your app using the streaming URL\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every TinyFish automation provides a `,_jsx(_components.code,{children:`streaming_url`}),`, a live feed of the browser as it runs. Drop it in an iframe to show users what’s happening in real time.`]}),`\n`,_jsx(_components.p,{children:`You’ll see our little fish swimming through the web for you, navigating pages, clicking buttons, and extracting data while you watch.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=1f25a1245fc4a3a2ade7d386672a699e`,alt:`TinyFish live browser preview showing the fish navigating a webpage`,style:{maxWidth:`500px`,display:`block`,margin:`0 auto`},\"data-og-width\":`1760`,width:`1760`,\"data-og-height\":`1148`,height:`1148`,\"data-path\":`images/live-preview/live-preview.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=280\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=0df5abccde9deb07cec967d9c81d5f79 280w, https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=560\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=07e5dd07f172b1ac35efcd5eed9f5ba3 560w, https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=840\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=b7b2e527c9c754f580fe595c1f4113ec 840w, https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=1100\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=bd29cc460d8d26a93437cbe5a8f43871 1100w, https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=1650\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=ec6659446fe89a9e2dfd0bff16640ff7 1650w, https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/images/live-preview/live-preview.png?w=2500\u0026fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=f014efa7e0b154569e400c9ccd053e9b 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`getting-the-streaming-url`,children:`Getting the Streaming URL`}),`\n`,_jsxs(_components.p,{children:[`When you use the `,_jsx(_components.a,{href:`/key-concepts/endpoints#streaming-run-sse`,children:`SSE endpoint`}),`, one of the events you’ll receive is `,_jsx(_components.code,{children:`STREAMING_URL`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STREAMING_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"run_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"streaming_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://tf-abc123.fra0-tinyfish.unikraft.app/stream/0\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The streaming URL may become unavailable after the run completes. To preserve run recordings, capture the stream content during execution.`})}),`\n`,_jsx(Heading,{level:`2`,id:`embedding-it`,children:`Embedding It`}),`\n`,_jsx(_components.p,{children:`Once you have the URL, embed it in an iframe:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"preview\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_STREAMING_URL\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` width`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100%\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"600\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` style`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"border: 1px solid #e5e7eb; border-radius: 8px;\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For a responsive container that maintains a 16:9 aspect ratio:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` style`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_STREAMING_URL\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` style`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 8px;\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` >\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`full-example`,children:`Full Example`}),`\n`,_jsxs(_components.p,{children:[`Start an automation, listen for the `,_jsx(_components.code,{children:`STREAMING_URL`}),` event in the SSE stream, and set it as the iframe source to display the live browser.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`25`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TinyFish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`EventType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@tiny-fish/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TinyFish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`agent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` goal:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Extract all product names and prices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onStreamingUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Set iframe src to show the live browser`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` iframe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setAttribute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"src\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`streaming_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` EventType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`COMPLETE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Result:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tinyfish `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TinyFish, StreamingUrlEvent`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TinyFish()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.agent.stream(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` goal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Extract all product names and prices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` isinstance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(event, StreamingUrlEvent):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Use this URL in an iframe to show the live browser`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Embed this:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, event.streaming_url)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`tips`,children:`Tips`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep your API key server-side.`}),` Call the SSE endpoint from your backend and pass the `,_jsx(_components.code,{children:`streaming_url`}),` to the frontend. The streaming URL itself is safe to expose to the browser.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Show a loading state.`}),` The streaming URL arrives a few seconds after the automation starts, so show a spinner or placeholder until then.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The iframe is read-only.`}),` Users can watch but can’t interact with the browser session.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Live Browser Preview","description":"Embed a real-time browser view in your app using the streaming URL","href":"/live-preview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Getting the Streaming URL","slug":"getting-the-streaming-url","depth":2,"children":[]},{"title":"Embedding It","slug":"embedding-it","depth":2,"children":[]},{"title":"Full Example","slug":"full-example","depth":2,"children":[]},{"title":"Tips","slug":"tips","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"tinyfish","siteName":"TinyFish","title":"Live Browser Preview - TinyFish","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-16T00:25:37.262Z","originalFileLocation":"live-preview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Embed a real-time browser view in your app using the streaming URL\">\u003cmeta data-mint-head name=\"application-name\" content=\"TinyFish\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Live Browser Preview - TinyFish\">\u003cmeta data-mint-head property=\"og:description\" content=\"Embed a real-time browser view in your app using the streaming URL\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TinyFish\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tinyfish.ai/live-preview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tinyfish.mintlify.app/_mintlify/api/og/v2?division=Capabilities\u0026amp;title=Live+Browser+Preview\u0026amp;description=Embed+a+real-time+browser+view+in+your+app+using+the+streaming+URL\u0026amp;theme=619f6727a66ef17f9efad127\u0026amp;signature=f88027074d9b1d9429dab1423b41d59656ce4fb643f6eb76528a4f34d27969dc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Live Browser Preview - TinyFish\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Embed a real-time browser view in your app using the streaming URL\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tinyfish.mintlify.app/_mintlify/api/og/v2?division=Capabilities\u0026amp;title=Live+Browser+Preview\u0026amp;description=Embed+a+real-time+browser+view+in+your+app+using+the+streaming+URL\u0026amp;theme=619f6727a66ef17f9efad127\u0026amp;signature=f88027074d9b1d9429dab1423b41d59656ce4fb643f6eb76528a4f34d27969dc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/tinyfish/05k5zsm6ySkMI6wO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TinyFish\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#D74B28\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tinyfish.ai/live-preview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/live-preview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tinyfish.ai/#organization\",\"name\":\"TinyFish\",\"url\":\"https://docs.tinyfish.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tinyfish/SAWuKzAHuR-ZMRAB/logo/TF_Horizontal.svg?fit=max\u0026auto=format\u0026n=SAWuKzAHuR-ZMRAB\u0026q=85\u0026s=3ff7a57ebbe744005f4f984e986f16b9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tinyfish.ai#website\",\"name\":\"TinyFish\",\"url\":\"https://docs.tinyfish.ai\",\"publisher\":{\"@id\":\"https://docs.tinyfish.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tinyfish.ai/live-preview#webpage\",\"url\":\"https://docs.tinyfish.ai/live-preview\",\"name\":\"Live Browser Preview\",\"description\":\"Embed a real-time browser view in your app using the streaming URL\",\"dateModified\":\"2026-04-16T00:25:37.262Z\",\"isPartOf\":{\"@id\":\"https://docs.tinyfish.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tinyfish.ai/live-preview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tinyfish.ai/live-preview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Capabilities\",\"item\":\"https://docs.tinyfish.ai/vault-setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Live Browser Preview\",\"item\":\"https://docs.tinyfish.ai/live-preview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.tinyfish.ai/live-preview#article\",\"headline\":\"Live Browser Preview\",\"name\":\"Live Browser Preview\",\"description\":\"Embed a real-time browser view in your app using the streaming URL\",\"url\":\"https://docs.tinyfish.ai/live-preview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tinyfish.ai/live-preview#webpage\"},\"dateModified\":\"2026-04-16T00:25:37.262Z\",\"publisher\":{\"@id\":\"https://docs.tinyfish.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tinyfish.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TinyFish\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"TinyFish","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Start Here","icon":"rocket","pages":[{"title":"TinyFish Developer Documentation","sidebarTitle":"Overview","href":""},{"title":"Quick Start","sidebarTitle":"Quickstart","mode":"wide","href":"/quick-start"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/authentication"},{"title":"For Coding Agents","sidebarTitle":"For coding agents","href":"/for-coding-agents"}]},{"group":"Agent API","icon":"sparkles","pages":[{"title":"Agent API","sidebarTitle":"Overview","href":"/agent-api/index"},{"title":"Agent API Reference","sidebarTitle":"Reference","href":"/agent-api/reference"},{"title":"Browser Context Profiles API","sidebarTitle":"Browser Context Profiles","href":"/agent-api/browser-context-profiles"},{"title":"Agent Endpoints","href":"/key-concepts/endpoints"},{"title":"Runs","href":"/key-concepts/runs"},{"title":"The Goal Parameter","href":"/key-concepts/goals"},{"title":"Structured Output","sidebarTitle":"Structured Output","href":"/key-concepts/structured-output"},{"title":"Goal Prompting Guide","href":"/prompting-guide"}]},{"group":"Search API","icon":"magnifying-glass","pages":[{"title":"Search API","sidebarTitle":"Overview","href":"/search-api/index"},{"title":"Search API Reference","sidebarTitle":"Reference","href":"/search-api/reference"},{"title":"Search Examples","sidebarTitle":"Examples","href":"/search-api/examples"}]},{"group":"Monitor","icon":"eye","pages":[{"title":"Monitor","sidebarTitle":"Overview","href":"/monitor/index"},{"title":"Monitor API Reference","sidebarTitle":"API Reference","href":"/monitor/api-reference"}]},{"group":"Fetch API","icon":"bolt","pages":[{"title":"Fetch API","sidebarTitle":"Overview","href":"/fetch-api/index"},{"title":"Fetch API Reference","sidebarTitle":"Reference","href":"/fetch-api/reference"},{"title":"Fetch Examples","sidebarTitle":"Examples","href":"/fetch-api/examples"}]},{"group":"Browser API","icon":"browser","pages":[{"title":"Browser API","sidebarTitle":"Overview","href":"/browser-api/index"},{"title":"Browser API Reference","sidebarTitle":"Reference","href":"/browser-api/reference"},{"title":"Browser Examples","sidebarTitle":"Examples","href":"/browser-api/examples"}]},{"group":"Research API","icon":"telescope","pages":[{"title":"Research API","sidebarTitle":"Overview","href":"/research-api/index"},{"title":"Research API Reference","sidebarTitle":"Reference","href":"/research-api/reference"},{"title":"Research Examples","sidebarTitle":"Examples","href":"/research-api/examples"}]},{"group":"Datasets API","icon":"table","pages":[{"title":"Datasets API","sidebarTitle":"Overview","href":"/datasets/index"},{"title":"Build Your First Dataset","sidebarTitle":"Guide","href":"/datasets/guide"},{"title":"Datasets API Reference","sidebarTitle":"Reference","href":"/datasets/reference"}]},{"group":"Capabilities","icon":"wand-magic-sparkles","pages":[{"group":"Vault \u0026 Credentials","icon":"lock","pages":[{"title":"Connect Your Vault","href":"/vault-setup"},{"title":"Vault Credentials","href":"/key-concepts/credentials"}]},{"title":"Browser Context Profiles","sidebarTitle":"Browser Context Profiles","href":"/key-concepts/browser-context-profiles"},{"title":"Browser Profiles","href":"/key-concepts/browser-profiles"},{"title":"Proxies","href":"/key-concepts/proxies"},{"title":"Organizations","description":"Use TinyFish as a team: one bill, your own login and keys, admin controls and single sign-on","href":"/key-concepts/organizations"},{"title":"Live Browser Preview","href":"/live-preview"}]},{"group":"Tools \u0026 Integrations","icon":"puzzle-piece","pages":[{"title":"Build with AI","sidebarTitle":"Build with AI","description":"Give your AI coding assistant context on TinyFish Web Agent","href":"/using-with-ai"},{"title":"Plugins","href":"/plugins/index"},{"title":"CLI","href":"/cli/index"},{"title":"CLI Commands","href":"/cli/commands"},{"title":"MCP Integration","href":"/mcp-integration/index"},{"title":"n8n","href":"/integrations/n8n"},{"title":"Dify","href":"/integrations/dify"},{"title":"Fireworks AI","href":"/integrations/fireworks"}]},{"group":"Guides","icon":"book","pages":[{"title":"Common Patterns","href":"/common-patterns"},{"title":"Anti-Bot Guide","href":"/anti-bot-guide"},{"title":"Webhooks","href":"/webhooks"},{"title":"Agent Payments","sidebarTitle":"Agent Payments","href":"/agent-payments"}]},{"group":"Use Cases","icon":"code","pages":[{"title":"Web Scraping","href":"/examples/scraping"},{"title":"Form Filling","href":"/examples/form-filling"},{"title":"Concurrent Requests","href":"/examples/bulk-requests-sync"},{"title":"Async Bulk Requests","href":"/examples/bulk-requests-async"}]},{"group":"Reference","icon":"circle-question","pages":[{"title":"Error Codes","href":"/error-codes"},{"title":"Frequently Asked Questions","href":"/faq"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/automation/run-browser-automation-with-sse-streaming"}]},{"tab":"Cookbook","icon":"utensils","href":"https://github.com/tinyfish-io/tinyfish-cookbook"}]},"basePath":"","title":"Live Browser Preview - TinyFish","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BG6oD64b.js","lightbox-handle-r17bVUz3.js"]}