
Cheerio Scraper
Pricing
Pay per usage

Cheerio Scraper
Crawls websites using raw HTTP requests, parses the HTML with the Cheerio library, and extracts data from the pages using a Node.js code. Supports both recursive crawling and lists of URLs. This actor is a high-performance alternative to apify/web-scraper for websites that do not require JavaScript.
4.7 (11)
Pricing
Pay per usage
148
Total users
7.7k
Monthly users
810
Runs succeeded
>99%
Last modified
a day ago
You can access the Cheerio 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.
$echo '{< "startUrls": [< {< "url": "https://crawlee.dev/js"< }< ],< "respectRobotsTxtFile": true,< "globs": [< {< "glob": "https://crawlee.dev/js/*/*"< }< ],< "pseudoUrls": [],< "excludes": [< {< "glob": "/**/*.{png,jpg,jpeg,pdf}"< }< ],< "linkSelector": "a[href]",< "pageFunction": "async function pageFunction(context) {\\n const { $, request, log } = context;\\n\\n // The \\"$\\" property contains the Cheerio object which is useful\\n // for querying DOM elements and extracting data from them.\\n const pageTitle = $('\''title'\'').first().text();\\n\\n // The \\"request\\" property contains various information about the web page loaded. \\n const url = request.url;\\n \\n // Use \\"log\\" object to print information to Actor log.\\n log.info('\''Page scraped'\'', { url, pageTitle });\\n\\n // Return an object with the data extracted from the page.\\n // It will be stored to the resulting dataset.\\n return {\\n url,\\n pageTitle\\n };\\n}",< "proxyConfiguration": {< "useApifyProxy": true< },< "initialCookies": [],< "additionalMimeTypes": [],< "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]",< "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]",< "customData": {}<}' |<apify call apify/cheerio-scraper --silent --output-dataset
Cheerio Scraper - HTML scraping tool API through CLI
The Apify CLI is the official tool that allows you to use Cheerio Scraper locally, providing convenience functions and automatic retries on errors.
Install the Apify CLI
$npm i -g apify-cli$apify login
Other API clients include: