Skip to content

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.

Improved comments for Apify proxy, updated keywords in package.json

Jan Curn810105a3f465
diff --git a/package.json b/package.json
index 0a4335d6f..0854be302 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,8 @@
"main": "build/index.js",
"keywords": [
"apify",
- "apifier",
+ "headless",
+ "chrome",
"puppeteer",
"selenium",
"crawler",
diff --git a/src/actor.js b/src/actor.js
index 95788cea5..85ce53791 100644
--- a/src/actor.js
+++ b/src/actor.js
@@ -370,15 +370,26 @@ export const call = (actId, input, opts = {}) => {
};
/**
- * Returns a URL of Apify Proxy that can be used from Actor acts, web browsers or any other HTTP
- * proxy-enabled applications. For more info about Apify Proxy see
- * <a href="https://www.apify.com/docs/proxy" target="_blank">https://www.apify.com/docs/proxy</a>.
+ * Constructs the URL to the Apify Proxy using the specified settings.
+ * The proxy URL can be used from Apify Actor acts, web browsers or any other HTTP
+ * proxy-enabled applications.
+ *
+ * For more information, see
+ * the <a href="https://my.apify.com/proxy">Apify Proxy</a> page in the app
+ * or the <a href="https://www.apify.com/docs/proxy">documentation</a>.
*
* @param {Object} opts
- * @param {String} opts.password User proxy password. By default, it is taken from the `APIFY_PROXY_PASSWORD` environment variable.
- * @param {String} [opts.apifyProxyGroups] Proxy groups to be used.
- * @param {String} [opts.apifyProxySession] Session ID that identifies requests that should use the same proxy connection.
- * @returns {String} Returns proxy URL.
+ * @param {String} opts.password User's password for the proxy.
+ * By default, it is taken from the `APIFY_PROXY_PASSWORD` environment variable,
+ * which is automatically set by the system when running the acts on the Apify cloud.
+ * @param {String[]} [opts.apifyProxyGroups] Array of Apify Proxy groups to be used.
+ * If not provided, the proxy will select the groups automatically.
+ * @param {String} [opts.apifyProxySession] Apify Proxy session identifier to be used by the Chrome browser.
+ * All HTTP requests going through the proxy with the same session identifier
+ * will use the same target proxy server (i.e. the same IP address).
+ * The identifier can only contain the following characters: `0-9`, `a-z`, `A-Z`, `"."`, `"_"` and `"~"`.
+ *
+ * @returns {String} Returns the proxy URL, e.g. `http://auto:[email protected]:8000`.
*
* @memberof module:Apify
* @function
diff --git a/src/puppeteer.js b/src/puppeteer.js
index 2a4910b43..33eb4d532 100644
--- a/src/puppeteer.js
+++ b/src/puppeteer.js
@@ -20,12 +20,17 @@ import { getApifyProxyUrl } from './actor';
* is taken from the `APIFY_CHROME_EXECUTABLE_PATH` environment variable if provided,
* or defaults to the typical Google Chrome executable location specific for the operating system.
* By default, this option is `false`.
- * @property {String} [opts.useApifyProxy=false] If set to `true` then Puppeteer will be configured to use
- * <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a>.
- * @property {String} [opts.apifyProxyGroups] An array of proxy groups to be used
- * when using the <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a>.
- * @property {String} [opts.apifyProxySession] <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a> session ID that
- * identifies requests that should use the same proxy connection.
+ * @property {String} [opts.useApifyProxy=false] If set to `true`, Puppeteer will be configured to use
+ * <a href="https://my.apify.com/proxy" target="_blank">Apify Proxy</a> for all connections.
+ * For more information, see the <a href="https://www.apify.com/docs/proxy">documentation</a>
+ * @property {String[]} [opts.apifyProxyGroups] An array of proxy groups to be used
+ * by the <a href="https://www.apify.com/docs/proxy" target="_blank">Apify Proxy</a>.
+ * Only applied if the `useApifyProxy` option is `true`.
+ * @property {String} [opts.apifyProxySession] Apify Proxy session identifier to be used by all the Chrome browsers.
+ * All HTTP requests going through the proxy with the same session identifier
+ * will use the same target proxy server (i.e. the same IP address).
+ * The identifier can only contain the following characters: `0-9`, `a-z`, `A-Z`, `"."`, `"_"` and `"~"`.
+ * Only applied if the `useApifyProxy` option is `true`.
*/
/**