Skip to main content
Version: 3.11

Crawl a single URL

This example uses the got-scraping npm package to grab the HTML of a web page.

Run on
import { gotScraping } from 'got-scraping';

// Get the HTML of a web page
const { body } = await gotScraping({ url: 'https://www.example.com' });
console.log(body);

If you don't want to hard-code the URL into the script, refer to the Accept User Input example.