<titledata-rh="true">Installation | 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/guides/installation"><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="Installation | Puppeteer"><metadata-rh="true"name="description"content="To use Puppeteer in your project, run:"><metadata-rh="true"property="og:description"content="To use Puppeteer in your project, run:"><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/guides/installation"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/guides/installation"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/guides/installation"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">
<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 function"style="color:#d73a49">npm</span><spanclass="token plain"> i puppeteer</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># or using yarn</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token function"style="color:#d73a49">yarn</span><spanclass="token plain"></span><spanclass="token function"style="color:#d73a49">add</span><spanclass="token plain"> puppeteer</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># or using pnpm</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token function"style="color:#d73a49">pnpm</span><spanclass="token plain"> i puppeteer</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>
<p>When you install Puppeteer, it automatically downloads a recent version of
<ahref="https://developer.chrome.com/blog/chrome-for-testing/"target="_blank"rel="noopener noreferrer">Chrome for Testing</a> (~170MB macOS, ~282MB Linux, ~280MB Windows) and a <code>chrome-headless-shell</code> binary (starting with Puppeteer v21.6.0) that is <ahref="https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy"target="_blank"rel="noopener noreferrer">guaranteed to
work</a>
with Puppeteer. The browser is downloaded to the <code>$HOME/.cache/puppeteer</code> folder
by default (starting with Puppeteer v19.0.0). See <ahref="https://pptr.dev/api/puppeteer.configuration"target="_blank"rel="noopener noreferrer">configuration</a> for configuration options and environmental variables to control the download behavior.</p>
<p>For every release since v1.7.0 we publish two packages:</p>