Skip to main content
use-apify.com

Node.js: guides & tutorials

Node.js suits async crawlers, queues, and API glue around Playwright. Apify's JavaScript SDK matches that stack for local builds and cloud-hosted actors.

9 articles

View all tags

Node.js suits async crawlers, job queues, and the API glue around headless browsers like Playwright and Puppeteer. These guides cover building scrapers in Node, managing concurrency, and structuring output into clean JSON.

Apify's JavaScript SDK matches the Node stack so you can build locally and deploy the same code to managed cloud actors. Below you will find tutorials, SDK walkthroughs, and patterns for proxies, retries, and scheduling in Node-based scrapers.

Related topics

Actors4 min read

Build and Deploy Your First Apify Actor: Step-by-Step Tutorial (2026)

· 4 min read
Yassine El Haddad
Software Developer & Automation Specialist

An Apify Actor is a serverless scraper or automation packaged for cloud execution. You write standard Node.js code, push it to Apify, and it runs on demand — with built-in proxies, storage, scheduling, and API access included.

This tutorial takes you from an empty folder to a deployed, runnable Actor in about 20 minutes.

Freshness note: Steps verified with Apify CLI 3.x and Apify SDK 3.x (March 2026).

Apify5 min read

Crawlee Node.js Tutorial: Production Web Scraping Without the Boilerplate (2026)

· 5 min read
Yassine El Haddad
Software Developer & Automation Specialist

Crawlee is an open-source Node.js framework from Apify that bundles everything a production scraper needs: request deduplication, auto-retry, proxy rotation, session management, persistent storage, and Playwright/Puppeteer/HTTP crawlers under one API.

Where raw Playwright requires wiring all those pieces manually, Crawlee provides them out of the box — letting you focus on extraction logic.

Freshness note: Examples verified against Crawlee 3.x (March 2026). Install crawlee@latest to get the current release.

IPRoyal4 min read

IPRoyal Residential Proxies Setup Guide: Python, Node.js, and Playwright (2026)

· 4 min read
Yassine El Haddad
Software Developer & Automation Specialist

IPRoyal provides residential rotating proxies with a 32M+ IP pool, starting at approximately $7/GB for small purchases and scaling to ~$1.75/GB at 500 GB — with bandwidth that never expires. This guide covers the exact configuration for Python, Node.js, Playwright, and Crawlee.

Freshness note: Endpoint and format verified March 2026. Check IPRoyal dashboard for current credentials format.

Node.js6 min read

Playwright Web Scraping Tutorial 2026: From Zero to Production

· 6 min read
Yassine El Haddad
Software Developer & Automation Specialist

Playwright is the dominant headless browser for web scraping in 2026 — faster than Selenium, more reliable than Puppeteer, and with native support for Chromium, Firefox, and WebKit. This tutorial takes you from install to a production-ready scraper in under an hour.

Freshness note: Examples updated for Playwright v1.58.x (current as of March 2026). Check the official changelog for the latest release notes.

Crawlee8 min read

Complete Guide to Web Scraping with JavaScript and Node.js in 2026

· 8 min read
Yassine El Haddad
Software Developer & Automation Specialist

JavaScript and Node.js power some of the most capable web scrapers in 2026. The ecosystem spans Axios and node-fetch for HTTP, Cheerio for HTML parsing, Playwright and Puppeteer for browser automation, and Crawlee as the full framework that powers Apify Actors. This guide covers the JS scraping stack, comparison tables, TypeScript patterns, data output options, and a complete Crawlee TypeScript Actor example. Try Apify to run Crawlee Actors in the cloud.

Apify17 min read

Async Web Scraping: Concurrency Patterns in Python and Node.js

· 17 min read
Yassine El Haddad
Software Developer & Automation Specialist

Sequential scrapers are slow — each request waits for the previous one to complete before starting the next. On a typical target that responds in 300 ms, a sequential scraper hitting 1,000 URLs takes five minutes. An async scraper making 50 concurrent requests finishes the same job in under seven seconds.

This guide covers the patterns that make the difference: Python's asyncio stack, Node.js async/await and Promise.all, semaphore-based rate limiting, queue-based architectures, and Apify's AutoscaledPool for production-grade concurrency management. All code examples are copy-paste ready.

Crawlee4 min read

JavaScript Extraction Architectures: Cheerio vs Playwright vs Crawlee

· 4 min read
Yassine El Haddad
Software Developer & Automation Specialist

Node.js possesses outsized advantages for data extraction pipelines: its single-threaded, non-blocking asynchronous event loop naturally aligns with high-concurrency network I/O, and its DOM-manipulation syntax mirrors native browser behavior.

This guide provides a formal architectural breakdown of the three primary abstraction layers available to JavaScript data engineers in 2026.

Crawlee6 min read

Python vs Node.js for Web Scraping (2026): When Each Wins

· 6 min read
Yassine El Haddad
Software Developer & Automation Specialist

Quick Answer

Python is better for data science and ML workflows (BeautifulSoup, Scrapy, Pandas). Node.js is better for JavaScript-heavy sites (Puppeteer, Playwright, Crawlee) and real-time processing.

That is a rule of thumb, not a law: both ecosystems run Playwright, both can scale in the cloud, and platforms like Apify run Python and Node Actors so you can mix languages with hosted infra.

Choosing a language for scraping is less about “which is faster in theory” and more about what you already ship, what the target site needs (static HTML vs heavy JavaScript), and where the data goes next (notebooks, warehouses, real-time APIs).

Guides on this site

Frequently asked questions

Frequently Asked Questions

Node's async event loop handles hundreds of concurrent HTTP connections on a single thread without blocking. npm hosts Playwright, Puppeteer, Crawlee, and Cheerio—the main scraping libraries. TypeScript support adds type safety. Apify actors default to Node, so community examples and templates are abundant.

Cheerio for static HTML parsing, Playwright for browser automation, Crawlee for full crawler orchestration, and Got or Axios for plain HTTP requests. Start with Crawlee—it wraps the others and adds retry logic, request queue, and Apify Cloud integration out of the box. Avoid maintaining your own concurrency primitives.

Stream large responses instead of buffering. Flush datasets periodically rather than accumulating in arrays. Use process.memoryUsage() in health logs. Browser contexts are the biggest memory consumers; close them after use and cap the pool size. Apify's max_used_cpu_ratio and memory limit settings restart actors before OOM.

Package as a Docker container, parameterize inputs via environment variables or an input schema, add structured logging, and schedule via Apify or a cron job. Include a health-check endpoint or result-count assertion so you know immediately when structure changes break extraction. CI tests against fixture HTML prevent regressions.