Crawlee

25.9k GitHub starsapify/crawlee

Build web crawlers that keep going when things go wrong. Reads simple pages quickly and opens a real browser only when a page needs one.

View on GitHub

Build a stack with Crawlee

Pick parts from it and the projects that work well with it. We check the licences together and write a prompt for your AI.

Crawlee
Playwright
Crawl4AI

Your stack

Tick the parts you want to use. Projects whose parts are not listed yet can be added whole; the prompt tells your AI to find the right pieces in their code.

Website (opens in a new tab)
More actions

Why we picked it

Writing a crawler that works once is easy. Keeping one running across thousands of pages, when sites are slow, fail or push back, is the hard part, and that's what Crawlee does for you. It keeps a to-do list of pages, tries again when one fails, and picks up where it left off after a crash. It reads simple pages quickly and opens a real browser only when a page needs it. It's free, works in JavaScript and Python, and is looked after by Apify, a company that runs crawlers for a living.

About Crawlee

A crawler is a program that visits web pages, follows their links and collects what it finds. The basic idea is simple. The trouble starts at scale: pages time out, sites block you, the program crashes halfway through and you have to start again. Crawlee handles all of that for you. You write the part that says what to collect from each page, and Crawlee takes care of visiting the pages reliably.

What it can do

  • Fast when it can, a browser when it must. Simple pages are read directly, which is quick and cheap. Pages that only show their content in a browser can be opened in a real one. You can switch between the two without rewriting your crawler.
  • Never lose your place. It keeps a list of pages to visit, tries again when one fails, and can carry on after a crash instead of starting from scratch.
  • Uses your computer sensibly. It speeds up or slows down depending on how much power your machine has spare.
  • Built to run for a long time. It can spread its visits across different networks and behave more like a normal visitor, so long crawls are less likely to be cut off.
  • Saves as it goes. Results are stored as they're collected and can be exported as common file types (JSON or CSV).
  • JavaScript or Python. There's a version for each, built on the same ideas.

Crawl4AI, Scrapy or Crawlee?

All three are free tools that visit websites and collect what's on them, but each one is built for a different job.

Best forTurning websites into text for an AI

Opens every page in a real browser and hands back clean, readable text, ready for a chatbot or AI assistant. The easiest start if you want your AI to read websites.

Language
Python
Opens a browser
On every page
Computer power
High

Best forCollecting lots of data, fast

Reads pages directly without a browser, so it's the quickest and lightest of the three, and the most mature. Best for large sites where the information is already in the page, like shops and directories.

Language
Python
Opens a browser
Only with an add-on
Computer power
Low
CrawleeThis page

Best forCrawls that have to keep going

Reads simple pages directly and switches to a real browser only where it has to. Built to keep going through errors, crashes and sites that push back, so it suits long runs.

Language
JavaScript or Python
Opens a browser
Only where needed
Computer power
Low to high

A quick way to choose: want your AI to read the web? Start with Crawl4AI. Collecting structured data from big, simple sites? Scrapy. Need a crawler that holds up over a long run, or you work in JavaScript? Crawlee. They also combine well: many projects use Crawlee or Scrapy to find and fetch pages, then Crawl4AI to turn them into text for AI.

Good to know

  • It's a toolkit for programmers, not an app. You'll write some JavaScript or Python.
  • It runs on your own computer or server. Apify also offers a paid cloud to run it for you, but you don't need it.
  • Being built to keep going doesn't mean you're allowed to. Follow each site's rules (its robots.txt file) and terms of use, and crawl at a polite pace.
  • Licence: Apache 2.0. You can use it for free, including in paid products.

What you can build with it

  • Collecting information from sites that only load their content in a browser
  • Long-running crawls of large sites that need to survive errors and restarts
  • Gathering web pages to feed an AI assistant or build a dataset
  • Keeping track of prices, stock or listings across many shops
  • Adding web data collection to an existing JavaScript or Python project

Building blocks

Crawlee is made of parts you can use on their own in your project. Copy a prompt to have your AI assistant add one for you, and see the licence card for what you may do with them.

  • Crawlers for Node.js

    Free to use, even in closed products

    The Crawlee library for JavaScript and TypeScript: HTTP crawlers, Playwright and Puppeteer crawlers, a request queue, retries and storage in one package.

    Use it to build

    • Node.js scraping projects
    • Crawling JavaScript-heavy sites
    • Large, long-running crawls
    View code
    Technical details
    Name
    crawlee
    What it is
    Code library
    How to use it
    Install it, then configure it
    Install
    npm install crawlee playwright
    Licence
    Apache 2.0 (read from LICENSE.md)
  • Crawlers for Python

    Free to use, even in closed products

    Crawlee for Python, with the same queue, retry and storage ideas, plus crawlers built on BeautifulSoup, Parsel and Playwright.

    Use it to build

    • Python data pipelines
    • Collecting data for AI and RAG
    • Scrapers that need a browser only sometimes
    View code
    Technical details
    Name
    crawlee (Python)
    What it is
    Code library
    How to use it
    Install it, then configure it
    Install
    python -m pip install 'crawlee[all]' && playwright install
    Licence
    Apache 2.0 (read from apify/crawlee-python/LICENSE)

Works well with

  • Playwright

    96.6k GitHub stars

    Lets your code open a real browser and click, type and read pages like a person. Used to test websites, collect data and give AI assistants a browser.

    • Browser automation & testing
    • Web scraping & crawling
    • Apache 2.0
  • Crawl4AI

    84.2k GitHub stars

    Reads websites for you and turns them into clean text or tidy data your AI can use, even pages that only load in a browser.

    • Web scraping & crawling
    • RAG & agents
    • Apache 2.0 with attribution clause

Comments

No comments yet. Be the first to share your thoughts.