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
Fix links in examples
Ondra Urban414a930071fe
diff --git a/docs/examples/BasicCrawler.md b/docs/examples/BasicCrawler.mdindex c3b521b84..f8c4fc8b5 100644--- a/docs/examples/BasicCrawler.md+++ b/docs/examples/BasicCrawler.md@@ -5,10 +5,10 @@ title: Basic CrawlerThis is the most basic example of the Apify SDK, which demonstrates some of itselementary tools, such as the-[BasicCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#BasicCrawler)-and [RequestList](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestList) classes.+[`BasicCrawler`](../api/basiccrawler)+and [`RequestList`](../api/requestlist) classes.The script just downloads several web pages with plain HTTP requests (using the-[request-promise](https://www.npmjs.com/package/request-promise) library)+<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`.```javascriptdiff --git a/docs/examples/CallActor.md b/docs/examples/CallActor.mdindex 6a67b5d5f..c710e99d4 100644--- a/docs/examples/CallActor.md+++ b/docs/examples/CallActor.md@@ -4,17 +4,17 @@ title: Call Actor---This example demonstrates how to start an Apify actor using-<a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-call"><code>Apify.call()</code></a>+[`Apify.call()`](../api/apify#module_Apify.call)and how to call Apify API using-<a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-client"><code>Apify.client</code></a>.-The script extracts the current Bitcoin prices from Kraken.com-and sends them to your email using the [apify/send-mail](https://www.apify.com/apify/send-mail) actor.+[`Apify.client`](../api/apify#module_Apify.client).+The script extracts the current Bitcoin prices from <a href="https://www.kraken.com/" target="_blank">Kraken.com</a>+and sends them to your email using the <a href="https://www.apify.com/apify/send-mail" target="_blank">apify/send-mail</a> actor.-To make the example work, you'll need an [Apify Account](https://my.apify.com/).-Go to [Account - Integrations](https://my.apify.com/account#/integrations) page to obtain your API token-and set it to the `APIFY_TOKEN` environment variable, or run the script using the CLI.-If you deploy this actor to the Apify platform then you can set up a scheduler for early-morning. Don't miss the chance of your life to get rich!+To make the example work, you'll need an <a href="https://my.apify.com/" target="_blank">Apify Account</a>.+Go to <a href="https://my.apify.com/account#/integrations" target="_blank">Account - Integrations</a> page to obtain your API token+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.```javascriptconst Apify = require('apify');diff --git a/docs/examples/CheerioCrawler.md b/docs/examples/CheerioCrawler.mdindex 637935fb0..8ce77ea66 100644--- a/docs/examples/CheerioCrawler.md+++ b/docs/examples/CheerioCrawler.md@@ -3,9 +3,9 @@ id: cheeriocrawlertitle: Cheerio Crawler----This example demonstrates how to use [CheerioCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#CheerioCrawler)+This example demonstrates how to use [`CheerioCrawler`](../api/cheeriocrawler)to crawl a list of URLs from an external file,-load each URL using a plain HTTP request, parse the HTML using [cheerio](https://www.npmjs.com/package/cheerio)+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.```javascriptconst Apify = require('apify');diff --git a/docs/examples/HelloWorld.md b/docs/examples/HelloWorld.mdindex c65a3d02f..76cc4d74e 100644--- a/docs/examples/HelloWorld.md+++ b/docs/examples/HelloWorld.md@@ -9,7 +9,7 @@ const Apify = require('apify');Apify.main(async () => {const requestQueue = await Apify.openRequestQueue();- await requestQueue.addRequest(new Apify.Request({ url: 'https://www.iana.org/' }));+ await requestQueue.addRequest({ url: 'https://www.iana.org/' });const pseudoUrls = [new Apify.PseudoUrl('https://www.iana.org/[.*]')];const crawler = new Apify.PuppeteerCrawler({diff --git a/docs/examples/PuppeteerCrawler.md b/docs/examples/PuppeteerCrawler.mdindex e914edeb3..ee8b8ec40 100644--- a/docs/examples/PuppeteerCrawler.md+++ b/docs/examples/PuppeteerCrawler.md@@ -3,10 +3,10 @@ id: puppeteercrawlertitle: Puppeteer Crawler----This example demonstrates how to use [PuppeteerCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#PuppeteerCrawler)-in combination with [RequestList](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestList)-and [RequestQueue](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestQueue) to recursively scrape the-Hacker News website (https://news.ycombinator.com) using headless Chrome / Puppeteer.+This example demonstrates how to use [`PuppeteerCrawler`](../api/puppeteercrawler)+in combination with [`RequestList`](../api/requestlist)+and [`RequestQueue`](../api/requestqueue) to recursively scrape the+<a href="https://news.ycombinator.com" target="_blank">Hacker News website</a> using headless Chrome / Puppeteer.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`diff --git a/docs/examples/PuppeteerSitemap.md b/docs/examples/PuppeteerSitemap.mdindex a573f3e9c..c83595a0e 100644--- a/docs/examples/PuppeteerSitemap.md+++ b/docs/examples/PuppeteerSitemap.md@@ -3,7 +3,7 @@ id: puppeteersitemaptitle: Puppeteer Sitemap----This example demonstrates how to use `PuppeteerCrawler` to crawl a list of web pages+This example demonstrates how to use [`PuppeteerCrawler`](../api/puppeteercrawler) to crawl a list of web pagesspecified in a sitemap. The crawler extracts page title and URL from each pageand stores them as a record to the default dataset.In local configuration, the results are stored as JSON files in `./apify_storage/datasets/default`diff --git a/docs/examples/PuppeteerWithProxy.md b/docs/examples/PuppeteerWithProxy.mdindex 670dea0a3..def3a8623 100644--- a/docs/examples/PuppeteerWithProxy.md+++ b/docs/examples/PuppeteerWithProxy.md@@ -4,11 +4,11 @@ title: Puppeteer With Proxy---This example demonstrates how to load pages in headless Chrome / Puppeteer-over [Apify Proxy](https://www.apify.com/docs/proxy).+over <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a>.To make it work, you'll need an Apify Accountthat has access to the proxy.-The proxy password is available on the [Proxy](https://my.apify.com/proxy) page in the app.-Just set it to the `APIFY_PROXY_PASSWORD` environment variable+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.```javascriptconst Apify = require('apify');diff --git a/docs/examples/Screenshots.md b/docs/examples/Screenshots.mdindex b16571445..dac7f556f 100644--- a/docs/examples/Screenshots.md+++ b/docs/examples/Screenshots.md@@ -5,9 +5,9 @@ title: ScreenshotsThis example demonstrates how to read and writedata to the default key-value store using-<a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-getValue"><code>Apify.getValue()</code></a>+[`Apify.getValue()`](../api/apify#module_Apify.getValue)and-<a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-setValue"><code>Apify.setValue()</code></a>.+[`Apify.setValue()`](../api/apify#module_Apify.setValue).The script crawls a list of URLs using Puppeteer,captures a screenshot of each page and saves it to the store. The list of URLs isprovided as actor input that is also read from the store.@@ -21,8 +21,8 @@ In local configuration, the input is stored in the default key-value store's dirOn the Apify cloud platform, the input can be either set manuallyin the UI app or passed as the POST payload to the-[Run actor API call](https://www.apify.com/docs/api/v2#/reference/actors/run-collection/run-actor).-For more details, see [Input and output](https://www.apify.com/docs/actor#input-output)+<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.```javascriptconst Apify = require('apify');diff --git a/examples/basic_crawler.js b/examples/basic_crawler.jsindex 27eca3c90..23ef906e1 100644--- a/examples/basic_crawler.js+++ b/examples/basic_crawler.js@@ -1,10 +1,10 @@/*** This is the most basic example of the Apify SDK, which demonstrates some of its* elementary tools, such as the- * [BasicCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#BasicCrawler)- * and [RequestList](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestList) classes.+ * [`BasicCrawler`](../api/basiccrawler)+ * and [`RequestList`](../api/requestlist) classes.* The script just downloads several web pages with plain HTTP requests (using the- * [request-promise](https://www.npmjs.com/package/request-promise) library)+ * <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`.*/diff --git a/examples/call_actor.js b/examples/call_actor.jsindex 6609c81c1..80ee6c828 100644--- a/examples/call_actor.js+++ b/examples/call_actor.js@@ -1,16 +1,16 @@/*** This example demonstrates how to start an Apify actor using- * <a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-call"><code>Apify.call()</code></a>+ * [`Apify.call()`](../api/apify#module_Apify.call)* and how to call Apify API using- * <a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-client"><code>Apify.client</code></a>.- * The script extracts the current Bitcoin prices from Kraken.com- * and sends them to your email using the [apify/send-mail](https://www.apify.com/apify/send-mail) actor.+ * [`Apify.client`](../api/apify#module_Apify.client).+ * The script extracts the current Bitcoin prices from <a href="https://www.kraken.com/" target="_blank">Kraken.com</a>+ * and sends them to your email using the <a href="https://www.apify.com/apify/send-mail" target="_blank">apify/send-mail</a> actor.*- * To make the example work, you'll need an [Apify Account](https://my.apify.com/).- * Go to [Account - Integrations](https://my.apify.com/account#/integrations) page to obtain your API token- * and set it to the `APIFY_TOKEN` environment variable, or run the script using the CLI.- * If you deploy this actor to the Apify platform then you can set up a scheduler for early- * morning. Don't miss the chance of your life to get rich!+ * To make the example work, you'll need an <a href="https://my.apify.com/" target="_blank">Apify Account</a>.+ * Go to <a href="https://my.apify.com/account#/integrations" target="_blank">Account - Integrations</a> page to obtain your API token+ * 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.*/const Apify = require('apify');diff --git a/examples/cheerio_crawler.js b/examples/cheerio_crawler.jsindex a5fed480a..5776de78a 100644--- a/examples/cheerio_crawler.js+++ b/examples/cheerio_crawler.js@@ -1,7 +1,7 @@/**- * This example demonstrates how to use [CheerioCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#CheerioCrawler)+ * This example demonstrates how to use [`CheerioCrawler`](../api/cheeriocrawler)* to crawl a list of URLs from an external file,- * load each URL using a plain HTTP request, parse the HTML using [cheerio](https://www.npmjs.com/package/cheerio)+ * 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.*/diff --git a/examples/puppeteer_crawler.js b/examples/puppeteer_crawler.jsindex c4f9ab300..a8c41b13a 100644--- a/examples/puppeteer_crawler.js+++ b/examples/puppeteer_crawler.js@@ -1,8 +1,8 @@/**- * This example demonstrates how to use [PuppeteerCrawler](https://www.apify.com/docs/sdk/apify-runtime-js/latest#PuppeteerCrawler)- * in combination with [RequestList](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestList)- * and [RequestQueue](https://www.apify.com/docs/sdk/apify-runtime-js/latest#RequestQueue) to recursively scrape the- * Hacker News website (https://news.ycombinator.com) using headless Chrome / Puppeteer.+ * This example demonstrates how to use [`PuppeteerCrawler`](../api/puppeteercrawler)+ * in combination with [`RequestList`](../api/requestlist)+ * and [`RequestQueue`](../api/requestqueue) to recursively scrape the+ * <a href="https://news.ycombinator.com" target="_blank">Hacker News website</a> using headless Chrome / Puppeteer.* 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`diff --git a/examples/puppeteer_sitemap.js b/examples/puppeteer_sitemap.jsindex 39f78a6b4..ba85f6698 100644--- a/examples/puppeteer_sitemap.js+++ b/examples/puppeteer_sitemap.js@@ -1,5 +1,5 @@/**- * This example demonstrates how to use `PuppeteerCrawler` to crawl a list of web pages+ * This example demonstrates how to use [`PuppeteerCrawler`](../api/puppeteercrawler) to crawl a list of web pages* 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`diff --git a/examples/puppeteer_with_proxy.js b/examples/puppeteer_with_proxy.jsindex 433ba5533..bf8ca2d99 100644--- a/examples/puppeteer_with_proxy.js+++ b/examples/puppeteer_with_proxy.js@@ -1,10 +1,10 @@/*** This example demonstrates how to load pages in headless Chrome / Puppeteer- * over [Apify Proxy](https://www.apify.com/docs/proxy).+ * over <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a>.* To make it work, you'll need an Apify Account* that has access to the proxy.- * The proxy password is available on the [Proxy](https://my.apify.com/proxy) page in the app.- * Just set it to the `APIFY_PROXY_PASSWORD` environment variable+ * 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.*/diff --git a/examples/screenshots.js b/examples/screenshots.jsindex 4678a9784..687dc4bf0 100644--- a/examples/screenshots.js+++ b/examples/screenshots.js@@ -1,9 +1,9 @@/*** This example demonstrates how to read and write* data to the default key-value store using- * <a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-getValue"><code>Apify.getValue()</code></a>+ * [`Apify.getValue()`](../api/apify#module_Apify.getValue)* and- * <a href="https://www.apify.com/docs/sdk/apify-runtime-js/latest#module-Apify-setValue"><code>Apify.setValue()</code></a>.+ * [`Apify.setValue()`](../api/apify#module_Apify.setValue).* The script crawls a list of URLs using Puppeteer,* captures a screenshot of each page and saves it to the store. The list of URLs is* provided as actor input that is also read from the store.@@ -17,8 +17,8 @@** On the Apify cloud platform, the input can be either set manually* in the UI app or passed as the POST payload to the- * [Run actor API call](https://www.apify.com/docs/api/v2#/reference/actors/run-collection/run-actor).- * For more details, see [Input and output](https://www.apify.com/docs/actor#input-output)+ * <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.*/diff --git a/website/i18n/en.json b/website/i18n/en.jsonindex 0217bbeb2..c711b23fc 100644--- a/website/i18n/en.json+++ b/website/i18n/en.json@@ -98,6 +98,15 @@"guides/whatisanactor": {"title": "What is an Actor"},+ "readme/introduction": {+ "title": "readme/introduction"+ },+ "readme/overview": {+ "title": "readme/overview"+ },+ "readme/support": {+ "title": "readme/support"+ },"typedefs/actorrun": {"title": "ActorRun"},