NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Glossary

Crawlee: a crawling toolkit with the plumbing included

Crawlee is an open source library for building crawlers in Node.js and Python, with request queues, retries, session handling and both HTTP and browser crawlers built in.

What it bundles

Writing a crawler from scratch means building the same parts every time: a queue that survives restarts, deduplication, retries with limits, concurrency that adapts to the machine, storage for results. Crawlee ships those parts and lets you focus on the page handler. It is maintained as open source in two editions, one for Node.js (TypeScript) and one for Python, with similar concepts in both.

Crawler classes

CrawlerFetches withUse when
Cheerio or BeautifulSoup crawlerPlain HTTP plus a parserStatic pages, high volume, low cost
Playwright crawlerA real browser through PlaywrightPages that need JavaScript or interaction
Puppeteer crawler (Node.js)Chrome through PuppeteerSame, when your stack prefers Puppeteer
Adaptive crawlerChooses HTTP or browser per pageMixed sites, to save resources

Exact class names differ slightly between the Node.js and Python editions; check the current documentation for the one you use.

A short example

import { CheerioCrawler, Dataset } from "crawlee";

const crawler = new CheerioCrawler({
  maxRequestsPerCrawl: 200,
  async requestHandler({ request, $, enqueueLinks }) {
    await Dataset.pushData({ url: request.loadedUrl, title: $("title").text() });
    await enqueueLinks({ globs: ["https://example.com/docs/**"] });
  },
});
await crawler.run(["https://example.com/docs/"]);

enqueueLinks adds links to the persistent request queue, which removes duplicates on its own. Results land in a local dataset folder by default.

Sessions and blocking

The session pool groups cookies, proxy and fingerprint into a session and retires sessions that start getting blocked. Browser crawlers can also generate consistent browser fingerprints. These features lower how often you meet a challenge, but they do not remove challenges, and a protected site will still show one now and then.

Adding a solving step

Handle challenges inside the request handler or in a pre navigation hook. Detect the widget, read its key, call GateSolver, wait for the answer and continue. A sketch for a reCAPTCHA form in a Playwright crawler: look for [data-sitekey], create a reCAPTCHA v2 task, poll every three seconds with an awaited timer (never a blocking sleep), set the returned token into #g-recaptcha-response, submit, then wait for navigation. If a task fails, it is free; throw an error and let Crawlee's retry logic requeue the request with a fresh session. Tokens usually arrive under 9 seconds.

Because Crawlee scales concurrency up and down by itself, many handlers may be waiting on solves at once. That is fine on the solving side, which does not cap concurrent tasks, but keep an eye on the 600 requests per minute per key budget when polling (see concurrency).

When to choose it

Crawlee suits medium and large crawls in Node.js or Python where you want sensible defaults and the option to switch between HTTP and browser fetching. For very small jobs, Cheerio with fetch is simpler; in the Python world Scrapy is the long established alternative.

Common questions

Is Crawlee available for Python?

Yes. There is a Node.js edition and a Python edition with similar concepts and crawler types.

Does Crawlee deduplicate URLs automatically?

Yes. Its request queue keys each request by a unique key, normally the normalized URL, and skips repeats.

What is the session pool in Crawlee?

A set of sessions, each with its own cookies and proxy, that Crawlee rotates and retires when they start getting blocked.

Can Crawlee solve CAPTCHAs by itself?

No. Detect the challenge in your handler, get the answer from a solving API and continue the request.

Should I use the HTTP or browser crawler?

Start with HTTP for speed and cost, and switch to a browser crawler only for pages that need JavaScript.

Keep reading