[Skip to main content](#__docusaurus_skipToContent_fallback)

[![Crawlee](/img/crawlee-light.svg)![Crawlee](/img/crawlee-dark.svg)](https://crawlee.dev/index.md)

[![Crawlee JavaScript](/img/crawlee-javascript-light.svg)![Crawlee JavaScript](/img/crawlee-javascript-dark.svg)](https://crawlee.dev/js.md)[![Crawlee Python](/img/crawlee-python-light.svg)![Crawlee Python](/img/crawlee-python-dark.svg)](https://crawlee.dev/python)[![Crawlee](/img/crawlee-light.svg)![Crawlee](/img/crawlee-dark.svg)](https://crawlee.dev/index.md)

[JavaScript](https://crawlee.dev/js.md)[Python](https://crawlee.dev/python)[Blog](https://crawlee.dev/blog.md)

# Build reliable web scrapers. Fast.

Crawlee is a web scraping library for JavaScript and Python. It handles blocking, crawling, proxies, and browsers for you.

![Crawlee JavaScript](/img/crawlee-javascript-light.svg)![Crawlee JavaScript](/img/crawlee-javascript-dark.svg)

[Learn more](https://crawlee.dev/js.md)[Star](https://github.com/apify/crawlee)

`npx crawlee create my-crawler `

![Crawlee Python](/img/crawlee-python-light.svg)![Crawlee Python](/img/crawlee-python-dark.svg)

[Learn more](https://crawlee.dev/python)[Star](https://github.com/apify/crawlee-python)

`uvx 'crawlee[cli]' create my-crawler `

JavaScriptPython

[Run on](https://console.apify.com/actors/6i5QsHBMtm3hKph70?runConfig=eyJ1IjoiRWdQdHczb2VqNlRhRHQ1cW4iLCJ2IjoxfQ.eyJpbnB1dCI6IntcbiAgICBcImNvZGVcIjogXCJpbXBvcnQgeyBQbGF5d3JpZ2h0Q3Jhd2xlciB9IGZyb20gJ2NyYXdsZWUnO1xcblxcbi8vIENyYXdsZXIgc2V0dXAgZnJvbSB0aGUgcHJldmlvdXMgZXhhbXBsZS5cXG5jb25zdCBjcmF3bGVyID0gbmV3IFBsYXl3cmlnaHRDcmF3bGVyKHtcXG4gICAgLy8gVXNlIHRoZSByZXF1ZXN0SGFuZGxlciB0byBwcm9jZXNzIGVhY2ggb2YgdGhlIGNyYXdsZWQgcGFnZXMuXF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sZSBmaWxlIGluXFxuLy8gLi9zdG9yYWdlL2tleV92YWx1ZV9zdG9yZXMvcmVzdWx0LmNzdlxcbmNvbnN0IGRhdGFzZXQgPSBhd2FpdCBjcmF3bGVyLmdldERhdGFzZXQoKTtcXG5hd2FpdCBkYXRhc2V0LmV4cG9ydFRvQ1NWKCdyZXN1bHQnKTtcXG5cXG4vLyBPciB3b3JrIHdpdGggdGhlIGRhdGEgZGlyZWN0bHkuXFxuY29uc3QgZGF0YSA9IGF3YWl0IGNyYXdsZXIuZ2V0RGF0YSgpO1xcbmNvbnNvbGUudGFibGUoZGF0YS5pdGVtcyk7XFxuXCJcbn0iLCJvcHRpb25zIjp7ImNvbnRlbnRUeXBlIjoiYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOCIsIm1lbW9yeSI6NDA5Nn19.WKB14SjgTceKYyhONw2oXTkiOao6X4-UAS7cIuwqGvo\&asrc=run_on_apify)

```
import { PlaywrightCrawler } from 'crawlee';



// PlaywrightCrawler crawls the web using a headless browser controlled by the Playwright library.

const crawler = new PlaywrightCrawler({

    // Use the requestHandler to process each of the crawled pages.

    async requestHandler({ request, page, enqueueLinks, pushData, log }) {

        const title = await page.title();

        log.info(`Title of ${request.loadedUrl} is '${title}'`);



        // Save results as JSON to `./storage/datasets/default` directory.

        await pushData({ title, url: request.loadedUrl });



        // Extract links from the current page and add them to the crawling queue.

        await enqueueLinks();

    },



    // Uncomment this option to see the browser window.

    // headless: false,



    // Comment this option to scrape the full website.

    maxRequestsPerCrawl: 20,

});



// Add first URL to the queue and start the crawl.

await crawler.run(['https://crawlee.dev']);



// Export the whole dataset to a single file in `./result.csv`.

await crawler.exportData('./result.csv');



// Or work with the data directly.

const data = await crawler.getData();

console.table(data.items);
```

Or start with a template from our CLI

`$npx crawlee create my-crawler`

Built with 🤍 by Apify. Forever free and open-source.

## Get started now!

Crawlee won’t fix broken selectors for you (yet), but it makes building and maintaining reliable crawlers faster and easier—so you can focus on what matters most.

[Get started with JS](https://crawlee.dev/js.md)[Get started with Python](https://crawlee.dev/python)

[![Docusaurus themed image](/img/crawlee-light.svg)![Docusaurus themed image](/img/crawlee-dark.svg)](https://crawlee.dev/index.md)

Docs

* [Guides](https://crawlee.dev/js/docs/guides.md)
* [Examples](https://crawlee.dev/js/docs/examples.md)
* [API reference](https://crawlee.dev/js/api/core.md)
* [Changelog](https://crawlee.dev/js/api/core/changelog.md)

Product

* [Discord](https://discord.com/invite/jyEM2PRvMU)
* [Stack Overflow](https://stackoverflow.com/questions/tagged/crawlee)
* [Twitter](https://twitter.com/apify)
* [YouTube](https://www.youtube.com/apify)

More

* [Apify platform](https://apify.com)
* [Docusaurus](https://docusaurus.io)
* [GitHub](https://github.com/apify/crawlee)

Crawlee is forever free and open source

©

<!-- -->

2026

<!-- -->

Apify
