Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Improve example docs
Ondra Urban49b723b21798
diff --git a/examples/basic_crawler.js b/examples/basic_crawler.jsindex 23ef906e1..ce55ab092 100644--- a/examples/basic_crawler.js+++ b/examples/basic_crawler.js@@ -7,6 +7,9 @@* <a href="https://www.npmjs.com/package/request-promise" target="_blank">request-promise</a> library)* and stores their raw HTML and URL to the default dataset.* In local configuration, the data will be stored as JSON files in `./apify_storage/datasets/default`.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 on Alpine Linux (apify/actor-node-basic)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/call_actor.js b/examples/call_actor.jsindex 80ee6c828..5b0fd2bcc 100644--- a/examples/call_actor.js+++ b/examples/call_actor.js@@ -11,6 +11,9 @@* and set it to the `APIFY_TOKEN` [environment variable](../guides/environmentvariables), or run the script using the CLI.* If you deploy this actor to the Apify Cloud then you can set up a scheduler for early* morning.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/cheerio_crawler.js b/examples/cheerio_crawler.jsindex 5776de78a..bb8065abc 100644--- a/examples/cheerio_crawler.js+++ b/examples/cheerio_crawler.js@@ -3,6 +3,9 @@* to crawl a list of URLs from an external file,* load each URL using a plain HTTP request, parse the HTML using <a href="https://www.npmjs.com/package/cheerio" target="_blank">cheerio</a>* and extract some data from it: the page title and all H1 tags.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 on Alpine Linux (apify/actor-node-basic)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/hello_world.js b/examples/hello_world.jsindex 79588c7e6..13befe71a 100644--- a/examples/hello_world.js+++ b/examples/hello_world.js@@ -1,5 +1,8 @@/*** Run the following example to perform a recursive crawl of a website using Puppeteer.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/puppeteer_crawler.js b/examples/puppeteer_crawler.jsindex 8e3767f35..c39572402 100644--- a/examples/puppeteer_crawler.js+++ b/examples/puppeteer_crawler.js@@ -6,6 +6,9 @@* The crawler starts with a single URL, finds links to next pages,* enqueues them and continues until no more desired links are available.* The results are stored to the default dataset. In local configuration, the results are stored as JSON files in `./apify_storage/datasets/default`+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/puppeteer_sitemap.js b/examples/puppeteer_sitemap.jsindex ba85f6698..785059cbd 100644--- a/examples/puppeteer_sitemap.js+++ b/examples/puppeteer_sitemap.js@@ -3,6 +3,9 @@* specified in a sitemap. The crawler extracts page title and URL from each page* and stores them as a record to the default dataset.* In local configuration, the results are stored as JSON files in `./apify_storage/datasets/default`+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/puppeteer_with_proxy.js b/examples/puppeteer_with_proxy.jsindex bf8ca2d99..490c4777f 100644--- a/examples/puppeteer_with_proxy.js+++ b/examples/puppeteer_with_proxy.js@@ -6,6 +6,9 @@* The proxy password is available on the <a href="https://my.apify.com/proxy" target="_blank">Proxy</a> page in the app.* Just set it to the `APIFY_PROXY_PASSWORD` [environment variable](../guides/environmentvariables)* or run the script using the CLI.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/screenshots.js b/examples/screenshots.jsindex cc57bc2cc..ed0865409 100644--- a/examples/screenshots.js+++ b/examples/screenshots.js@@ -20,6 +20,9 @@* <a href="https://www.apify.com/docs/api/v2#/reference/actors/run-collection/run-actor" target="_blank">Run actor API call</a>.* For more details, see <a href="https://www.apify.com/docs/actor#input-output" target="_blank">Input and output</a>* in the Apify Actor documentation.+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');diff --git a/examples/synchronous_run.js b/examples/synchronous_run.jsindex 9ce8e4af5..d093a5aa4 100644--- a/examples/synchronous_run.js+++ b/examples/synchronous_run.js@@ -12,6 +12,9 @@* ```http* https://api.apify.com/v2/acts/apify~example-golden-gate-webcam/run-sync?token=[YOUR_API_TOKEN]* ```+ *+ * To run this example on the Apify Platform, select the `Node.js 8 + Chrome on Debian (apify/actor-node-chrome)` base image+ * on the source tab of your actor configuration.*/const Apify = require('apify');