NEWScrapingAnt MCP for Claude Code, Cursor & Windsurf — try it free →
Skip to main content

How do you scrape websites with JavaScript?

In Node.js, fetch pages with fetch or Axios and parse them with Cheerio, or drive a headless browser with Puppeteer or Playwright when the site renders content with JavaScript. Our 38 guides on this topic walk through each step.

38 posts tagged with "javascript"

View All Tags

Web Scraping with Playwright in 6 Simple Steps

· 11 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Web Scraping with Playwright in 6 Simple Steps

Correction (2026-09-28)

Corrected the link-extraction example to print linkUrls, the array it actually constructs. This targeted correction does not claim a new live-site benchmark.

Web scraping is the process of extracting necessary data from external websites. It’s a valuable skill that helps you gather large amounts of data from the internet for various purposes. However, it can be daunting if you don’t need what tools to use.

How to Get All Text from a Webpage with Puppeteer

· 12 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to Get All Text from a Webpage with Puppeteer

Correction (2026-09-28)

The earlier article described DOM Range selection as Ctrl+A/copy-paste and claimed it could recover text from sites using display optimizations. The example performed neither keyboard input nor clipboard copying, and the general recovery claim was unsupported. This refresh compares actual text returned by five methods on a controlled fixture. Code and captured outputs.

For the readable text of an already rendered page, start with page.$eval('body', body => body.innerText). Use textContent when you explicitly want descendant text that can include hidden content and script/style source. If the HTML already contains the data, a converter such as html-to-text can work without a browser.

Those methods produce different outputs. Below, the browser sees three dynamically populated products, while the raw HTTP response contains empty product placeholders. The examples show how that difference affects text extraction, and when to keep structured records instead of flattening the page.

How to download images with NodeJS?

· 5 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to download images with NodeJS?

Working with images in NodeJS extends your web scraping capabilities, from downloading the image with an URL to retrieving photo attributes like EXIF. How to achieve the image download and obtain the data?

This article is a part of the series on image downloading with different programming languages. Check out the other articles in the series:

How to download a file with Playwright?

· 7 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to download a file with Playwright?

In this article, we will share several ideas on how to download files with Playwright. Automating file downloads can sometimes be confusing. You need to handle a download location, download multiple files simultaneously, support streaming, and even more. Unfortunately, not all the cases are well documented. Let's go through several examples and take a deep dive into Playwright's APIs used for file download.

This guide is a part of the series on web scraping and file downloading with different web drivers and programming languages. Check out the other articles in the series:

Web Scraping with Deno

· 10 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Web Scraping with Deno

Dynamic languages are helpful tools for web scraping. Scripting allows users to rapidly tie together complex systems or libraries and express ideas without dealing with memory management or build systems.

JavaScript is the most popularly used dynamic language, operating on every device with a web browser, and Node.js as a JS runtime proved to be a very successful software platform. Due to design mistakes, it became hard to evolve with an existing user base, so Deno was born to resolve all the problems. Let's find out how to scrape the web and dynamic websites with Deno.

Web Scraping with JavaScript and Node.js: A Tested Guide

· 7 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Web Scraping with Javascript

Updated 2026-10-26

Rewritten for Node.js 22: built-in fetch and ES modules, current Cheerio, jsdom, Axios, Playwright and Puppeteer, and a web scraping API example. The request and SuperAgent sections and an untested Selenium Google search example were removed. Every snippet was run on 2026-10-26 and its output is shown; the code is in the evidence packet.

Node.js is a good fit for web scraping: fetch is built in, the parsers are fast, and the two main headless browser libraries, Playwright and Puppeteer, are JavaScript-first. This guide goes from a one-line request to a page that only renders in a browser, then shows the same job through a web scraping API.

How to use a proxy in Playwright

· 4 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to use a proxy in Playwright?

Playwright is a high-level API to control and automate headless Chrome (Chromium), Firefox and Webkit. It can be considered as an extended Puppeteer, as it allows using more browser types to automate modern web apps testing and scraping. Playwright API can be used in JavaScript & TypeScript, Python, C# and, Java. In this article, we are going to show how to set up a proxy in Playwright for all the supported browsers.