<titledata-rh="true">@puppeteer/browsers | Puppeteer</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/browsers-api/"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docsearch:counter"content="2"><metadata-rh="true"property="og:title"content="@puppeteer/browsers | Puppeteer"><metadata-rh="true"name="description"content="Manage and launch browsers/drivers from a CLI or programmatically."><metadata-rh="true"property="og:description"content="Manage and launch browsers/drivers from a CLI or programmatically."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/browsers-api/"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/browsers-api/"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/browsers-api/"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://DVKY664LG7-dsn.algolia.net"crossorigin="anonymous"><linkrel="search"type="application/opensearchdescription+xml"title="Puppeteer"href="/opensearch.xml">
<p>Manage and launch browsers/drivers from a CLI or programmatically.</p>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="cli">CLI<ahref="#cli"class="hash-link"aria-label="Direct link to CLI"title="Direct link to CLI"></a></h2>
<p>CLI help will provide all documentation you need to use the CLI.</p>
<divclass="language-bash codeBlockContainer_Ckt0 theme-code-block"style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><divclass="codeBlockContent_biex"><pretabindex="0"class="prism-code language-bash codeBlock_bY9V thin-scrollbar"style="color:#393A34;background-color:#f6f8fa"><codeclass="codeBlockLines_e6Vv"><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token parameter variable"style="color:#36acaa">--help</span><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># help for all commands</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"></span><spanclass="token parameter variable"style="color:#36acaa">--help</span><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># help for the install command</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers launch </span><spanclass="token parameter variable"style="color:#36acaa">--help</span><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># help for the launch command</span><br></span></code></pre><divclass="buttonGroup__atx"><buttontype="button"aria-label="Copy code to clipboard"title="Copy"class="clean-btn"><spanclass="copyButtonIcons_eSgA"aria-hidden="true"><svgviewBox="0 0 24 24"class="copyButtonIcon_y97N"><pathfill="currentColor"d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svgviewBox="0 0 24 24"class="copyButtonSuccessIcon_LjdS"><pathfill="currentColor"d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="known-limitations">Known limitations<ahref="#known-limitations"class="hash-link"aria-label="Direct link to Known limitations"title="Direct link to Known limitations"></a></h2>
<ol>
<li>We support installing and running Firefox, Chrome and Chromium. The <code>latest</code>, <code>beta</code>, <code>dev</code>, <code>canary</code>, <code>stable</code> keywords are only supported for the install command. For the <code>launch</code> command you need to specify an exact build ID. The build ID is provided by the <code>install</code> command (see <code>npx @puppeteer/browsers install --help</code> for the format).</li>
<li>Launching the system browsers is only possible for Chrome/Chromium.</li>
</ol>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="api">API<ahref="#api"class="hash-link"aria-label="Direct link to API"title="Direct link to API"></a></h2>
<p>The programmatic API allows installing and launching browsers from your code. See the <code>test</code> folder for examples on how to use the <code>install</code>, <code>canInstall</code>, <code>launch</code>, <code>computeExecutablePath</code>, <code>computeSystemExecutablePath</code> and other methods.</p>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="classes">Classes<ahref="#classes"class="hash-link"aria-label="Direct link to Classes"title="Direct link to Classes"></a></h2>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="enumerations">Enumerations<ahref="#enumerations"class="hash-link"aria-label="Direct link to Enumerations"title="Direct link to Enumerations"></a></h2>
<table><thead><tr><th><p>Enumeration</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><p><ahref="/browsers-api/browsers.browser">Browser</a></p></td><td><p>Supported browsers.</p></td></tr><tr><td><p><ahref="/browsers-api/browsers.browserplatform">BrowserPlatform</a></p></td><td><p>Platform names used to identify a OS platform x architecture combination in the way that is relevant for the browser download.</p></td></tr><tr><td><p><ahref="/browsers-api/browsers.chromereleasechannel">ChromeReleaseChannel</a></p></td><td></td></tr></tbody></table>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="functions">Functions<ahref="#functions"class="hash-link"aria-label="Direct link to Functions"title="Direct link to Functions"></a></h2>
<table><thead><tr><th><p>Function</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><p><ahref="/browsers-api/browsers.candownload">canDownload(options)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.computeexecutablepath">computeExecutablePath(options)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.computesystemexecutablepath">computeSystemExecutablePath(options)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.createprofile">createProfile(browser, opts)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.detectbrowserplatform">detectBrowserPlatform()</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.getinstalledbrowsers">getInstalledBrowsers(options)</a></p></td><td><p>Returns metadata about browsers installed in the cache directory.</p></td></tr><tr><td><p><ahref="/browsers-api/browsers.getversioncomparator">getVersionComparator(browser)</a></p></td><td><p>Returns a version comparator for the given browser that can be used to sort browser versions.</p></td></tr><tr><td><p><ahref="/browsers-api/browsers.install">install(options)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.install_1">install(options)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.launch">launch(opts)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.makeprogresscallback">makeProgressCallback(browser, buildId)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.resolvebuildid">resolveBuildId(browser, platform, tag)</a></p></td><td></td></tr><tr><td><p><ahref="/browsers-api/browsers.uninstall">uninstall(options)</a></p></td><td></td></tr></tbody></table>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="interfaces">Interfaces<ahref="#interfaces"class="hash-link"aria-label="Direct link to Interfaces"title="Direct link to Interfaces"></a></h2>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="variables">Variables<ahref="#variables"class="hash-link"aria-label="Direct link to Variables"title="Direct link to Variables"></a></h2>