Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
import { RequestQueue } from 'crawlee';
// Open the default request queue associated with the crawler run
const requestQueue = await RequestQueue.open();
// Enqueue the initial batch of requests (could be an array of just one)
await requestQueue.addRequests([
{ url: 'https://example.com/1' },
{ url: 'https://example.com/2' },
{ url: 'https://example.com/3' },
]);
// Open the named request queue
const namedRequestQueue = await RequestQueue.open('named-queue');
// Remove the named request queue
await namedRequestQueue.drop();