Download OpenAPI specification:Download
This service extends the Browserless open-source image with many features and enhancements for teams automating at scale. Notable features include:
There's a lot to cover here so let's get started!
The Enterprise image supports time-limited software keys that allow usage for a specific period without requiring any external connections or callbacks. These keys are cryptographically secure and cannot be reverse engineered. When a key expires, the container will exit with a semantic error code.
To use a software key, set the KEY
environment variable when running the container:
docker run -e KEY=your-generated-key browserless/enterprise
The Residential proxy is only available for Enterprise and Cloud plans.
Browserless comes with a built-in mechanism to proxy to what's called "residential" IPs. These are IP addresses are sourced from real-users running a proxy server on their home networking machines. Residential proxying is especially useful for things like bypassing certain bot blockages and more.
Using a residential proxy is as straightforward as adding a few parameters to your library or API calls. Here's the required parameters and the values they support:
?proxy=residential
: Specifies that you want to use the residential proxy for this request. Data-center coming soon.?proxyCountry=us
: Specifies a country you wish to use for the request. A two-digit ISO code.?proxySticky=true
: If you want to use the same IP address for the entirety of the session. Generally recommended for most cases.Simply append these to your connection call, REST API calls, or any library call:
wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky
https://production-sfo.browserless.io/chromium/unblock?token=YOUR-API-TOKEN&proxy=residential&proxyCountry=us&proxySticky
Please do note that using a proxy will increase the amount of units consumed. Every megabyte of data transferred consumes 6 units.
In order to enhance the experience with open source libraries like Puppeteer, we decided to take a new approach to extending these libraries in a language-agnostic way. We call it the Browserless CDP API. Here's a quick list of what it can do:
Since most libraries come with a way to issue "raw" CDP commands, it's an easy way to drop-in custom behaviors without having to write and maintain a library. Plus you can continue to enjoy using the same packages you've already come to know.
Getting started with this API is pretty simple. For instance, if you want to use the live viewer for a particular page, simply do the following:
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint = 'wss://production-sfo.browserless.io/chromium';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL');
// liveURL = 'http://localhost:3000/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
You can then visit this URL in any browser to interact with the headless Chrome running someplace else.
See more below for a full list of the available APIs and features.
This API is only available for Enterprise plans. Contact us for more information here.
Returns a fully-qualified URL to load into a web-browser. This URL allows for clicking, typing and other interactions with the underlying page. This URL doesn't require an authorization token, so you're free to share it externally with your own users or employees. If security is a concern, you can set a timeout
parameter to limit the amount of time this URL is valid for. By default no timeout
is set and the URL is good as long as the underlying browser is open.
Programmatic control of the session is also available, so you can close the live session once your code has detected a selector, network call, or whatever else. See the below example for programmatic control.
Basic example
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL');
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
Timeout example
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL', {
timeout: 10000, // 10 seconds to connect!
});
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
Maintaining the width and height
By default, Browserless will dynamically change the width and height of the browser to match an end-users screen. This isn't always ideal and can be disabled by setting a resizable
value to false
. When this is done, only your script can alter the width and height of the browser:
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
// Width and height will always be 1920x1080
// and the Live URL will maintain this aspect ratio
await page.setViewport({ width: 1920, height: 1080 });
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL', {
resizable: false,
});
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
Setting a Quality and Type
Setting a "quality" and "type" effects the streamed quality of the live URL's client-side resolution. By default, Browserless sets these to quality: 100 and type of "png". You can experiment different settings to get an ideal resolutions while keep latency slow. The close to 100 quality is, the potential for higher perceived latency.
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL', {
quality: 100, // Can be 1 - 100
type: 'png', // Can be 'jpeg' or 'png'
});
// liveURL = 'https://production-sfo.browserless.io/live/?i=98e83bbfd396241a6963425b1feeba2f';
})();
It's also helpful to "wait" until the user is done doing what's needed. For that reason, Browserless will fire a custom event when the page is closed as well:
Wait for close
Custom CDP Events are not supported in all libraries, including .NET Playwright.
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
const { liveURL } = await cdp.send('Browserless.liveURL');
console.log(liveURL);
// Wait for the Browserless.liveComplete event when the live page is closed.
// Please not that not all libraries support custom CDP events.
await new Promise((r) => cdp.on('Browserless.liveComplete', r));
console.log('Done!');
await browser.close();
})();
Programmatic Control
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
// Having the liveURLId is required in order to close it later
const { liveURL, liveURLId } = await cdp.send('Browserless.liveURL');
await page.waitForSelector('.my-selector');
// Calling this CDP API with the "liveURLId" will close the session, and terminate the client
// further usage of the liveURL will fail and no more human-control is possible
await cdp.send('Browserless.closeLiveURL', { liveURLId });
// Continue to process or interact with the browser, then:
await browser.close();
})();
It's recommended that you double check the page prior to executing further code to make sure the page is where it should be, elements are present, and so forth. This approach makes it easy to solve hard things like second-factor authentication and more in a trivial fashion.
Read-only LiveURL Sessions
The interactive: false
option allows you to create read-only LiveURL sessions where users can view the browser but cannot interact with it. This is useful for monitoring or demonstration purposes without allowing user input.
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
// Create a read-only LiveURL session that users can view but not interact with
const { liveURL } = await cdp.send('Browserless.liveURL', {
interactive: false,
});
console.log('Read-only LiveURL:', liveURL);
await browser.close();
})();
This API is only available for Enterprise plans. Contact us for more information here.
Reconnecting allows for the underlying Chrome or Chromium process to continue to run for a specified amount of time, and subsequent reconnecting back to it. With this approach you can also "share" this connection URL to other clients to connect to the same browser process, allowing you to parallelize via a single Browser process.
Once a reconnection URL is retrieved, Browserless will intercept close-based commands and stop them from terminating the browser process itself. This prevents clients from accidentally closing the process via browser.close
or similar.
In order to use this API, simply call Browserless.reconnect
as a CDP command. You can, optionally, set a timeout
or an auth
property. See the below examples for details
Basic example with timeout
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
// Allow this browser to run for 10 seconds, then shut down if nothing connects to it.
// Defaults to the overall timeout set on the instance, which is 5 minutes if not specified.
const { error, browserWSEndpoint } = await cdp.send('Browserless.reconnect', {
timeout: 10000,
});
if (error) throw error;
await browser.close();
// browserWSEndpoint = 'https://production-sfo.browserless.io/reconnect/98e83bbfd396241a6963425b1feeba2f';
})();
If you want to enforce authentication, you can pass in an optional auth
property that clients will need to use in order to connect with. Similar to how authentication works in general, a token
query-string parameter will need to be applied.
Authentication example
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint =
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
// Set a custom authentication token that clients have to use in order to connect, or otherwise
// receive a 401 Response.
const { error, browserWSEndpoint } = await cdp.send('Browserless.reconnect', {
auth: 'secret-auth-token',
});
if (error) throw error;
await browser.close();
// NOTE the URL here doesn't include the auth token!
// browserWSEndpoint = 'https://production-sfo.browserless.io/reconnect/98e83bbfd396241a6963425b1feeba2f';
})();
Recursive Example
import puppeteer from 'puppeteer-core';
const job = async (reconnectURL) => {
const browserWSEndpoint =
reconnectURL ??
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN';
const browser = await puppeteer.connect({ browserWSEndpoint });
const [page] = await browser.page();
const cdp = await page.createCDPSession();
await page.goto('https://example.com');
// Anytime Browserless.reconnect is called, this restarts the timer back to the provided value,
// effectively "bumping" the timer forward.
const res = await cdp.send('Browserless.reconnect', {
timeout: 30000,
});
if (res.error) throw error;
await browser.close();
// Continuously reconnect back...
return job(res.browserWSEndpoint);
};
job().catch((e) => console.error(e));
This API is only available for Enterprise and Scale and above plans on Cloud. Contact us for more information here.. Only the
/chrome
and/chromium
routes support Captcha solving.
Browserless comes with built-in captcha solving capabilities. We use a variety of techniques to try and mitigate the chances of captchas coming up, but if you happen to run into one you can simply call on our API to solve it.
Given the amount of possibilities during a captcha solve, the API returns many properties and information in order to help your script be more informed as to what happened. See the below code example for all details and fields returned by the API.
Please be aware that solving a captcha can take a few seconds up to several minutes, so you'll want to increase your timeouts accordingly for your scripts. Captcha's solved, or attempted to solve, cost 10 units.
import puppeteer from 'puppeteer-core';
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint:
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&timeout=300000',
});
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://www.google.com/recaptcha/api2/demo', {
waitUntil: 'networkidle0',
});
const {
// A simple boolean indicating whether the script can proceed
ok,
// Whether or not a captcha was found
captchaFound,
// A human-readable description of what occurred.
message,
// Whether a solve was attempted or not
solveAttempted,
// If the Captcha was solved, only true if found AND solved
solved,
// Any errors during execution are saved here:
error,
} = await cdp.send('Browserless.solveCaptcha', {
// How long to wait for a Captcha to appear to solve.
// Defaults to 10,000ms, or 10 seconds.
appearTimeout: 30000,
});
console.log(message);
if (ok) {
await page.click('#recaptcha-demo-submit');
} else {
console.error(`Error solving captcha!`);
}
await browser.close();
})().catch((e) => {
console.error(e);
process.exit(1);
});
In general, if an ok
response is sent back from this API, then your script is good to proceed with further actions. If a captcha is to suddenly appears after an action then you might want to listen for the Browserless.foundCaptcha
event (see below) and retry solving.
This API is only available for Enterprise and Scale and above plans on Cloud. Contact us for more information here.. Only the
/chrome
and/chromium
routes support Captcha solving.
Custom CDP Events are not supported in all libraries, including .NET Playwright.
Emitted whenever a captcha widget is found on the page. Useful for checking if there's a captcha and deciding whether or not to proceed with solving.
The example below stops until a captcha is found, which may or may not be the case with every website out there.
import puppeteer from 'puppeteer-core';
// Recaptcha
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint:
'wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN&timeout=300000',
});
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await page.goto('https://www.google.com/recaptcha/api2/demo', {
waitUntil: 'networkidle0',
});
// Please note that not all libraries support custom CDP events.
await new Promise((resolve) =>
cdp.on('Browserless.captchaFound', () => {
console.log('Found a captcha!');
return resolve();
}),
);
const { solved, error } = await cdp.send('Browserless.solveCaptcha');
console.log({
solved,
error,
});
// Continue...
await page.click('#recaptcha-demo-submit');
})().catch((e) => {
console.error(e);
process.exit(1);
});
This API is only available for Enterprise hosted and Starter and above plans on Cloud. Contact us for more information here..
Custom CDP Events are not supported in all libraries, including .NET Playwright.
A custom event emitted every several seconds, signaling a live connection. This is useful for a few reasons:
Today this event is emitted every 30 seconds.
import puppeteer from 'puppeteer-core';
const browserWSEndpoint = `wss://production-sfo.browserless.io/chromium?token=YOUR-API-TOKEN`;
(async () => {
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
await page.goto('https://example.com/');
const client = await page.createCDPSession();
client.on('Browserless.heartbeat', () => {
console.log('Browserless.heartbeat');
});
})();
This API is only available for Enterprise hosted and Starter and above plans on Cloud. Contact us for more information here..
A simple helper utility to return the page's unique ID. Since most libraries treat this ID as opaque, and some even hide it, knowing the page's ID can be of great help when interacting with other parts of Browserless.
import puppeteer from 'puppeteer-core';
(async () => {
const browserWSEndpoint = 'wss://production-sfo.browserless.io/chromium';
const browser = await puppeteer.connect({ browserWSEndpoint });
const page = await browser.newPage();
const cdp = await page.createCDPSession();
const { pageId } = await cdp.send('Browserless.pageId');
// pageId = 'ABC12354AFDC123';
})();
You can, optionally, try and "find" this ID in puppeteer or similar libraries. Given that puppeteer has this property underscored, it's likely to change or be unavailable in the future, and requires the infamous // @ts-ignore
comment to allow TypeScript compilation.
const getPageId = (page: Page): string => {
// @ts-ignore
return page.target()._targetId;
};
Note that these changes are only for Browserless' cloud, Enterprise and self-hosted Enterprise deployments. For information on the open-source container please refer to this link.
/stealth
CDP routes!2.34.1
playwright-core
versions 1.41.2
, 1.42.1
, 1.43.1
, 1.44.1
, 1.45.3
, 1.46.1
, 1.47.2
, 1.48.2
, 1.49.1
, 1.50.1
, 1.51.1
, 1.52.0
, 1.53.1
, and 1.54.2
.puppeteer-core
version 24.16.2
.browserless.io/browserless
at v2.34.0
.playwright-core
versions 1.41.2
, 1.42.1
, 1.43.1
, 1.44.1
, 1.45.3
, 1.46.1
, 1.47.2
, 1.48.2
, 1.49.1
, 1.50.1
, 1.51.1
, 1.52.0
, 1.53.1
, and 1.54.2
.puppeteer-core
version 24.16.1
.EXTENSIONS_DIR
The directory to store extensions onto.LOAD_EXTENSIONS_FROM_CLOUD
Whether or not to load extensions from a S3 compatible URL.EXTENSIONS_CLOUD_BUCKET
The bucket for extensions to be loaded from.EXTENSIONS_CLOUD_REGION
The region to load extensions from.CAPSOLVER_API_KEY
An API key to use for when Capsolver is used for captcha solving.removeAttributes
parameter for better HTML parsing.showBrowserInterface
for rendering all the tabs.viewport
API for BQL./stealth
routes for CDP libraries.solveCaptcha
without specifying the vendor in BQL.MASSIVE_USERNAME
and MASSIVE_PASSWORD
.LiveURL
can now support multi-tabs workflows.goto
, back
, forward
) issues in BQL for goto, forward and backward actions.blockConsentModal
is now default to false
in BQL as it sometimes causes sites to hang indefinitely when loading.amazonWaf
for BQL captcha solving.DOWNLOAD_DIR
.page
's created by playwright's context
object hanging.puppeteer-core
to 24.12.1
.playwright-core
to 1.54.1
.playwright-core
at 1.49
.24.12.1
1.41.2
, 1.42.1
, 1.43.1
, 1.44.1
, 1.45.3
, 1.46.1
, 1.47.2
, 1.48.2
, 1.49.1
, 1.50.1
, 1.51.1
, 1.52.0
,139.0.7258.5
140.0.2
26.0
138.0.7204.101
(amd64 only)138.0.3351.83
(amd64 only)A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean Whether or not to allow JavaScript to run on the page. |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
A JSON or JavaScript content-type API for returning files Chrome has downloaded during the execution of puppeteer code, which is ran inside context of the browser. Browserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it. You can load external libraries via the "import" syntax, and import ESM-style modules that are written for execution inside of the browser. Once your script is finished, any downloaded files from Chromium are returned back with the appropriate content-type header.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
A JSON or JavaScript content-type API for running puppeteer code in the browser's context. Browserless sets up a blank page, injects your puppeteer code, and runs it. You can optionally load external libraries via the "import" module that are meant for browser usage. Values returned from the function are checked and an appropriate content-type and response is sent back to your HTTP call.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
Returns a JSON payload that acts as a pass-through to the DevTools /json/list HTTP API in Chromium and Chrome. Browserless crafts this payload so that remote clients can connect to the underlying "webSocketDebuggerUrl" properly, excluding any API tokens in that URL. If under authentication be sure to include your authorization.
[- {
- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
]
Returns a JSON payload that acts as a pass-through to the DevTools /json/new HTTP API in Chromium. Browserless mocks this payload so that remote clients can connect to the underlying "webSocketDebuggerUrl" which will cause Browserless to start the browser and proxy that request into a blank page.
{- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
Returns a JSON payload that acts as a pass-through to the DevTools /json/version protocol in Chrome and Chromium.
{- "description": "string",
- "devtoolsFrontendUrl": "string",
- "id": "string",
- "title": "string",
- "type": "string",
- "url": "string",
- "webSocketDebuggerUrl": "string"
}
A JSON-based API for getting a PDF binary from either a supplied "url" or "html" payload in your request. Many options exist for injecting cookies, request interceptors, user-agents and waiting for selectors, timers and more.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object Valid options to configure PDF generation via {@link Page.pdf}. | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "scale": 0,
- "displayHeaderFooter": true,
- "headerTemplate": "string",
- "footerTemplate": "string",
- "printBackground": true,
- "landscape": true,
- "pageRanges": "string",
- "format": "A0",
- "width": "string",
- "height": "string",
- "preferCSSPageSize": true,
- "margin": {
- "top": "string",
- "bottom": "string",
- "left": "string",
- "right": "string"
}, - "path": "string",
- "omitBackground": true,
- "tagged": true,
- "outline": true,
- "timeout": 0,
- "waitForFonts": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
Run lighthouse performance audits with a supplied "url" in your JSON payload.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
budgets | Array of objects |
config | object |
url | string |
{- "budgets": [
- { }
], - "config": { },
- "url": "string"
}
{ }
A JSON-based API that returns text, html, and meta-data from a given list of selectors. Debugging information is available by sending in the appropriate flags in the "debugOpts" property. Responds with an array of JSON objects.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
object | |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "debugOpts": {
- "console": true,
- "cookies": true,
- "html": true,
- "network": true,
- "screenshot": true
}, - "elements": [
- {
- "selector": "string",
- "timeout": 0
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
{- "data": [
- {
- "results": [
- {
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "height": 0,
- "html": "string",
- "left": 0,
- "text": "string",
- "top": 0,
- "width": 0
}
], - "selector": "string"
}
], - "debug": {
- "console": [
- "string"
], - "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "html": null,
- "network": {
- "inbound": [
- {
- "headers": null,
- "status": 0,
- "url": "string"
}
], - "outbound": [
- {
- "headers": null,
- "method": "string",
- "url": "string"
}
]
}, - "screenshot": null
}
}
A JSON-based API for getting a screenshot binary from either a supplied "url" or "html" payload in your request. Many options exist including cookies, user-agents, setting timers and network mocks.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
scrollPage | boolean |
selector | string |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "optimizeForSpeed": true,
- "type": "jpeg",
- "quality": 0,
- "fromSurface": true,
- "fullPage": true,
- "omitBackground": true,
- "path": "string",
- "clip": {
- "scale": 0,
- "width": 0,
- "height": 0,
- "x": 0,
- "y": 0
}, - "encoding": "base64",
- "captureBeyondViewport": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "scrollPage": true,
- "selector": "string",
- "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
Note: This endpoint is also available at: /content
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean Whether or not to allow JavaScript to run on the page. |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
A JSON or JavaScript content-type API for returning files Chrome has downloaded during the execution of puppeteer code, which is ran inside context of the browser. Browserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it. You can load external libraries via the "import" syntax, and import ESM-style modules that are written for execution inside of the browser. Once your script is finished, any downloaded files from Chromium are returned back with the appropriate content-type header.
Note: This endpoint is also available at: /download
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
A JSON or JavaScript content-type API for running puppeteer code in the browser's context. Browserless sets up a blank page, injects your puppeteer code, and runs it. You can optionally load external libraries via the "import" module that are meant for browser usage. Values returned from the function are checked and an appropriate content-type and response is sent back to your HTTP call.
Note: This endpoint is also available at: /function
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
A JSON-based API for getting a PDF binary from either a supplied "url" or "html" payload in your request. Many options exist for injecting cookies, request interceptors, user-agents and waiting for selectors, timers and more.
Note: This endpoint is also available at: /pdf
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
blockConsentModals | boolean |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object Valid options to configure PDF generation via {@link Page.pdf}. | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "blockConsentModals": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "scale": 0,
- "displayHeaderFooter": true,
- "headerTemplate": "string",
- "footerTemplate": "string",
- "printBackground": true,
- "landscape": true,
- "pageRanges": "string",
- "format": "A0",
- "width": "string",
- "height": "string",
- "preferCSSPageSize": true,
- "margin": {
- "top": "string",
- "bottom": "string",
- "left": "string",
- "right": "string"
}, - "path": "string",
- "omitBackground": true,
- "tagged": true,
- "outline": true,
- "timeout": 0,
- "waitForFonts": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
Run lighthouse performance audits with a supplied "url" in your JSON payload.
Note: This endpoint is also available at: /performance
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
budgets | Array of objects |
config | object |
url | string |
{- "budgets": [
- { }
], - "config": { },
- "url": "string"
}
{ }
A JSON-based API that returns text, html, and meta-data from a given list of selectors. Debugging information is available by sending in the appropriate flags in the "debugOpts" property. Responds with an array of JSON objects.
Note: This endpoint is also available at: /scrape
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
object | |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "debugOpts": {
- "console": true,
- "cookies": true,
- "html": true,
- "network": true,
- "screenshot": true
}, - "elements": [
- {
- "selector": "string",
- "timeout": 0
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
{- "data": [
- {
- "results": [
- {
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "height": 0,
- "html": "string",
- "left": 0,
- "text": "string",
- "top": 0,
- "width": 0
}
], - "selector": "string"
}
], - "debug": {
- "console": [
- "string"
], - "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "html": null,
- "network": {
- "inbound": [
- {
- "headers": null,
- "status": 0,
- "url": "string"
}
], - "outbound": [
- {
- "headers": null,
- "method": "string",
- "url": "string"
}
]
}, - "screenshot": null
}
}
A JSON-based API for getting a screenshot binary from either a supplied "url" or "html" payload in your request. Many options exist including cookies, user-agents, setting timers and network mocks.
Note: This endpoint is also available at: /screenshot
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
blockConsentModals | boolean |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
scrollPage | boolean |
selector | string |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "blockConsentModals": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "optimizeForSpeed": true,
- "type": "jpeg",
- "quality": 0,
- "fromSurface": true,
- "fullPage": true,
- "omitBackground": true,
- "path": "string",
- "clip": {
- "scale": 0,
- "width": 0,
- "height": 0,
- "x": 0,
- "y": 0
}, - "encoding": "base64",
- "captureBeyondViewport": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "scrollPage": true,
- "selector": "string",
- "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
A JSON-based API. Given a "url" or "html" field, runs and returns HTML content after the page has loaded and JavaScript has parsed.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean Whether or not to allow JavaScript to run on the page. |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
A JSON or JavaScript content-type API for returning files Chrome has downloaded during the execution of puppeteer code, which is ran inside context of the browser. Browserless sets up a blank page, a fresh download directory, injects your puppeteer code, and then executes it. You can load external libraries via the "import" syntax, and import ESM-style modules that are written for execution inside of the browser. Once your script is finished, any downloaded files from Chromium are returned back with the appropriate content-type header.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
A JSON or JavaScript content-type API for running puppeteer code in the browser's context. Browserless sets up a blank page, injects your puppeteer code, and runs it. You can optionally load external libraries via the "import" module that are meant for browser usage. Values returned from the function are checked and an appropriate content-type and response is sent back to your HTTP call.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
code required | string |
object |
{- "code": "string",
- "context": { }
}
A JSON-based API for getting a PDF binary from either a supplied "url" or "html" payload in your request. Many options exist for injecting cookies, request interceptors, user-agents and waiting for selectors, timers and more.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object Valid options to configure PDF generation via {@link Page.pdf}. | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "scale": 0,
- "displayHeaderFooter": true,
- "headerTemplate": "string",
- "footerTemplate": "string",
- "printBackground": true,
- "landscape": true,
- "pageRanges": "string",
- "format": "A0",
- "width": "string",
- "height": "string",
- "preferCSSPageSize": true,
- "margin": {
- "top": "string",
- "bottom": "string",
- "left": "string",
- "right": "string"
}, - "path": "string",
- "omitBackground": true,
- "tagged": true,
- "outline": true,
- "timeout": 0,
- "waitForFonts": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
Run lighthouse performance audits with a supplied "url" in your JSON payload.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
budgets | Array of objects |
config | object |
url | string |
{- "budgets": [
- { }
], - "config": { },
- "url": "string"
}
{ }
A JSON-based API that returns text, html, and meta-data from a given list of selectors. Debugging information is available by sending in the appropriate flags in the "debugOpts" property. Responds with an array of JSON objects.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
object | |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "debugOpts": {
- "console": true,
- "cookies": true,
- "html": true,
- "network": true,
- "screenshot": true
}, - "elements": [
- {
- "selector": "string",
- "timeout": 0
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
{- "data": [
- {
- "results": [
- {
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "height": 0,
- "html": "string",
- "left": 0,
- "text": "string",
- "top": 0,
- "width": 0
}
], - "selector": "string"
}
], - "debug": {
- "console": [
- "string"
], - "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "html": null,
- "network": {
- "inbound": [
- {
- "headers": null,
- "status": 0,
- "url": "string"
}
], - "outbound": [
- {
- "headers": null,
- "method": "string",
- "url": "string"
}
]
}, - "screenshot": null
}
}
A JSON-based API for getting a screenshot binary from either a supplied "url" or "html" payload in your request. Many options exist including cookies, user-agents, setting timers and network mocks.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Array of objects | |
Array of objects | |
object or null | |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
Array of objects | |
emulateMediaType | string |
object | |
html | string |
object | |
rejectRequestPattern | Array of strings |
rejectResourceTypes | Array of strings Items Enum: "cspviolationreport" "document" "eventsource" "fedcm" "fetch" "font" "image" "manifest" "media" "other" "ping" "prefetch" "preflight" "script" "signedexchange" "stylesheet" "texttrack" "websocket" "xhr" |
Array of objects | |
scrollPage | boolean |
selector | string |
object | |
setJavaScriptEnabled | boolean |
url | string |
userAgent | string |
object or null | |
object | |
object | |
object | |
waitForTimeout | number |
{- "addScriptTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string",
- "type": "string",
- "id": "string"
}
], - "addStyleTag": [
- {
- "url": "string",
- "path": "string",
- "content": "string"
}
], - "authenticate": {
- "username": "string",
- "password": "string"
}, - "bestAttempt": true,
- "cookies": [
- {
- "name": "string",
- "value": "string",
- "url": "string",
- "domain": "string",
- "path": "string",
- "secure": true,
- "httpOnly": true,
- "sameSite": "Lax",
- "expires": 0,
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}
}
], - "emulateMediaType": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "html": "string",
- "options": {
- "optimizeForSpeed": true,
- "type": "jpeg",
- "quality": 0,
- "fromSurface": true,
- "fullPage": true,
- "omitBackground": true,
- "path": "string",
- "clip": {
- "scale": 0,
- "width": 0,
- "height": 0,
- "x": 0,
- "y": 0
}, - "encoding": "base64",
- "captureBeyondViewport": true
}, - "rejectRequestPattern": [
- "string"
], - "rejectResourceTypes": [
- "cspviolationreport"
], - "requestInterceptors": [
- {
- "pattern": "string",
- "response": {
- "headers": { },
- "status": 0,
- "contentType": "string",
- "body": "string"
}
}
], - "scrollPage": true,
- "selector": "string",
- "setExtraHTTPHeaders": { },
- "setJavaScriptEnabled": true,
- "url": "string",
- "userAgent": "string",
- "viewport": {
- "width": 0,
- "height": 0,
- "deviceScaleFactor": 0,
- "isMobile": true,
- "isLandscape": true,
- "hasTouch": true
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
This API is only available for Enterprise, hosted and self-hosted plans. Contact us for more information here.
Exports a webpage to a PDF or image format. This API is useful for generating reports, screenshots, or PDFs of web pages.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
url | string The URL of the site you want to archive. |
object | |
object | |
object | |
object | |
waitForTimeout | number |
object | |
includeResources | boolean Whether to include all linked resources (images, CSS, JS) in a zip file. When true, the response will be a zip file containing the HTML and all resources. When false or not provided, the response will be the raw content (default behavior). |
{- "bestAttempt": true,
- "url": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0,
- "headers": { },
- "includeResources": true
}
{- "html": "string"
}
This API is only available for Enterprise and Cloud-unit plans. Contact us for more information here., or sign-up here.
Unblocks the provided URL from being blocked due to bot detection. Returns a payload of Cookies, HTML, a base64 encoded screenshot, and a "browserWSEndpoint" to allow connecting to the browser when specified in the JSON Payload. Only supports CDP or Puppeteer like libraries when connecting to the "browserWSEndpoint".
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
url | string The URL of the site you want to unblock. |
browserWSEndpoint | boolean Whether or not to keep the underlying browser alive and around for future reconnects. Defaults to false. |
cookies | boolean Whether or not to to return cookies for the site, defaults to true. |
content | boolean Whether or not to to return content for the site, defaults to true. |
screenshot | boolean Whether or not to to return a full-page screenshot for the site, defaults to true. |
ttl | number When the browserWSEndpoint is requested this tells browserless how long to keep this browser alive for re-connection until shutting it down completely. Maximum of 30000 for 30 seconds (30,000ms). |
object | |
object | |
object | |
object | |
waitForTimeout | number |
{- "bestAttempt": true,
- "url": "string",
- "browserWSEndpoint": true,
- "cookies": true,
- "content": true,
- "screenshot": true,
- "ttl": 0,
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
{- "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "content": "string",
- "browserWSEndpoint": "string",
- "ttl": 0,
- "screenshot": "string"
}
This API is only available for Enterprise, hosted and self-hosted plans. Contact us for more information here.
Exports a webpage to a PDF or image format. This API is useful for generating reports, screenshots, or PDFs of web pages.
Note: This endpoint is also available at: /export
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
url | string The URL of the site you want to archive. |
object | |
object | |
object | |
object | |
waitForTimeout | number |
object | |
includeResources | boolean Whether to include all linked resources (images, CSS, JS) in a zip file. When true, the response will be a zip file containing the HTML and all resources. When false or not provided, the response will be the raw content (default behavior). |
{- "bestAttempt": true,
- "url": "string",
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0,
- "headers": { },
- "includeResources": true
}
{- "html": "string"
}
This API is only available for Enterprise and Cloud-unit plans. Contact us for more information here., or sign-up here.
Unblocks the provided URL from being blocked due to bot detection. Returns a payload of Cookies, HTML, a base64 encoded screenshot, and a "browserWSEndpoint" to allow connecting to the browser when specified in the JSON Payload. Only supports CDP or Puppeteer like libraries when connecting to the "browserWSEndpoint".
Note: This endpoint is also available at: /unblock
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
bestAttempt | boolean When bestAttempt is set to true, browserless attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more. |
url | string The URL of the site you want to unblock. |
browserWSEndpoint | boolean Whether or not to keep the underlying browser alive and around for future reconnects. Defaults to false. |
cookies | boolean Whether or not to to return cookies for the site, defaults to true. |
content | boolean Whether or not to to return content for the site, defaults to true. |
screenshot | boolean Whether or not to to return a full-page screenshot for the site, defaults to true. |
ttl | number When the browserWSEndpoint is requested this tells browserless how long to keep this browser alive for re-connection until shutting it down completely. Maximum of 30000 for 30 seconds (30,000ms). |
object | |
object | |
object | |
object | |
waitForTimeout | number |
{- "bestAttempt": true,
- "url": "string",
- "browserWSEndpoint": true,
- "cookies": true,
- "content": true,
- "screenshot": true,
- "ttl": 0,
- "gotoOptions": {
- "referer": "string",
- "referrerPolicy": "string",
- "timeout": 0,
- "waitUntil": [
- "domcontentloaded"
], - "signal": {
- "aborted": true,
- "onabort": { },
- "reason": null
}
}, - "waitForEvent": {
- "event": "string",
- "timeout": 0
}, - "waitForFunction": {
- "fn": "string",
- "polling": "string",
- "timeout": 0
}, - "waitForSelector": {
- "hidden": true,
- "selector": "string",
- "timeout": 0,
- "visible": true
}, - "waitForTimeout": 0
}
{- "cookies": [
- {
- "name": "string",
- "value": "string",
- "domain": "string",
- "path": "string",
- "expires": 0,
- "size": 0,
- "httpOnly": true,
- "secure": true,
- "session": true,
- "sameSite": "Lax",
- "priority": "High",
- "sameParty": true,
- "sourceScheme": "NonSecure",
- "partitionKey": {
- "sourceOrigin": "string",
- "hasCrossSiteAncestor": true
}, - "partitionKeyOpaque": true
}
], - "content": "string",
- "browserWSEndpoint": "string",
- "ttl": 0,
- "screenshot": "string"
}
This API is only available for Enterprise, hosted and self-hosted plans. Contact us for more information here.
Parses and executes BrowserQL requests, powered by the BrowserQL Editor or by other API integrations. See the BrowserQL Editor for more documentation on this API.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
blockConsentModals | boolean |
humanlike | boolean |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
query | string |
operationName | string |
object |
{- "query": "string",
- "operationName": "string",
- "variables": {
- "property1": null,
- "property2": null
}
}
This API is only available for Enterprise, hosted and self-hosted plans. Contact us for more information here.
Parses and executes BrowserQL requests, powered by the BrowserQL Editor or by other API integrations. See the BrowserQL Editor for more documentation on this API.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
blockConsentModals | boolean |
humanlike | boolean |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
query | string |
operationName | string |
object |
{- "query": "string",
- "operationName": "string",
- "variables": {
- "property1": null,
- "property2": null
}
}
Executes BrowserQL queries against an existing session. The session must be a stealth session to support BrowserQL.
BrowserQL is a GraphQL-based query language for browser automation that allows you to interact with web pages using a declarative syntax.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
query | string |
object | |
operationName | string |
{- "query": "string",
- "variables": { },
- "operationName": "string"
}
Kill running sessions based on BrowserId or TrackingId.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
browserId | string |
object or object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
This API is only available for Enterprise and cloud plans. Contact us for more information here., or sign-up here.
Creates a new browser session with the specified parameters. The session can be used for persistent browser connections with well-defined lifetimes and reconnection semantics. BrowserQL support is only available for stealth sessions.
ttl | number The time-to-live (TTL) for the session in milliseconds. |
stealth | boolean Whether or not to enable advanced stealth mode. Defaults to false. |
blockAds | boolean Whether or not to enable ad-blocking. Defaults to false. |
headless | boolean Whether the browser should be launched in headless mode.
Ignored if |
args | Array of strings An array of command-line arguments to pass to the browser. Defaults to an empty array. |
browser | string Enum: "chrome" "chromium" The type of browser to use for the session. Currently, only 'chrome' and 'chromium' are supported. Defaults to 'chromium'. |
url | string The underlying page URL you're attempting to automate. Some pages may required special handling in order to work correctly or unblock. This is not required, but can be useful or required for certain sites. |
object Proxy Parameters for the session if desired. If not specified, the session will use the default network settings. |
{- "ttl": 0,
- "stealth": true,
- "blockAds": true,
- "headless": true,
- "args": [
- "string"
], - "browser": "chrome",
- "url": "string",
- "proxy": {
- "type": "residential",
- "sticky": true,
- "country": "string",
- "city": "string",
- "state": "string"
}
}
{- "id": "string",
- "connect": "string",
- "ttl": 0,
- "stop": "string",
- "browserQL": "string"
}
This API is only available for Enterprise and cloud plans. Contact us for more information here., or sign-up here.
Deletes a session and its associated data. This will immediately terminate any active connections to the session if "force" is applied.
Query Parameters:
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
force | boolean Whether to force the deletion of the session even if it has active connections. Defaults to false. |
object or object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to an already-running Chromium process with a library like puppeteer, or others, that work over chrome-devtools-protocol. Chromium must already be launched in order to not return a 404.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
record | boolean |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to an existing page in Chromium with a library like chrome-remote-interface or others that work the page websocketDebugger URL. You can get this unique URL by calling the /json/list API or by finding the page's unique ID from your library of choice.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to Chromium with any playwright style library.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.
Note: This endpoint is also available at: `` for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
record | boolean |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to Chromium with any playwright style library.
Note: This endpoint is also available at: /chromium/playwright
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Launch and connect to Chromium with a library like puppeteer or others that work over chrome-devtools-protocol.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
record | boolean |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to Chromium with any playwright style library.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to Firefox with any playwright-compliant library.
Note: This endpoint is also available at: /firefox/playwright
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to Webkit with any playwright-compliant library.
Note: This endpoint is also available at: /webkit/playwright
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
This API is only available for Enterprise plans and self-hosted Enterprise plans. Contact us for more information here., or sign-up here.
Websocket back-end that powers the live session experience.
This API is only available for Enterprise and Cloud-unit plans. Contact us for more information here., or sign-up here.
Launch and connect to Stealthy Chromium with a library like puppeteer or others that work over chrome-devtools-protocol for scraping in a more stealth-like fashion.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
This API is only available for Enterprise plans and self-hosted Enterprise plans. Contact us for more information here., or sign-up here.
Websocket back-end that powers the live session experience.
Note: This endpoint is also available at: /live/*
for backwards compatibility.
This API is only available for Enterprise and Cloud-unit plans. Contact us for more information here., or sign-up here.
Launch and connect to Stealthy Chromium with a library like puppeteer or others that work over chrome-devtools-protocol for scraping in a more stealth-like fashion.
Note: This endpoint is also available at: /stealth
for backwards compatibility.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Reconnect to an existing Chromium or Chrome session with a library like puppeteer or others that work over chrome-devtools-protocol.
blockAds | boolean Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock-Lite and may cause certain sites to not load properly. |
object or object or string Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API. Must be either JSON object, or a base64-encoded JSON object. | |
timeout | number Override the system-level timeout for this request. Accepts a value in milliseconds. |
token | string The authorization token |
trackingId | string Custom session identifier |
Connect to an existing session with a library like puppeteer or playwright that work over chrome-devtools-protocol. See documentation for more details on how to start the session.
The browser type (Chrome/Chromium, stealth/regular) is determined from the session metadata when it was created initially.
object or string | |
timeout | number |
token | string |