Vanilla JS Scraper avatar
Vanilla JS Scraper

Pricing

Pay per usage

Go to Store
Vanilla JS Scraper

Vanilla JS Scraper

Developed by

Matthias Stephens

Maintained by Community

Scrape the web using familiar JavaScript methods! Crawls websites using raw HTTP requests, parses the HTML with the JSDOM package, and extracts data from the pages using Node.js code. Supports both recursive crawling and lists of URLs. This actor is a non jQuery alternative to CheerioScraper.

0.0 (0)

Pricing

Pay per usage

4

Monthly users

17

Runs succeeded

>99%

Last modified

2 years ago

You can access the Vanilla JS Scraper programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1echo '{
2  "requests": [
3    {
4      "url": "https://apify.com"
5    }
6  ],
7  "pseudoUrls": [
8    {
9      "purl": "https://apify.com[(/[\\\\w-]+)?]"
10    }
11  ],
12  "linkSelector": "a[href]",
13  "pageFunction": "async function pageFunction(context) {\\n    const { window, document, crawler, enqueueRequest, request, response, userData, json, body, kvStore, customData } = context;\\n\\n    const title = document.querySelector('\''title'\'').textContent\\n\\n    const responseHeaders = response.headers\\n\\n    return {\\n        title,\\n        responseHeaders\\n    };\\n}",
14  "preNavigationHooks": "// We need to return array of (possibly async) functions here.\\n// The functions accept two arguments: the \\"crawlingContext\\" object\\n// and \\"requestAsBrowserOptions\\" which are passed to the `requestAsBrowser()`\\n// function the crawler calls to navigate..\\n[\\n    async (crawlingContext, requestAsBrowserOptions) => {\\n        // ...\\n    }\\n]",
15  "postNavigationHooks": "// We need to return array of (possibly async) functions here.\\n// The functions accept a single argument: the \\"crawlingContext\\" object.\\n[\\n    async (crawlingContext) => {\\n        // ...\\n    },\\n]",
16  "proxy": {
17    "useApifyProxy": true
18  },
19  "additionalMimeTypes": [],
20  "customData": {}
21}' |
22apify call mstephen190/vanilla-js-scraper --silent --output-dataset

Vanilla JS Scraper API through CLI

The Apify CLI is the official tool that allows you to use Vanilla JS Scraper locally, providing convenience functions and automatic retries on errors.

Install the Apify CLI

1npm i -g apify-cli
2apify login

Other API clients include:

Pricing

Pricing model

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage.